Added SMP ports for Cortex A34, Cortex A53, Cortex A55, Cortex A57, Cortex A65, Cortex A65ae, Cortex A72, Cortex A73, Cortex A75, Cortex A76, Cortex A76ae, Cortex A77, and Cortex A78 | ports/cortex_a34/ac6/\*\* ports/cortex_a34/gnu/\*\* ports/cortex_a53/ac6/\*\* ports/cortex_a53/gnu/\*\* ports/cortex_a55/ac6/\*\* ports/cortex_a55/gnu/\*\* ports/cortex_a57/ac6/\*\* ports/cortex_a57/gnu/\*\* ports/cortex_a65/ac6/\*\* ports/cortex_a65/gnu/\*\* ports/cortex_a65ae/ac6/\*\* ports/cortex_a65ae/gnu/\*\* ports/cortex_a72/ac6/\*\* ports/cortex_a72/gnu/\*\* ports/cortex_a73/ac6/\*\* ports/cortex_a73/gnu/\*\* ports/cortex_a75/ac6/\*\* ports/cortex_a75/gnu/\*\* ports/cortex_a76/ac6/\*\* ports/cortex_a76/gnu/\*\* ports/cortex_a76ae/ac6/\*\* ports/cortex_a76ae/gnu/\*\* ports/cortex_a77/ac6/\*\* ports/cortex_a77/gnu/\*\* ports_module/cortex_m0+/ac6/\*\* ports_module/cortex_m0+/gnu/\*\* ports_module/cortex_m0+/iar/\*\* ports_smp/cortex_a34_smp/ac6/\*\* ports_smp/cortex_a34_smp/gnu/\*\* ports_smp/cortex_a53_smp/ac6/\*\* ports_smp/cortex_a53_smp/gnu/\*\* ports_smp/cortex_a55_smp/ac6/\*\* ports_smp/cortex_a55_smp/gnu/\*\* ports_smp/cortex_a57_smp/ac6/\*\* ports_smp/cortex_a57_smp/gnu/\*\* ports_smp/cortex_a65_smp/ac6/\*\* ports_smp/cortex_a65_smp/gnu/\*\* ports_smp/cortex_a65ae_smp/ac6/\*\* ports_smp/cortex_a65ae_smp/gnu/\*\* ports_smp/cortex_a72_smp/ac6/\*\* ports_smp/cortex_a72_smp/gnu/\*\* ports_smp/cortex_a73_smp/ac6/\*\* ports_smp/cortex_a73_smp/gnu/\*\* ports_smp/cortex_a75_smp/ac6/\*\* ports_smp/cortex_a75_smp/gnu/\*\* ports_smp/cortex_a76_smp/ac6/\*\* ports_smp/cortex_a76_smp/gnu/\*\* ports_smp/cortex_a76ae_smp/ac6/\*\* ports_smp/cortex_a76ae_smp/gnu/\*\* ports_smp/cortex_a77_smp/ac6/\*\* ports_smp/cortex_a77_smp/gnu/\*\* ports_smp/cortex_a78_smp/ac6/\*\* ports_smp/cortex_a78_smp/gnu | 03/02/2022 | Yuxin Zhou |
+| Clean up | Closed | 6.1.10 | Clean up whitespace | common_modules/module_manager/src/\* | 03/02/2022 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.10 | Add CALL_NOT_USED options | common_modules/module_manager/inc/txm_module_manager_dispatch.h | 03/02/2022 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.10 | Add CALL_NOT_USED options, clean up whitespace | common_modules/inc/txm_module_user_sample.h common_modules/module_lib/src/\* | 03/02/2022 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.10 | Add callback request thread prototype, clean up whitespace | common_modules/inc/txm_module.h | 03/02/2022 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.10 | Add unused parameter macro, update patch version | common/inc/tx_api.h common_smp/inc/tx_api.h | 03/02/2022 | Yuxin Zhou |
+| ThreadX Release | Closed | 6.1.9 | Release | ThreadX 6.1.9 release | 18/10/2021 | Yuxin Zhou |
+| New feature | Closed | 6.1.9 | Add the Thread-Metric performance test suite | utility/benchmarks/thread_metric/** | 18/10/2021 | Yuxin Zhou |
+| New feature | Closed | 6.1.9 | Add IAR compiler support to the Cortex A5x SMP port | ports_smp/cortex_a5x_smp/iar/** | 18/10/2021 | Yuxin Zhou |
+| New feature | Closed | 6.1.9 | Add IAR compiler support to the RXv2 port | ports_module/rxv2/iar/** | 18/10/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.9 | Add Execution Profile Kit (EPK) support | ports_module/cortex_a5/\*/module_manager/src/tx_thread_context_restore.s ports_module/cortex_a5/\*/module_manager/src/tx_thread_context_save.s ports_module/cortex_a5/\*/module_manager/src/tx_thread_schedule.s ports_module/cortex_a7/\*/module_manager/src/tx_thread_context_restore.s ports_module/cortex_a7/\*/module_manager/src/tx_thread_context_save.s ports_module/cortex_a7/\*/module_manager/src/tx_thread_schedule.s ports_module/cortex_a8/\*/module_manager/src/tx_thread_context_restore.s ports_module/cortex_a8/\*/module_manager/src/tx_thread_context_save.s ports_module/cortex_a8/\*/module_manager/src/tx_thread_schedule.s ports_module/cortex_a9/\*/module_manager/src/tx_thread_context_restore.s ports_module/cortex_a9/\*/module_manager/src/tx_thread_context_save.s ports_module/cortex_a9/\*/module_manager/src/tx_thread_schedule.s ports_module/cortex_a15/\*/module_manager/src/tx_thread_context_restore.s ports_module/cortex_a15/\*/module_manager/src/tx_thread_context_save.s ports_module/cortex_a15/\*/module_manager/src/tx_thread_schedule.s ports_module/cortex_a35/\*/module_manager/src/tx_thread_context_restore.s ports_module/cortex_a35/\*/module_manager/src/tx_thread_context_save.s ports_module/cortex_a35/\*/module_manager/src/tx_thread_schedule.s | 18/10/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.9 | Fix compiler warnings | utility/rtos_compatibility_layers/FreeRTOS/tx_freertos.c: | 18/10/2021 | Yuxin Zhou |
+| Removal | Closed | 6.1.9 | Removal of port-specific error handling. Developers must use common/src/tx_thread_stack_error_handler.c instead| cortex_m23/src/tx_thread_stack_error_handler.c cortex_m23/src/tx_thread_stack_error_notify.c cortex_m33/src/tx_thread_stack_error_handler.c cortex_m33/src/tx_thread_stack_error_notify.c | 18/10/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.9 | a | b | 18/10/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.9 | a | b | 18/10/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.9 | Fix logic to get interrupt status | rxv2/gnu/inc/tx_port.h | 18/10/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.9 | Add symbol ULONG64_DEFINED | linux/gnu/inc/tx_port.h | 18/10/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.9 | Improve stack check error handling | ports/cortex_m23/\*/inc/tx_port.h ports/cortex_m33/\*/inc/tx_port.h | 18/10/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.9 | Add support for disabling loop control on Arc EM | ports/arc_em/metaware/src/tx_thread_context_restore.s | 18/10/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.9 | Optimize system stack usage on Arc EM | ports/arc_em/metaware/example_build/sample_threadx/tx_initialize_low_level.s | 18/10/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.9 | Improve stack check error handling | common/inc/tx_thread.h common/src/tx_thread_initialize.c common/src/tx_thread_stack_error_handler.c common/src/tx_thread_stack_error_notify.c | 18/10/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.9 | Add user-configurable TX_TIMER_TICKS_PER_SECOND | common/inc/tx_user_sample.h | 18/10/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.9 | Updated product version numbers | common/inc/tx_api.h common_smp/inc/tx_api.h | 18/10/2021 | Yuxin Zhou |
+| ThreadX Release | Closed | 6.1.8 | Release | ThreadX 6.1.8 release | 03/08/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.8 | Update compiler flags in sample builds | ports_module/cortex_m3/gnu/example_build/\* ports_module/cortex_m4/gnu/example_build/\* ports_module/cortex_m7/gnu/example_build/\* | 03/08/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.8 | Add BASEPRI support | ports_module/cortex_m7/\*/module_manager/src/tx_thread_interrupt_control.s ports_module/cortex_m7/\*/module_manager/src/tx_thread_interrupt_disable.s ports_module/cortex_m7/\*/module_manager/src/tx_thread_interrupt_restore.s ports_module/cortex_m7/\*/module_manager/src/tx_thread_system_return.s ports_module/cortex_m4/\*/module_manager/src/tx_thread_interrupt_control.s ports_module/cortex_m4/\*/module_manager/src/tx_thread_interrupt_disable.s ports_module/cortex_m4/\*/module_manager/src/tx_thread_interrupt_restore.s ports_module/cortex_m4/\*/module_manager/src/tx_thread_system_return.s ports_module/cortex_m3/\*/module_manager/src/tx_thread_interrupt_control.s ports_module/cortex_m3/\*/module_manager/src/tx_thread_interrupt_disable.s ports_module/cortex_m3/\*/module_manager/src/tx_thread_interrupt_restore.s ports_module/cortex_m3/\*/module_manager/src/tx_thread_system_return.s ports_module/cortex_m33/\*/module_manager/src/tx_thread_interrupt_control.s ports_module/cortex_m33/\*/module_manager/src/tx_thread_interrupt_disable.s ports_module/cortex_m33/\*/module_manager/src/tx_thread_interrupt_restore.s ports_module/cortex_m33/\*/module_manager/src/tx_thread_system_return.s | 03/08/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.8 | Add Execution Profile Kit (EPK) support | ports_module/cortex_m23/iar/src/tx_initialize_low_level.s ports_module/cortex_m23/\*/module_manager/src/tx_thread_context_restore.s ports_module/cortex_m23/\*/module_manager/src/tx_thread_context_save.s ports_module/cortex_m23/\*/module_manager/src/tx_thread_schedule.s ports_module/cortex_m3/\*/module_manager/src/tx_thread_context_restore.s ports_module/cortex_m3/\*/module_manager/src/tx_thread_context_save.s ports_module/cortex_m3/\*/module_manager/src/tx_thread_schedule.s ports_module/cortex_m33/iar/src/tx_initialize_low_level.s ports_module/cortex_m33/\*/module_manager/src/tx_thread_context_restore.s ports_module/cortex_m33/\*/module_manager/src/tx_thread_context_save.s ports_module/cortex_m33/\*/module_manager/src/tx_thread_schedule.s ports_module/cortex_m4/\*/module_manager/src/tx_thread_context_restore.s ports_module/cortex_m4/\*/module_manager/src/tx_thread_context_save.s ports_module/cortex_m4/\*/module_manager/src/tx_thread_schedule.s ports_module/cortex_m7/\*/module_manager/src/tx_thread_context_restore.s ports_module/cortex_m7/\*/module_manager/src/tx_thread_schedule.s ports_module/cortex_m7/\*/module_manager/src/tx_thread_context_save.s | 03/08/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.8 | Fix initialisation function | ports_module/cortex_m23/*/module_manager/src/tx_thread_secure_stack.c | 03/08/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.8 | Update project files - ac6 compiler | ports_module/cortex_m23/ac6/example_build/\* ports_module/cortex_m33/ac6/example_build/\* | 03/08/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.8 | Update header file for intrinsic functions - ac6 compiler | ports_module/cortex_m23/ac6/module_manager/src/tx_thread_secure_stack.c ports_module/cortex_m33/ac6/module_manager/src/tx_thread_secure_stack.c | 03/08/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.8 | Implement secure stack initialisation | ports_module/cortex_m23/\*/module_manager/src/tx_thread_secure_stack_initialize.s ports_module/cortex_m33/\*/module_manager/src/tx_thread_secure_stack_initialize.s | 03/08/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.8 | Fix VFP context switching | ports_module/cortex_m4/\*/module_manager/src/tx_thread_schedule.s ports_module/cortex_m7/\*/module_manager/src/tx_thread_schedule.s ports_module/cortex_m33/\*/module_manager/src/tx_thread_schedule.s | 03/08/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.8 | Add Execution Profile Kit (EPK) support | ports/cortex_m0/\*/example_build/tx_initialize_low_level.s ports/cortex_m23/ac6/example_build/tx_initialize_low_level.S ports/cortex_m23/gnu/src/tx_initialize_low_level.S ports/cortex_m23/iar/src/tx_initialize_low_level.s ports/cortex_m33/ac6/example_build/tx_initialize_low_level.S ports/cortex_m33/gnu/src/tx_initialize_low_level.S ports/cortex_m33/iar/src/tx_initialize_low_level.s | 03/08/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.8 | Add BASEPRI support | ports/cortex_m3/iar/src/tx_thread_interrupt_disable.s ports/cortex_m33/\*/src/tx_thread_interrupt_control.s ports/cortex_m33/\*/src/tx_thread_interrupt_disable.s ports/cortex_m33/\*/src/tx_thread_interrupt_restore.s ports/cortex_m33/\*/src/tx_thread_system_return.s ports/cortex_m4/iar/src/tx_thread_interrupt_disable.s ports/cortex_m7/iar/src/tx_thread_interrupt_disable.s | 03/08/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.8 | Save/restore registers around low power enter/exit | ports/cortex_m3/\*/src/tx_thread_schedule.s ports/cortex_m4/\*/src/tx_thread_schedule.s ports/cortex_m7/\*/src/tx_thread_schedule.s | 03/08/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.8 | Update header file for intrinsic functions - ac6 compiler | ports/cortex_m23/ac6/src/tx_thread_secure_stack.c ports/cortex_m33/ac6/src/tx_thread_secure_stack.c | 03/08/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.8 | Add secure mode stack initialize. | ports/cortex_m23/\*/inc/tx_secure_interface.h ports/cortex_m33/\*/inc/tx_secure_interface.h | 03/08/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.8 | Remove unneeded cast | common/src/tx_thread_create.c | 03/08/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.8 | Updated product version numbers | common/inc/tx_api.h common_smp/inc/tx_api.h | 03/08/2021 | Yuxin Zhou |
+| ThreadX Release | Closed | 6.1.7 | Release | ThreadX 6.1.7 release | 07/06/2021 | Yuxin Zhou |
+| New feature | Closed | 6.1.7 | Execution Profile Kit (EPK) utility classes | utility/rtos_compatibility_layers/execution_profile_kit/** | 07/06/2021 | Yuxin Zhou |
+| New feature | Closed | 6.1.7 | POSIX compatibility layer | utility/rtos_compatibility_layers/posix/** | 07/06/2021 | Yuxin Zhou |
+| New feature | Closed | 6.1.7 | OSEK compatibility layer | utility/rtos_compatibility_layers/OSEK/** | 07/06/2021 | Yuxin Zhou |
+| Cleanup | Closed | 6.1.7 | Directory name changes: cortex-a7 -> cortex_a7 cortex-m3 -> cortex_m3 cortex-m4 -> cortex_m4 cortex-m7 ->cortex_m7 cortex-r4 -> cortex_r4 | ports_module/cortex_a7 ports_module/cortex_m3 ports_module/cortex_m4 ports_module/cortex_m7 ports_module/cortex_r4 | 07/06/2021 | Yuxin Zhou |
+| Cleanup | Closed | 6.1.7 | Internal logic cleanups | ports/cortex_m3/\*\* ports/cortex_m4/\*\* ports/cortex_m7/\*\* | 07/06/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.7 | Implement Execution Profile Kit (EPK) support | ports/cortex_m0/\*/src/tx_thread_context_restore.s ports/cortex_m0/\*/src/tx_thread_context_save.s ports/cortex_m0/\*/src/tx_thread_schedule.s ports/cortex_m3/\*/src/tx_thread_context_restore.s ports/cortex_m3/\*/src/tx_thread_context_save.s ports/cortex_m3/\*/src/tx_thread_schedule.s ports/cortex_m4/\*/src/tx_thread_context_restore.s ports/cortex_m4/\*/src/tx_thread_context_save.s ports/cortex_m4/\*/src/tx_thread_schedule.s ports/cortex_m7/\*/src/tx_thread_context_restore.s ports/cortex_m7/\*/src/tx_thread_context_save.s ports/cortex_m7/\*/src/tx_thread_schedule.s ports/cortex_m23/\*/src/tx_thread_context_restore.s ports/cortex_m23/\*/src/tx_thread_context_save.s ports/cortex_m23/\*/src/tx_thread_schedule.s ports/cortex_m33/\*/src/tx_thread_context_restore.s ports/cortex_m33/\*/src/tx_thread_context_save.s ports/cortex_m33/\*/src/tx_thread_schedule.s | 07/06/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.7 | Fix secure stack initialization | ports/cortex_m23/\*/inc/tx_port.h ports/cortex_m23/\*/src/tx_thread_schedule.s ports/cortex_m23/\*/src/tx_thread_secure_stack.c ports/cortex_m23/\*/src/tx_thread_secure_stack_initialize.s ports/cortex_m33/\*/inc/tx_port.h ports/cortex_m33/\*/src/tx_thread_schedule.s ports/cortex_m33/\*/src/tx_thread_secure_stack.c ports/cortex_m33/\*/src/tx_thread_secure_stack_initialize.s | 07/06/2021 | Yuxin Zhou |
+| New feature | Closed | 6.1.7 | Renesas RXv3 port | ports/rxv3/** | 07/06/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.7 | Enable thread stack error handler for Armv8-m | common/src/tx_thread_stack_error_handler.c common/src/tx_thread_stack_error_notify.c ports/cortex_m23/\*/inc/tx_port.h ports/cortex_m33/\*/inc/tx_port.h | 07/06/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.7 | Added Execution Profile support | common/src/tx_thread_initialize.c | 07/06/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.7 | Support TX_MISRA_ENABLE | comon/src/tx_thread_create.c | 07/06/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.7 | Improve possible free bytes calculation | common/src/tx_byte_pool_search.c | 07/06/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.7 | Updated product version numbers | common/inc/tx_api.h common_smp/inc/tx_api.h | 07/06/2021 | Yuxin Zhou |
+| ThreadX Release | Closed | 6.1.6 | Release | ThreadX 6.1.6 release | 03/04/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.6 | Check objects for overflow | ports_module/cortex-m3/\*/inc/txm_module_port.h ports_module/cortex-m4/\*/inc/txm_module_port.h ports_module/cortex-m7/\*/inc/txm_module_port.h ports_module/cortex-m7/\*/module_manager/src/txm_module_manager_mm_register_setup.c ports_module/cortex_m33/\*/module_manager/src/txm_module_manager_mm_register_setup.c ports_module/cortex-r4/\*/module_manager/src/txm_module_manager_mm_register_setup.c | 03/04/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.6 | Fix MPU region configuration | ports_module/cortex_m33/*/module_manager/src/tx_thread_schedule.S | 03/04/2021 | Yuxin Zhou |
+| New feature | Closed | 6.1.6 | Cortex M23 modules | ports_module/cortex_m23/** | 03/04/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.6 | Fix compilation warning | utilities/low_power/tx_low_power.c | 03/04/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.5 | Implement support for low-power operations | ports/cortex_m23/\*/tx_thread_schedule.s ports/cortex_m33/\*/tx_thread_schedule.s | 03/04/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.6 | ARC EM port for MetaWare compiler bug fix: remove unneeded load of _tx_thread_preempt_disable | ports/arc_em/metaware/tx_timer_interrupt.s | 03/04/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.6 | ARC EM port for MetaWare compiler bug fix: updated commentsn | ports/arc_em/metaware/tx_thread_system_return.s | 03/04/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.6 | ARC EM port for MetaWare compiler bug fix: updated comments | ports/arc_em/metaware/tx_thread_stack_build.s | 03/04/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.6 | ARC EM port for MetaWare compiler bug fix: fixed interrupt priority overwritting bug and fixed hardware stack checker disable/reenable logic | ports/arc_em/metaware/tx_thread_schedule.s | 03/04/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.6 | ARC EM port for MetaWare compiler bug fix: updated comments | ports/arc_em/metaware/tx_thread_interrupt_control.s | 03/04/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.6 | ARC EM port for MetaWare compiler bug fix: r25/r30 are caller saved | ports/arc_em/metaware/tx_thread_context_save.s | 03/04/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.6 | ARC EM port for MetaWare compiler bug fix: r25/r30 are caller saved | ports/arc_em/metaware/tx_thread_context_restore.s | 03/04/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.6 | ARC EM port for MetaWare compiler bug fix: updated comments | ports/arc_em/metaware/tx_initialize_low_level.s | 03/04/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.6 | ARC EM port for MetaWare compiler bug fix: updated macro definition | ports/arc_em/metaware/tx_port.h | 03/04/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.6 | Check that extra_parameters are in module data area | common_modules/module_manager/ inc/txm_module_manager_dispatch.h | 03/04/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.6 | Optimize object checking | common_modules/module_manager/inc/txm_module_manager_util.h | 03/04/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.6 | Add optional defines to remove unneeded functions | common_modules/module_manager/src/txm_module_manager_kernel_dispatch.c | 03/04/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.6 | Fixed mapping current thread's priority rather than next | common/src/tx_mutex_priority_change.c | 03/04/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.6 | Updated product version numbers | common/inc/tx_api.h common_smp/inc/tx_api.h | 03/04/2021 | Yuxin Zhou |
+| ThreadX Release | Closed | 6.1.5 | Release | ThreadX 6.1.5 release | 05/03/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.5 | Fix object delete underflow | common_modules/module_manager/src/txm_module_manager_stop.c | 05/03/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.5 | Add option to remove FileX pointer | common_smp/inc/tx_user_sample.h | 05/03/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.5 | Order defines numerically. Add option to remove FileX pointer | common_smp/inc/tx_api.h | 05/03/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.5 | Add option to remove FileX pointer | common/inc/tx_user_sample.h | 05/03/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.5 | Order defines numerically. Add option to remove FileX pointer | common/inc/tx_api.h | 05/03/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.5 | Add ULONG64_DEFINED | ports/cortex_m23/\*/inc/tx_port.h ports/cortex_m33/\*/inc/tx_port.h | 05/03/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.5 | Fix interrupt enable/disable macros | utility/rtos_compatibility_layers/FreeRTOS/FreeRTOS.h | 05/03/2021 | Yuxin Zhou |
+| Cleanup | Closed | 6.1.5 | Rename rx port to rxv2 | ports/rxv | 05/03/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.5 | Add ULONG64_DEFINED | ports/cortex_m23/\*/inc/tx_port.h ports/cortex_m33/\*/inc/tx_port.h | 05/03/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.5 | Implement support for low-power operations | utility/low_power/\*\* ports/cortex_m0/\*/tx_thread_schedule.s ports/cortex_m3/\*/tx_thread_schedule.s ports/cortex_m4/\*/tx_thread_schedule.s ports/cortex_m7/\*/tx_thread_schedule.s | 05/03/2021 | Yuxin Zhou |
+| Enhancement | Closed | 6.1.5 | Cortex m33: Add support for the IAR and GNU compilers | ports_module/cortex_m33/gnu/\*\* ports_module/cortex_m33/iar/\*\* | 05/03/2021 | Yuxin Zhou |
+| Bug fix | Closed | 6.1.6 | Updated product version numbers | common/inc/tx_api.h common_smp/inc/tx_api.h | | 05/03/2021 | Yuxin Zhou |
+| ThreadX Release | Closed | 6.1.3 | Release | ThreadX 6.1.3 release | 08/01/2021 | Scott Larson |
+| New feature | Closed | 6.1.3 | Cortex m33: Add support for the ac6 compiler | ports_module/cortex_m33/ac6/\*\* | 08/01/2021 | Scott Larson |
+| New feature | Closed | 6.1.3 | Cortex a35: Add support for the ac6 and gnu compilers | ports/cortex_a35/\*\* ports/cortex_a35_smp/\*\* | 08/01/2021 | Scott Larson |
+| New feature | Closed | 6.1.3 | Add xtensa port for the xcc compiler | ports/xtensa | 08/01/2021 | Scott Larson |
+| New feature | Closed | 6.1.3 | Add RXv2 ports for the ccrx, gnu, and iar compilers | ports/rxv2 | 08/01/2021 | Scott Larson |
+| Cleanup | Closed | 6.1.3 | Updates to use builtins/inline assembler | ports/cortex_m23/gnu/inc/tx_port.h ports/cortex_m23/gnu/src/tx_thread_secure_stack.c | 08/01/2021 | Scott Larson |
+| Cleanup | Closed | 6.1.3 | Remove unnecessary settings directories from example. | ports/cortex_a35/ac6/** | 08/01/2021 | Scott Larson |
+| Cleanup | Closed | 6.1.3 | Remove unneeded load of _tx_thread_preempt_disable. | ports/arc_em/metaware/src/tx_timer_interrupt.s ports/arc_hs/metaware/src/tx_timer_interrupt.s | 08/01/2021 | Scott Larson |
+| Enhancement | Closed | 6.1.3 | Update product constants. MISRA compliance changes | common_smp/inc/tx_api.h common_smp/src/tx_thread_create.c common_smp/src/tx_time_get.c common_smp/src/tx_thread_smp_high_level_initialize.c | 08/01/2021 | Scott Larson |
+| New feature | Closed | 6.1.3 | Pre-execution module preamble validation and preparation | common_modules/module_manager/src/txm_module_manager_start.c common_modules/module_manager/src/txm_module_manager_absolute_load.c | 08/01/2021 | Scott Larson |
+| Enhancement | Closed | 6.1.3 | Added port-specific dispathc. | common/inc/tx_api.h | 08/01/2021 | Scott Larson |
+| Enhancement | Closed | 6.1.3 | Fix stack overlap checking. Added 64-bit & SMP support. | common_modules/module_manager/src/txm_module_manager_thread_create.c | 08/01/2021 | Scott Larson |
+| Enhancement | Closed | 6.1.3 | Update product constants. Add port-specific extensions. | common_modules/inc/txm_module.h | 08/01/2021 | Scott Larson |
+| Enhancement | Closed | 6.1.3 | Update product constants | common/inc/tx_api.h common_smp/inc/tx_api.h | 08/01/2021 | Scott Larson |
+| ThreadX Release | Closed | 6.1.2 | Release | NextX Duo 6.1.2 release | 10/11/2020 | Scott Larson |
+| Cleanup | Closed | 6.1.2 | Uniformise assembly file formatting accross toolchains. | ports_module/cortex-m4/\*\*/\*.S ports_module/cortex-m7/\*\*/\*.S | 10/11/2020 | Scott Larson |
+| Cleanup | Closed | 6.1.2 | Remove unneeded IAR workspace files. | ports/**/iar | 10/11/2020 | Scott Larson |
+| Cleanup | Closed | 6.1.2 | Remove th_user.h file. | common_smp/inc/tx_user.h | 10/11/2020 | Scott Larson |
+| Optimisation | Closed | 6.1.2 | Move TX_THREAD_GET_SYSTEM_STATE to tx_api.h. | common/inc/tx_api.h common/inc/tx_thread.h | 10/11/2020 | Scott Larson |
+| Enhancement | Closed | 6.1.2 | Update product constants | common/inc/tx_api.h common_smp/inc/tx_api.h | 10/11/2020 | Scott Larson |
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 05baf6c7..e988d3a6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
# Set up the project
project(threadx
@@ -11,6 +11,21 @@ endif()
if(NOT DEFINED THREADX_TOOLCHAIN)
message(FATAL_ERROR "Error: THREADX_TOOLCHAIN not defined")
endif()
+
+option(THREADX_SMP "Build ThreadX SMP version" OFF)
+
+if(THREADX_SMP)
+ set(TX_PORT_DIR "ports_smp")
+ set(TX_COMMON_DIR "common_smp")
+ set(TX_ARCH_DIR "${THREADX_ARCH}_smp")
+ message(STATUS "Building ThreadX SMP version")
+else()
+ set(TX_PORT_DIR "ports")
+ set(TX_COMMON_DIR "common")
+ set(TX_ARCH_DIR "${THREADX_ARCH}")
+ message(STATUS "Building standard ThreadX version")
+endif()
+
message(STATUS "THREADX_ARCH: ${THREADX_ARCH}")
message(STATUS "THREADX_TOOLCHAIN: ${THREADX_TOOLCHAIN}")
@@ -25,11 +40,11 @@ set(CUSTOM_INC_DIR ${CMAKE_CURRENT_BINARY_DIR}/custom_inc)
if(DEFINED THREADX_CUSTOM_PORT)
add_subdirectory(${THREADX_CUSTOM_PORT} threadx_port)
else()
- add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/ports/${THREADX_ARCH}/${THREADX_TOOLCHAIN})
+ add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/${TX_PORT_DIR}/${TX_ARCH_DIR}/${THREADX_TOOLCHAIN})
endif()
# Pick up the common stuff
-add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/common)
+add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/${TX_COMMON_DIR})
# Define the FreeRTOS adaptation layer
add_library(freertos-threadx EXCLUDE_FROM_ALL)
@@ -46,16 +61,19 @@ target_link_libraries(freertos-threadx PUBLIC threadx)
# If the user provided an override, copy it to the custom directory
if (NOT TX_USER_FILE)
message(STATUS "Using default tx_user.h file")
- set(TX_USER_FILE ${CMAKE_CURRENT_LIST_DIR}/common/inc/tx_user_sample.h)
+ set(TX_USER_FILE ${CMAKE_CURRENT_LIST_DIR}/${TX_COMMON_DIR}/inc/tx_user_sample.h)
else()
message(STATUS "Using custom tx_user.h file from ${TX_USER_FILE}")
-endif()
+endif()
configure_file(${TX_USER_FILE} ${CUSTOM_INC_DIR}/tx_user.h COPYONLY)
-target_include_directories(${PROJECT_NAME}
- PUBLIC
+target_include_directories(${PROJECT_NAME}
+ PUBLIC
${CUSTOM_INC_DIR}
)
target_compile_definitions(${PROJECT_NAME} PUBLIC "TX_INCLUDE_USER_DEFINE_FILE" )
+if(THREADX_SMP)
+ target_compile_definitions(${PROJECT_NAME} PUBLIC "TX_MPCORE" )
+endif()
# Enable a build target that produces a ZIP file of all sources
set(CPACK_SOURCE_GENERATOR "ZIP")
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a327a0bc..7dfafcac 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -6,7 +6,7 @@ Thanks for your interest in this project.
Eclipse ThreadX provides a vendor-neutral, open source, safety certified OS for
real-time applications published on under a permissive license. The Eclipse
-ThreadX suite encompasses:
+ThreadX suite encompasses:
* ThreadX - advanced real-time operating system (RTOS) designed specifically for deeply embedded applications
* NetX Duo - advanced, industrial-grade TCP/IP network stack designed specifically for deeply embedded real-time and IoT applications
* FileX - high-performance, FAT-compatible file system that’s fully integrated with ThreadX kernel
@@ -20,7 +20,7 @@ Project site: https://projects.eclipse.org/projects/iot.threadx
## Terms of Use
-This repository is subject to the Terms of Use of the Eclipse Foundation
+This repository is subject to the Terms of Use of the Eclipse Foundation
https://www.eclipse.org/legal/termsofuse.php
## Developer resources
@@ -54,7 +54,7 @@ Development Process and operates under the terms of the Eclipse IP Policy.
## Eclipse Contributor Agreement
-In order to be able to contribute to Eclipse Foundation projects you must electronically sign the Eclipse Contributor Agreement (ECA).
+In order to be able to contribute to Eclipse Foundation projects you must electronically sign the Eclipse Contributor Agreement (ECA).
https://www.eclipse.org/legal/ECA.php
The ECA provides the Eclipse Foundation with a permanent record that you agree
@@ -63,10 +63,10 @@ the Developer Certificate of Origin (DCO). Having an ECA on file associated with
the email address matching the "Author" field of your contribution's Git commits
fulfills the DCO's requirement that you sign-off on your contributions.
-For more information, please see the Eclipse Committer Handbook:
+For more information, please see the Eclipse Committer Handbook:
https://www.eclipse.org/projects/handbook/#resources-commit
## Contact
-Contact the project developers via the project's "dev" list.
+Contact the project developers via the project's "dev" list.
https://accounts.eclipse.org/mailing-list/threadx-dev
diff --git a/README.md b/README.md
index b3c3e456..260a77a3 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ Eclipse ThreadX has been integrated to the semiconductor's SDKs and development
We also provide [getting started guide](https://github.com/eclipse-threadx/getting-started) and [samples](https://github.com/eclipse-threadx/samples) using development boards from semiconductors you can build and test with.
-See [Overview of Eclipse ThreadX RTOS](https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/threadx/overview-threadx.md) for the high-level overview.
+See [Overview of Eclipse ThreadX RTOS](https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/threadx/overview-threadx.md) for the high-level overview.
## Repository Structure and Usage
### Directory layout
@@ -23,8 +23,8 @@ See [Overview of Eclipse ThreadX RTOS](https://github.com/eclipse-threadx/rtos-d
├── common_modules # Core ThreadX module files
├── common_smp # Core ThreadX SMP files
├── docs # Documentation supplements
- ├── ports # Architecture and compiler specific files. See below for directory breakdown
- │ ├── cortex_m7
+ ├── ports # Architecture and compiler specific files. See below for directory breakdown
+ │ ├── cortex_m7
│ │ ├── iar # Example IAR compiler sample project
│ │ │ ├── example build # IAR workspace and sample project files
│ │ │ ├── inc # tx_port.h for this architecture
@@ -32,7 +32,7 @@ See [Overview of Eclipse ThreadX RTOS](https://github.com/eclipse-threadx/rtos-d
│ │ ├── ac6 # Example ac6/Keil sample project
│ │ ├── gnu # Example gnu sample project
│ │ └── ...
- │ └── ...
+ │ └── ...
├── ports_modules # Architecture and compiler specific files for threadX modules
├── ports_smp # Architecture and compiler specific files for threadX SMP
├── samples # demo_threadx.c
@@ -87,7 +87,7 @@ The master branch has the most recent code with all new features and bug fixes.
/* xx-xx-xxxx Scott Larson Include tx_user.h, */
/* resulting in version 6.x */
/* */
-/**************************************************************************/
+/**************************************************************************/
```
## Supported Architecture Ports
@@ -97,8 +97,8 @@ The master branch has the most recent code with all new features and bug fixes.
arc_em cortex_a12 cortex_m0 cortex_r4
arc_hs cortex_a15 cortex_m23 cortex_r5
arm11 cortex_a17 cortex_m3 cortex_r7
-arm9 cortex_a34 cortex_m33
-c667x cortex_a35 cortex_m4
+arm9 cortex_a34 cortex_m33
+c667x cortex_a35 cortex_m4
linux cortex_a5 cortex_m55
risc-v32 cortex_a53 cortex_m7
rxv1 cortex_a55 cortex_m85
diff --git a/cmake/cortex_a9.cmake b/cmake/cortex_a9.cmake
new file mode 100644
index 00000000..b84963a4
--- /dev/null
+++ b/cmake/cortex_a9.cmake
@@ -0,0 +1,13 @@
+# Name of the target
+set(CMAKE_SYSTEM_NAME Generic)
+set(CMAKE_SYSTEM_PROCESSOR cortex-a9)
+
+set(THREADX_ARCH "cortex_a9")
+set(THREADX_TOOLCHAIN "gnu")
+
+set(MCPU_FLAGS "-marm -mcpu=cortex-a9")
+set(VFP_FLAGS "")
+set(SPEC_FLAGS "--specs=nosys.specs")
+# set(LD_FLAGS "-nostartfiles")
+
+include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
diff --git a/cmake/riscv32-clang-unknown-elf.cmake b/cmake/riscv32-clang-unknown-elf.cmake
new file mode 100644
index 00000000..eb520962
--- /dev/null
+++ b/cmake/riscv32-clang-unknown-elf.cmake
@@ -0,0 +1,29 @@
+# Toolchain settings
+set(CMAKE_C_COMPILER clang-18)
+set(CMAKE_CXX_COMPILER clang++-18)
+#set(AS llvm-as)
+#set(AR llvm-ar)
+#set(OBJCOPY llvm-objcopy)
+#set(OBJDUMP llvm-objdump-18)
+#set(SIZE llvm-size)
+
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+
+# this makes the test compiles use static library option so that we don't need to pre-set linker flags and scripts
+set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
+
+set(CMAKE_C_FLAGS "${CFLAGS}" CACHE INTERNAL "c compiler flags")
+set(CMAKE_CXX_FLAGS "${CXXFLAGS}" CACHE INTERNAL "cxx compiler flags")
+set(CMAKE_ASM_FLAGS "${ASFLAGS} -D__ASSEMBLER__" CACHE INTERNAL "asm compiler flags")
+set(CMAKE_EXE_LINKER_FLAGS "${LDFLAGS}" CACHE INTERNAL "exe link flags")
+
+SET(CMAKE_C_FLAGS_DEBUG "--target=riscv32 -march=rv32im_zicsr_zicntr -mabi=ilp32 -g" CACHE INTERNAL "c debug compiler flags")
+SET(CMAKE_CXX_FLAGS_DEBUG "--target=riscv32 -march=rv32im_zicsr_zicntr -mabi=ilp32 -g" CACHE INTERNAL "cxx debug compiler flags")
+SET(CMAKE_ASM_FLAGS_DEBUG "--target=riscv32 -march=rv32im_zicsr_zicntr -mabi=ilp32 -g" CACHE INTERNAL "asm debug compiler flags")
+
+SET(CMAKE_C_FLAGS_RELEASE "--target=riscv32 -march=rv32im_zicsr_zicntr -mabi=ilp32 -O3" CACHE INTERNAL "c release compiler flags")
+SET(CMAKE_CXX_FLAGS_RELEASE "--target=riscv32 -march=rv32im_zicsr_zicntr -mabi=ilp32 -O3" CACHE INTERNAL "cxx release compiler flags")
+SET(CMAKE_ASM_FLAGS_RELEASE "--target=riscv32 -march=rv32im_zicsr_zicntr -mabi=ilp32" CACHE INTERNAL "asm release compiler flags")
diff --git a/cmake/riscv32-unknown-elf.cmake b/cmake/riscv32-unknown-elf.cmake
new file mode 100644
index 00000000..cfd9f7ea
--- /dev/null
+++ b/cmake/riscv32-unknown-elf.cmake
@@ -0,0 +1,29 @@
+# Toolchain settings
+set(CMAKE_C_COMPILER riscv32-unknown-elf-gcc)
+set(CMAKE_CXX_COMPILER riscv32-unknown-elf-g++)
+set(AS riscv32-unknown-elf-as)
+set(AR riscv32-unknown-elf-ar)
+set(OBJCOPY riscv32-unknown-elf-objcopy)
+set(OBJDUMP riscv32-unknown-elf-objdump)
+set(SIZE riscv32-unknown-elf-size)
+
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+
+# this makes the test compiles use static library option so that we don't need to pre-set linker flags and scripts
+set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
+
+set(CMAKE_C_FLAGS "${CFLAGS}" CACHE INTERNAL "c compiler flags")
+set(CMAKE_CXX_FLAGS "${CXXFLAGS}" CACHE INTERNAL "cxx compiler flags")
+set(CMAKE_ASM_FLAGS "${ASFLAGS} -D__ASSEMBLER__ -D__riscv_float_abi_single" CACHE INTERNAL "asm compiler flags")
+set(CMAKE_EXE_LINKER_FLAGS "${LDFLAGS}" CACHE INTERNAL "exe link flags")
+
+SET(CMAKE_C_FLAGS_DEBUG "-Og -g -ggdb3" CACHE INTERNAL "c debug compiler flags")
+SET(CMAKE_CXX_FLAGS_DEBUG "-Og -g -ggdb3" CACHE INTERNAL "cxx debug compiler flags")
+SET(CMAKE_ASM_FLAGS_DEBUG "-g -ggdb3" CACHE INTERNAL "asm debug compiler flags")
+
+SET(CMAKE_C_FLAGS_RELEASE "-O3" CACHE INTERNAL "c release compiler flags")
+SET(CMAKE_CXX_FLAGS_RELEASE "-O3" CACHE INTERNAL "cxx release compiler flags")
+SET(CMAKE_ASM_FLAGS_RELEASE "" CACHE INTERNAL "asm release compiler flags")
diff --git a/cmake/riscv32_clang.cmake b/cmake/riscv32_clang.cmake
new file mode 100644
index 00000000..97acd832
--- /dev/null
+++ b/cmake/riscv32_clang.cmake
@@ -0,0 +1,18 @@
+# Name of the target
+set(CMAKE_SYSTEM_NAME Generic)
+set(CMAKE_SYSTEM_PROCESSOR risc-v32)
+
+IF(DEFINED $ENV{GCC_INSTALL_PREFIX})
+ SET(GCC_INSTALL_PREFIX "$ENV{GCC_INSTALL_PREFIX}" CACHE INTERNAL "" FORCE)
+ELSE()
+ SET(GCC_INSTALL_PREFIX "/opt/riscv_rv32ima" CACHE INTERNAL "" FORCE)
+ENDIF()
+
+set(THREADX_ARCH "risc-v32")
+set(THREADX_TOOLCHAIN "clang")
+set(ARCH_FLAGS "--sysroot=${GCC_INSTALL_PREFIX}/riscv32-unknown-elf --target=riscv32 -g -march=rv32ima_zicsr -mabi=ilp32")
+set(CFLAGS "${ARCH_FLAGS}")
+set(ASFLAGS "${ARCH_FLAGS}")
+set(LDFLAGS "--no-dynamic-linker -m elf32lriscv -static -nostdlib")
+
+include(${CMAKE_CURRENT_LIST_DIR}/riscv32-clang-unknown-elf.cmake)
diff --git a/cmake/riscv32_gnu.cmake b/cmake/riscv32_gnu.cmake
new file mode 100644
index 00000000..617b1276
--- /dev/null
+++ b/cmake/riscv32_gnu.cmake
@@ -0,0 +1,12 @@
+# Name of the target
+set(CMAKE_SYSTEM_NAME Generic)
+set(CMAKE_SYSTEM_PROCESSOR risc-v32)
+
+set(THREADX_ARCH "risc-v32")
+set(THREADX_TOOLCHAIN "gnu")
+set(ARCH_FLAGS "-g -march=rv32gc -mabi=ilp32d -mcmodel=medany")
+set(CFLAGS "${ARCH_FLAGS}")
+set(ASFLAGS "${ARCH_FLAGS}")
+set(LDFLAGS "${ARCH_FLAGS}")
+
+include(${CMAKE_CURRENT_LIST_DIR}/riscv32-unknown-elf.cmake)
diff --git a/cmake/riscv64-unknown-elf.cmake b/cmake/riscv64-unknown-elf.cmake
new file mode 100644
index 00000000..b515cefa
--- /dev/null
+++ b/cmake/riscv64-unknown-elf.cmake
@@ -0,0 +1,29 @@
+# Toolchain settings
+set(CMAKE_C_COMPILER riscv64-unknown-elf-gcc)
+set(CMAKE_CXX_COMPILER riscv64-unknown-elf-g++)
+set(AS riscv64-unknown-elf-as)
+set(AR riscv64-unknown-elf-ar)
+set(OBJCOPY riscv64-unknown-elf-objcopy)
+set(OBJDUMP riscv64-unknown-elf-objdump)
+set(SIZE riscv64-unknown-elf-size)
+
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+
+# this makes the test compiles use static library option so that we don't need to pre-set linker flags and scripts
+set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
+
+set(CMAKE_C_FLAGS "${CFLAGS}" CACHE INTERNAL "c compiler flags")
+set(CMAKE_CXX_FLAGS "${CXXFLAGS}" CACHE INTERNAL "cxx compiler flags")
+set(CMAKE_ASM_FLAGS "${ASFLAGS} -D__ASSEMBLER__" CACHE INTERNAL "asm compiler flags")
+set(CMAKE_EXE_LINKER_FLAGS "${LDFLAGS}" CACHE INTERNAL "exe link flags")
+
+SET(CMAKE_C_FLAGS_DEBUG "-Og -g -ggdb3" CACHE INTERNAL "c debug compiler flags")
+SET(CMAKE_CXX_FLAGS_DEBUG "-Og -g -ggdb3" CACHE INTERNAL "cxx debug compiler flags")
+SET(CMAKE_ASM_FLAGS_DEBUG "-g -ggdb3" CACHE INTERNAL "asm debug compiler flags")
+
+SET(CMAKE_C_FLAGS_RELEASE "-O3" CACHE INTERNAL "c release compiler flags")
+SET(CMAKE_CXX_FLAGS_RELEASE "-O3" CACHE INTERNAL "cxx release compiler flags")
+SET(CMAKE_ASM_FLAGS_RELEASE "" CACHE INTERNAL "asm release compiler flags")
diff --git a/cmake/riscv64_gnu.cmake b/cmake/riscv64_gnu.cmake
new file mode 100644
index 00000000..babfffc8
--- /dev/null
+++ b/cmake/riscv64_gnu.cmake
@@ -0,0 +1,12 @@
+# Name of the target
+set(CMAKE_SYSTEM_NAME Generic)
+set(CMAKE_SYSTEM_PROCESSOR risc-v64)
+
+set(THREADX_ARCH "risc-v64")
+set(THREADX_TOOLCHAIN "gnu")
+set(ARCH_FLAGS "-g -march=rv64gc -mabi=lp64d -mcmodel=medany")
+set(CFLAGS "${ARCH_FLAGS}")
+set(ASFLAGS "${ARCH_FLAGS}")
+set(LDFLAGS "${ARCH_FLAGS}")
+
+include(${CMAKE_CURRENT_LIST_DIR}/riscv64-unknown-elf.cmake)
diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt
index 715e64c7..51314c95 100644
--- a/common/CMakeLists.txt
+++ b/common/CMakeLists.txt
@@ -201,9 +201,9 @@ target_sources(${PROJECT_NAME}
)
# Add the Common/inc directory to the project include list
-target_include_directories(${PROJECT_NAME}
+target_include_directories(${PROJECT_NAME}
SYSTEM
- PUBLIC
+ PUBLIC
${CMAKE_CURRENT_LIST_DIR}/inc
)
diff --git a/common/inc/tx_api.h b/common/inc/tx_api.h
index dbf0d346..7527c413 100644
--- a/common/inc/tx_api.h
+++ b/common/inc/tx_api.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -38,75 +39,6 @@
/* Please note that basic data type definitions and other architecture-*/
/* specific information is contained in the file tx_port.h. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 William E. Lamie Modified comment(s), and */
-/* updated product constants, */
-/* added new thread execution */
-/* state TX_PRIORITY_CHANGE, */
-/* added macros for casting */
-/* pointers to ALIGN_TYPE, */
-/* resulting in version 6.1 */
-/* 10-16-2020 William E. Lamie Modified comment(s), and */
-/* increased patch version, */
-/* resulting in version 6.1.1 */
-/* 11-09-2020 Yuxin Zhou Modified comment(s), and */
-/* moved TX_THREAD_GET_SYSTEM_ */
-/* STATE to tx_api.h, */
-/* resulting in version 6.1.2 */
-/* 12-31-2020 William E. Lamie Modified comment(s), and */
-/* increased patch version, */
-/* resulting in version 6.1.3 */
-/* 03-02-2021 Scott Larson Modified comment(s), and */
-/* order defines numerically, */
-/* add option to remove FileX */
-/* pointer, */
-/* resulting in version 6.1.5 */
-/* 04-02-2021 Scott Larson Modified comment(s), and */
-/* update patch number, */
-/* resulting in version 6.1.6 */
-/* 06-02-2021 Yuxin Zhou Modified comment(s), added */
-/* Execution Profile support, */
-/* resulting in version 6.1.7 */
-/* 08-02-2021 Scott Larson Modified comment(s), and */
-/* update patch number, */
-/* resulting in version 6.1.8 */
-/* 10-15-2021 Yuxin Zhou Modified comment(s), */
-/* update patch number, */
-/* resulting in version 6.1.9 */
-/* 01-31-2022 Scott Larson Modified comment(s), */
-/* add unused parameter macro, */
-/* update patch number, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Wenhui Xie Modified comment(s), */
-/* optimized the definition of */
-/* TX_TIMER_TICKS_PER_SECOND, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comment(s), */
-/* update patch number, */
-/* resulting in version 6.1.12 */
-/* 10-31-2022 Scott Larson Modified comment(s), */
-/* add extension macros, */
-/* update EPK typedef, */
-/* update version numbers, */
-/* resulting in version 6.2.0 */
-/* 03-08-2023 Tiejun Zhou Modified comment(s), */
-/* update patch number, */
-/* resulting in version 6.2.1 */
-/* 10-31-2023 Xiuwen Cai Modified comment(s), */
-/* added option for random */
-/* number stack filling, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Tiejun Zhou Modified comment(s), */
-/* update version number, */
-/* resulting in version 6.4.0 */
-/* 03-01-2024 Tiejun Zhou Modified comment(s), */
-/* update version number, */
-/* resulting in version 6.4.1 */
-/* */
/**************************************************************************/
#ifndef TX_API_H
@@ -144,8 +76,10 @@ extern "C" {
#define AZURE_RTOS_THREADX
#define THREADX_MAJOR_VERSION 6
-#define THREADX_MINOR_VERSION 4
-#define THREADX_PATCH_VERSION 1
+#define THREADX_MINOR_VERSION 5
+#define THREADX_PATCH_VERSION 0
+#define THREADX_BUILD_VERSION 202601
+#define THREADX_HOTFIX_VERSION ' '
/* Define the following symbol for backward compatibility */
#define EL_PRODUCT_THREADX
@@ -325,6 +259,12 @@ extern "C" {
#define TX_TIMER_TICKS_PER_SECOND (100UL)
#endif
+/* Define the default maximum message size in a queue. The default value is TX_16_ULONG, but may
+ be customized in tx_user.h or as a compilation option. */
+
+#ifndef TX_QUEUE_MESSAGE_MAX_SIZE
+#define TX_QUEUE_MESSAGE_MAX_SIZE TX_16_ULONG
+#endif
/* Event numbers 0 through 4095 are reserved by Azure RTOS. Specific event assignments are:
diff --git a/common/inc/tx_block_pool.h b/common/inc/tx_block_pool.h
index 2a8bb51e..89c9dfbe 100644
--- a/common/inc/tx_block_pool.h
+++ b/common/inc/tx_block_pool.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,14 +37,6 @@
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_BLOCK_POOL_H
diff --git a/common/inc/tx_byte_pool.h b/common/inc/tx_byte_pool.h
index 8f1050fa..b9f34311 100644
--- a/common/inc/tx_byte_pool.h
+++ b/common/inc/tx_byte_pool.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,14 +37,6 @@
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_BYTE_POOL_H
diff --git a/common/inc/tx_event_flags.h b/common/inc/tx_event_flags.h
index 51e99536..6506dd13 100644
--- a/common/inc/tx_event_flags.h
+++ b/common/inc/tx_event_flags.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,14 +37,6 @@
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_EVENT_FLAGS_H
diff --git a/common/inc/tx_initialize.h b/common/inc/tx_initialize.h
index 28c7251b..fd944965 100644
--- a/common/inc/tx_initialize.h
+++ b/common/inc/tx_initialize.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,14 +37,6 @@
/* data types and external references. It is assumed that tx_api.h */
/* and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_INITIALIZE_H
diff --git a/common/inc/tx_mutex.h b/common/inc/tx_mutex.h
index a3b52386..b0b46c2f 100644
--- a/common/inc/tx_mutex.h
+++ b/common/inc/tx_mutex.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,14 +37,6 @@
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_MUTEX_H
diff --git a/common/inc/tx_queue.h b/common/inc/tx_queue.h
index 7074a91e..c8b4122c 100644
--- a/common/inc/tx_queue.h
+++ b/common/inc/tx_queue.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,14 +37,6 @@
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_QUEUE_H
diff --git a/common/inc/tx_semaphore.h b/common/inc/tx_semaphore.h
index 6784e58f..baf292bd 100644
--- a/common/inc/tx_semaphore.h
+++ b/common/inc/tx_semaphore.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,14 +37,6 @@
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_SEMAPHORE_H
diff --git a/common/inc/tx_thread.h b/common/inc/tx_thread.h
index 6500d40d..5ba8b3f5 100644
--- a/common/inc/tx_thread.h
+++ b/common/inc/tx_thread.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,21 +37,6 @@
/* data types and external references. It is assumed that tx_api.h */
/* and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 11-09-2020 Yuxin Zhou Modified comment(s), and */
-/* moved TX_THREAD_GET_SYSTEM_ */
-/* STATE to tx_api.h, */
-/* resulting in version 6.1.2 */
-/* 10-15-2021 Scott Larson Modified comment(s), improved */
-/* stack check error handling, */
-/* resulting in version 6.1.9 */
-/* */
/**************************************************************************/
#ifndef TX_THREAD_H
@@ -239,7 +225,7 @@
_tx_thread_stack_error_handler((thread_ptr)); \
TX_DISABLE \
} \
- if (*(((ULONG *) (thread_ptr) -> tx_thread_stack_highest_ptr) - 1) != TX_STACK_FILL) \
+ else if (*(((ULONG *) (thread_ptr) -> tx_thread_stack_highest_ptr) - 1) != TX_STACK_FILL) \
{ \
TX_RESTORE \
_tx_thread_stack_analyze((thread_ptr)); \
diff --git a/common/inc/tx_timer.h b/common/inc/tx_timer.h
index 4703b14d..b49c573e 100644
--- a/common/inc/tx_timer.h
+++ b/common/inc/tx_timer.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,14 +37,6 @@
/* data types and external references. It is assumed that tx_api.h */
/* and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_TIMER_H
diff --git a/common/inc/tx_trace.h b/common/inc/tx_trace.h
index dd78580e..d85d5cc3 100644
--- a/common/inc/tx_trace.h
+++ b/common/inc/tx_trace.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -35,14 +36,6 @@
/* and structure definitions as well as external references. It is */
/* assumed that tx_api.h and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
diff --git a/common/inc/tx_user_sample.h b/common/inc/tx_user_sample.h
index e7ecb56a..0733c16c 100644
--- a/common/inc/tx_user_sample.h
+++ b/common/inc/tx_user_sample.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,33 +40,6 @@
/* Note that all the defines in this file may also be made on the */
/* command line when building ThreadX library and application objects. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 03-02-2021 Scott Larson Modified comment(s), */
-/* added option to remove */
-/* FileX pointer, */
-/* resulting in version 6.1.5 */
-/* 06-02-2021 Scott Larson Added options for multiple */
-/* block pool search & delay, */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Yuxin Zhou Modified comment(s), added */
-/* user-configurable symbol */
-/* TX_TIMER_TICKS_PER_SECOND */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Wenhui Xie Modified comment(s), */
-/* optimized the definition of */
-/* TX_TIMER_TICKS_PER_SECOND, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Xiuwen Cai Modified comment(s), */
-/* added option for random */
-/* number stack filling, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#ifndef TX_USER_H
@@ -117,6 +91,13 @@
#define TX_TIMER_THREAD_PRIORITY ????
*/
+/* Define the maximum size of a message in the a queue. the Default value is TX_ULONG_16.
+ the new value must be a multiple of ULONG. */
+
+/*
+#define TX_QUEUE_MESSAGE_MAX_SIZE TX_16_ULONG
+*/
+
/* Define the common timer tick reference for use by other middleware components. The default
value is 10ms (i.e. 100 ticks, defined in tx_api.h), but may be replaced by a port-specific
version in tx_port.h or here.
@@ -175,7 +156,7 @@
/* Determine if random number is used for stack filling. By default, ThreadX uses a fixed
pattern for stack filling. When the following is defined, ThreadX uses a random number
- for stack filling. This is effective only when TX_ENABLE_STACK_CHECKING is defined. */
+ for stack filling. This is effective only when TX_ENABLE_STACK_CHECKING is defined. */
/*
#define TX_ENABLE_RANDOM_NUMBER_STACK_FILLING
diff --git a/common/src/tx_block_allocate.c b/common/src/tx_block_allocate.c
index b2c7bef5..78619603 100644
--- a/common/src/tx_block_allocate.c
+++ b/common/src/tx_block_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option)
{
diff --git a/common/src/tx_block_pool_cleanup.c b/common/src/tx_block_pool_cleanup.c
index 9bae546d..7bcfecd8 100644
--- a/common/src/tx_block_pool_cleanup.c
+++ b/common/src/tx_block_pool_cleanup.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* _tx_thread_terminate Thread terminate processing */
/* _tx_thread_wait_abort Thread wait abort processing */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_block_pool_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence)
{
diff --git a/common/src/tx_block_pool_create.c b/common/src/tx_block_pool_create.c
index 54612019..1d2c803c 100644
--- a/common/src/tx_block_pool_create.c
+++ b/common/src/tx_block_pool_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size,
VOID *pool_start, ULONG pool_size)
diff --git a/common/src/tx_block_pool_delete.c b/common/src/tx_block_pool_delete.c
index da27ef57..19ecb055 100644
--- a/common/src/tx_block_pool_delete.c
+++ b/common/src/tx_block_pool_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_block_pool_delete(TX_BLOCK_POOL *pool_ptr)
{
diff --git a/common/src/tx_block_pool_info_get.c b/common/src/tx_block_pool_info_get.c
index aebd0db6..5998f1db 100644
--- a/common/src/tx_block_pool_info_get.c
+++ b/common/src/tx_block_pool_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks,
ULONG *total_blocks, TX_THREAD **first_suspended,
diff --git a/common/src/tx_block_pool_initialize.c b/common/src/tx_block_pool_initialize.c
index 21132159..e01eba32 100644
--- a/common/src/tx_block_pool_initialize.c
+++ b/common/src/tx_block_pool_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -97,17 +98,6 @@ ULONG _tx_block_pool_performance_timeout_count;
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* opt out of function when */
-/* TX_INLINE_INITIALIZATION is */
-/* defined, */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_block_pool_initialize(VOID)
{
diff --git a/common/src/tx_block_pool_performance_info_get.c b/common/src/tx_block_pool_performance_info_get.c
index 84f68026..aecf7851 100644
--- a/common/src/tx_block_pool_performance_info_get.c
+++ b/common/src/tx_block_pool_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,14 +71,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_block_pool_performance_info_get(TX_BLOCK_POOL *pool_ptr, ULONG *allocates, ULONG *releases,
ULONG *suspensions, ULONG *timeouts)
diff --git a/common/src/tx_block_pool_performance_system_info_get.c b/common/src/tx_block_pool_performance_system_info_get.c
index 0707295d..86627dd0 100644
--- a/common/src/tx_block_pool_performance_system_info_get.c
+++ b/common/src/tx_block_pool_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_block_pool_performance_system_info_get(ULONG *allocates, ULONG *releases, ULONG *suspensions, ULONG *timeouts)
{
diff --git a/common/src/tx_block_pool_prioritize.c b/common/src/tx_block_pool_prioritize.c
index c4ee4e94..89c2d634 100644
--- a/common/src/tx_block_pool_prioritize.c
+++ b/common/src/tx_block_pool_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_block_pool_prioritize(TX_BLOCK_POOL *pool_ptr)
{
diff --git a/common/src/tx_block_release.c b/common/src/tx_block_release.c
index 3b94c1bb..4a11fe08 100644
--- a/common/src/tx_block_release.c
+++ b/common/src/tx_block_release.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_block_release(VOID *block_ptr)
{
diff --git a/common/src/tx_byte_allocate.c b/common/src/tx_byte_allocate.c
index 69e837e3..2e1a2e5e 100644
--- a/common/src/tx_byte_allocate.c
+++ b/common/src/tx_byte_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -69,14 +70,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option)
{
diff --git a/common/src/tx_byte_pool_cleanup.c b/common/src/tx_byte_pool_cleanup.c
index a1260c5b..3a7acd54 100644
--- a/common/src/tx_byte_pool_cleanup.c
+++ b/common/src/tx_byte_pool_cleanup.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* _tx_thread_terminate Thread terminate processing */
/* _tx_thread_wait_abort Thread wait abort processing */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_byte_pool_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence)
{
diff --git a/common/src/tx_byte_pool_create.c b/common/src/tx_byte_pool_create.c
index 439eed7c..21abbe35 100644
--- a/common/src/tx_byte_pool_create.c
+++ b/common/src/tx_byte_pool_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, ULONG pool_size)
{
diff --git a/common/src/tx_byte_pool_delete.c b/common/src/tx_byte_pool_delete.c
index fc3d9be1..3a24705f 100644
--- a/common/src/tx_byte_pool_delete.c
+++ b/common/src/tx_byte_pool_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_byte_pool_delete(TX_BYTE_POOL *pool_ptr)
{
diff --git a/common/src/tx_byte_pool_info_get.c b/common/src/tx_byte_pool_info_get.c
index 339aa771..bd096440 100644
--- a/common/src/tx_byte_pool_info_get.c
+++ b/common/src/tx_byte_pool_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes,
ULONG *fragments, TX_THREAD **first_suspended,
diff --git a/common/src/tx_byte_pool_initialize.c b/common/src/tx_byte_pool_initialize.c
index 65514536..652ec829 100644
--- a/common/src/tx_byte_pool_initialize.c
+++ b/common/src/tx_byte_pool_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -112,17 +113,6 @@ ULONG _tx_byte_pool_performance_timeout_count;
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* opt out of function when */
-/* TX_INLINE_INITIALIZATION is */
-/* defined, */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_byte_pool_initialize(VOID)
{
diff --git a/common/src/tx_byte_pool_performance_info_get.c b/common/src/tx_byte_pool_performance_info_get.c
index 400804a2..6c2fd615 100644
--- a/common/src/tx_byte_pool_performance_info_get.c
+++ b/common/src/tx_byte_pool_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,14 +79,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_byte_pool_performance_info_get(TX_BYTE_POOL *pool_ptr, ULONG *allocates, ULONG *releases,
ULONG *fragments_searched, ULONG *merges, ULONG *splits, ULONG *suspensions, ULONG *timeouts)
diff --git a/common/src/tx_byte_pool_performance_system_info_get.c b/common/src/tx_byte_pool_performance_system_info_get.c
index 266e2767..23f41c47 100644
--- a/common/src/tx_byte_pool_performance_system_info_get.c
+++ b/common/src/tx_byte_pool_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -75,14 +76,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_byte_pool_performance_system_info_get(ULONG *allocates, ULONG *releases,
ULONG *fragments_searched, ULONG *merges, ULONG *splits, ULONG *suspensions, ULONG *timeouts)
diff --git a/common/src/tx_byte_pool_prioritize.c b/common/src/tx_byte_pool_prioritize.c
index 0076e503..dc2ecc03 100644
--- a/common/src/tx_byte_pool_prioritize.c
+++ b/common/src/tx_byte_pool_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_byte_pool_prioritize(TX_BYTE_POOL *pool_ptr)
{
diff --git a/common/src/tx_byte_pool_search.c b/common/src/tx_byte_pool_search.c
index 504ad745..408f6587 100644
--- a/common/src/tx_byte_pool_search.c
+++ b/common/src/tx_byte_pool_search.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,17 +72,6 @@
/* _tx_byte_allocate Allocate bytes of memory */
/* _tx_byte_release Release bytes of memory */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 06-02-2021 Scott Larson Improve possible free bytes */
-/* calculation, */
-/* resulting in version 6.1.7 */
-/* */
/**************************************************************************/
UCHAR *_tx_byte_pool_search(TX_BYTE_POOL *pool_ptr, ULONG memory_size)
{
diff --git a/common/src/tx_byte_release.c b/common/src/tx_byte_release.c
index 387320ba..b56665ed 100644
--- a/common/src/tx_byte_release.c
+++ b/common/src/tx_byte_release.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_byte_release(VOID *memory_ptr)
{
diff --git a/common/src/tx_event_flags_cleanup.c b/common/src/tx_event_flags_cleanup.c
index 3f870564..ac7bc68b 100644
--- a/common/src/tx_event_flags_cleanup.c
+++ b/common/src/tx_event_flags_cleanup.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* _tx_thread_terminate Thread terminate processing */
/* _tx_thread_wait_abort Thread wait abort processing */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_event_flags_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence)
{
diff --git a/common/src/tx_event_flags_create.c b/common/src/tx_event_flags_create.c
index 2195527a..2a9c042d 100644
--- a/common/src/tx_event_flags_create.c
+++ b/common/src/tx_event_flags_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr)
{
diff --git a/common/src/tx_event_flags_delete.c b/common/src/tx_event_flags_delete.c
index 2b7c890a..777f2491 100644
--- a/common/src/tx_event_flags_delete.c
+++ b/common/src/tx_event_flags_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr)
{
diff --git a/common/src/tx_event_flags_get.c b/common/src/tx_event_flags_get.c
index 4e9abb80..3136d159 100644
--- a/common/src/tx_event_flags_get.c
+++ b/common/src/tx_event_flags_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,20 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 04-25-2022 Scott Larson Modified comment(s), */
-/* handle 0 flags case, */
-/* resulting in version 6.1.11 */
-/* 10-31-2022 Scott Larson Modified comment(s), always */
-/* return actual flags, */
-/* resulting in version 6.2.0 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags,
UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option)
diff --git a/common/src/tx_event_flags_info_get.c b/common/src/tx_event_flags_info_get.c
index 9d409bc5..21e85c9a 100644
--- a/common/src/tx_event_flags_info_get.c
+++ b/common/src/tx_event_flags_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -69,14 +70,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags,
TX_THREAD **first_suspended, ULONG *suspended_count,
diff --git a/common/src/tx_event_flags_initialize.c b/common/src/tx_event_flags_initialize.c
index f7b107c8..d5cd72b9 100644
--- a/common/src/tx_event_flags_initialize.c
+++ b/common/src/tx_event_flags_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -98,17 +99,6 @@ ULONG _tx_event_flags_performance_timeout_count;
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* opt out of function when */
-/* TX_INLINE_INITIALIZATION is */
-/* defined, */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_event_flags_initialize(VOID)
{
diff --git a/common/src/tx_event_flags_performance_info_get.c b/common/src/tx_event_flags_performance_info_get.c
index c0529b03..213c2d2a 100644
--- a/common/src/tx_event_flags_performance_info_get.c
+++ b/common/src/tx_event_flags_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,14 +72,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_performance_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG *sets, ULONG *gets,
ULONG *suspensions, ULONG *timeouts)
diff --git a/common/src/tx_event_flags_performance_system_info_get.c b/common/src/tx_event_flags_performance_system_info_get.c
index 3f1570df..4902b0e1 100644
--- a/common/src/tx_event_flags_performance_system_info_get.c
+++ b/common/src/tx_event_flags_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_performance_system_info_get(ULONG *sets, ULONG *gets, ULONG *suspensions, ULONG *timeouts)
{
diff --git a/common/src/tx_event_flags_set.c b/common/src/tx_event_flags_set.c
index 8309be14..749343c8 100644
--- a/common/src/tx_event_flags_set.c
+++ b/common/src/tx_event_flags_set.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,18 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 04-25-2022 William E. Lamie Modified comment(s), and */
-/* added corrected preemption */
-/* check logic, resulting in */
-/* version 6.1.11 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_set(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG flags_to_set, UINT set_option)
{
@@ -336,8 +325,8 @@ VOID (*events_set_notify)(struct TX_EVENT_FLAGS_GROUP_STRUCT *notify_
/* Disable preemption while we process the suspended list. */
_tx_thread_preempt_disable++;
- /* Since we have temporarily disabled preemption globally, set the preempt
- check flag to check for any preemption condition - including from
+ /* Since we have temporarily disabled preemption globally, set the preempt
+ check flag to check for any preemption condition - including from
unrelated ISR processing. */
preempt_check = TX_TRUE;
diff --git a/common/src/tx_event_flags_set_notify.c b/common/src/tx_event_flags_set_notify.c
index ab2b9a1c..4cafdd57 100644
--- a/common/src/tx_event_flags_set_notify.c
+++ b/common/src/tx_event_flags_set_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_set_notify(TX_EVENT_FLAGS_GROUP *group_ptr, VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *notify_group_ptr))
{
diff --git a/common/src/tx_initialize_high_level.c b/common/src/tx_initialize_high_level.c
index b7224551..77bc3ed7 100644
--- a/common/src/tx_initialize_high_level.c
+++ b/common/src/tx_initialize_high_level.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -100,14 +101,6 @@ VOID *_tx_initialize_unused_memory;
/* is optionally called by */
/* compiler's startup code. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_initialize_high_level(VOID)
{
diff --git a/common/src/tx_initialize_kernel_enter.c b/common/src/tx_initialize_kernel_enter.c
index e5eda61e..20dc3017 100644
--- a/common/src/tx_initialize_kernel_enter.c
+++ b/common/src/tx_initialize_kernel_enter.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -82,21 +83,6 @@ TX_SAFETY_CRITICAL_EXCEPTION_HANDLER
/* */
/* main Application main program */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 04-25-2022 Scott Larson Modified comment(s), */
-/* added EPK initialization, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Xiuwen Cai Modified comment(s), */
-/* added random generator */
-/* initialization, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
VOID _tx_initialize_kernel_enter(VOID)
{
diff --git a/common/src/tx_initialize_kernel_setup.c b/common/src/tx_initialize_kernel_setup.c
index d61e9318..7a698ba8 100644
--- a/common/src/tx_initialize_kernel_setup.c
+++ b/common/src/tx_initialize_kernel_setup.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* startup code Compiler startup code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_initialize_kernel_setup(VOID)
{
diff --git a/common/src/tx_misra.c b/common/src/tx_misra.c
index 90533b96..9abf12f0 100644
--- a/common/src/tx_misra.c
+++ b/common/src/tx_misra.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -32,7 +33,7 @@
#include "tx_api.h"
#else
#define TX_THREAD_INIT
-//CHAR _tx_version_id[100] = "Copyright (c) 2024 Microsoft Corporation. * ThreadX 6.1 MISRA C Compliant *";
+//CHAR _tx_version_id[100] = "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX 6.1 MISRA C Compliant *";
#include "tx_api.h"
#include "tx_thread.h"
diff --git a/common/src/tx_mutex_cleanup.c b/common/src/tx_mutex_cleanup.c
index 09acbf4d..d32f69fc 100644
--- a/common/src/tx_mutex_cleanup.c
+++ b/common/src/tx_mutex_cleanup.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* _tx_thread_terminate Thread terminate processing */
/* _tx_thread_wait_abort Thread wait abort processing */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_mutex_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence)
{
diff --git a/common/src/tx_mutex_create.c b/common/src/tx_mutex_create.c
index 993bf344..436c01f5 100644
--- a/common/src/tx_mutex_create.c
+++ b/common/src/tx_mutex_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit)
{
diff --git a/common/src/tx_mutex_delete.c b/common/src/tx_mutex_delete.c
index ca5aeca8..9c0a5aac 100644
--- a/common/src/tx_mutex_delete.c
+++ b/common/src/tx_mutex_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_mutex_delete(TX_MUTEX *mutex_ptr)
{
diff --git a/common/src/tx_mutex_get.c b/common/src/tx_mutex_get.c
index 91e97f14..402a0f0d 100644
--- a/common/src/tx_mutex_get.c
+++ b/common/src/tx_mutex_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option)
{
diff --git a/common/src/tx_mutex_info_get.c b/common/src/tx_mutex_info_get.c
index 219bcc18..a24d1e30 100644
--- a/common/src/tx_mutex_info_get.c
+++ b/common/src/tx_mutex_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner,
TX_THREAD **first_suspended, ULONG *suspended_count,
diff --git a/common/src/tx_mutex_initialize.c b/common/src/tx_mutex_initialize.c
index ea2ca458..98460cd6 100644
--- a/common/src/tx_mutex_initialize.c
+++ b/common/src/tx_mutex_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -107,17 +108,6 @@ ULONG _tx_mutex_performance__priority_inheritance_count;
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* opt out of function when */
-/* TX_INLINE_INITIALIZATION is */
-/* defined, */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_mutex_initialize(VOID)
{
diff --git a/common/src/tx_mutex_performance_info_get.c b/common/src/tx_mutex_performance_info_get.c
index 501a417a..0704c111 100644
--- a/common/src/tx_mutex_performance_info_get.c
+++ b/common/src/tx_mutex_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -73,14 +74,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_mutex_performance_info_get(TX_MUTEX *mutex_ptr, ULONG *puts, ULONG *gets,
ULONG *suspensions, ULONG *timeouts, ULONG *inversions, ULONG *inheritances)
diff --git a/common/src/tx_mutex_performance_system_info_get.c b/common/src/tx_mutex_performance_system_info_get.c
index 9ca17197..458a5945 100644
--- a/common/src/tx_mutex_performance_system_info_get.c
+++ b/common/src/tx_mutex_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,14 +73,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_mutex_performance_system_info_get(ULONG *puts, ULONG *gets, ULONG *suspensions,
ULONG *timeouts, ULONG *inversions, ULONG *inheritances)
diff --git a/common/src/tx_mutex_prioritize.c b/common/src/tx_mutex_prioritize.c
index 3006b7d0..6522307d 100644
--- a/common/src/tx_mutex_prioritize.c
+++ b/common/src/tx_mutex_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_mutex_prioritize(TX_MUTEX *mutex_ptr)
{
diff --git a/common/src/tx_mutex_priority_change.c b/common/src/tx_mutex_priority_change.c
index 4f9679ef..846e1a54 100644
--- a/common/src/tx_mutex_priority_change.c
+++ b/common/src/tx_mutex_priority_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,23 +66,6 @@
/* _tx_mutex_get Inherit priority */
/* _tx_mutex_put Restore previous priority */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 William E. Lamie Modified comment(s), and */
-/* change thread state from */
-/* TX_SUSPENDED to */
-/* TX_PRIORITY_CHANGE before */
-/* calling */
-/* _tx_thread_system_suspend, */
-/* resulting in version 6.1 */
-/* 04-02-2021 Scott Larson Modified comments, fixed */
-/* mapping current thread's */
-/* priority rather than next, */
-/* resulting in version 6.1.6 */
-/* */
/**************************************************************************/
VOID _tx_mutex_priority_change(TX_THREAD *thread_ptr, UINT new_priority)
{
diff --git a/common/src/tx_mutex_put.c b/common/src/tx_mutex_put.c
index 6ac5065d..062472a2 100644
--- a/common/src/tx_mutex_put.c
+++ b/common/src/tx_mutex_put.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_mutex_put(TX_MUTEX *mutex_ptr)
{
diff --git a/common/src/tx_queue_cleanup.c b/common/src/tx_queue_cleanup.c
index 82d02f45..05a423b3 100644
--- a/common/src/tx_queue_cleanup.c
+++ b/common/src/tx_queue_cleanup.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* _tx_thread_terminate Thread terminate processing */
/* _tx_thread_wait_abort Thread wait abort processing */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_queue_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence)
{
diff --git a/common/src/tx_queue_create.c b/common/src/tx_queue_create.c
index 00edbad9..59ae154e 100644
--- a/common/src/tx_queue_create.c
+++ b/common/src/tx_queue_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size,
VOID *queue_start, ULONG queue_size)
diff --git a/common/src/tx_queue_delete.c b/common/src/tx_queue_delete.c
index 9887b160..6a2bcf6f 100644
--- a/common/src/tx_queue_delete.c
+++ b/common/src/tx_queue_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_delete(TX_QUEUE *queue_ptr)
{
diff --git a/common/src/tx_queue_flush.c b/common/src/tx_queue_flush.c
index 5120c898..b721cf50 100644
--- a/common/src/tx_queue_flush.c
+++ b/common/src/tx_queue_flush.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_flush(TX_QUEUE *queue_ptr)
{
diff --git a/common/src/tx_queue_front_send.c b/common/src/tx_queue_front_send.c
index 5e8b4104..bb39b970 100644
--- a/common/src/tx_queue_front_send.c
+++ b/common/src/tx_queue_front_send.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option)
{
diff --git a/common/src/tx_queue_info_get.c b/common/src/tx_queue_info_get.c
index 3b37b37f..d0ecb2b6 100644
--- a/common/src/tx_queue_info_get.c
+++ b/common/src/tx_queue_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage,
TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue)
diff --git a/common/src/tx_queue_initialize.c b/common/src/tx_queue_initialize.c
index 7a811234..eb34f18b 100644
--- a/common/src/tx_queue_initialize.c
+++ b/common/src/tx_queue_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -105,17 +106,6 @@ ULONG _tx_queue_performance_timeout_count;
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* opt out of function when */
-/* TX_INLINE_INITIALIZATION is */
-/* defined, */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_queue_initialize(VOID)
{
diff --git a/common/src/tx_queue_performance_info_get.c b/common/src/tx_queue_performance_info_get.c
index 721a7e5f..7c426515 100644
--- a/common/src/tx_queue_performance_info_get.c
+++ b/common/src/tx_queue_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,14 +73,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_performance_info_get(TX_QUEUE *queue_ptr, ULONG *messages_sent, ULONG *messages_received,
ULONG *empty_suspensions, ULONG *full_suspensions, ULONG *full_errors, ULONG *timeouts)
diff --git a/common/src/tx_queue_performance_system_info_get.c b/common/src/tx_queue_performance_system_info_get.c
index 87cfb4a6..306c97a2 100644
--- a/common/src/tx_queue_performance_system_info_get.c
+++ b/common/src/tx_queue_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,14 +73,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_performance_system_info_get(ULONG *messages_sent, ULONG *messages_received,
ULONG *empty_suspensions, ULONG *full_suspensions, ULONG *full_errors, ULONG *timeouts)
diff --git a/common/src/tx_queue_prioritize.c b/common/src/tx_queue_prioritize.c
index 4f875078..dbea0a6b 100644
--- a/common/src/tx_queue_prioritize.c
+++ b/common/src/tx_queue_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_prioritize(TX_QUEUE *queue_ptr)
{
diff --git a/common/src/tx_queue_receive.c b/common/src/tx_queue_receive.c
index 31a22f94..a6ab0390 100644
--- a/common/src/tx_queue_receive.c
+++ b/common/src/tx_queue_receive.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -69,14 +70,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_receive(TX_QUEUE *queue_ptr, VOID *destination_ptr, ULONG wait_option)
{
diff --git a/common/src/tx_queue_send.c b/common/src/tx_queue_send.c
index 3ca970a0..7d22f5b9 100644
--- a/common/src/tx_queue_send.c
+++ b/common/src/tx_queue_send.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option)
{
diff --git a/common/src/tx_queue_send_notify.c b/common/src/tx_queue_send_notify.c
index f46d153a..05af2f03 100644
--- a/common/src/tx_queue_send_notify.c
+++ b/common/src/tx_queue_send_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_send_notify(TX_QUEUE *queue_ptr, VOID (*queue_send_notify)(TX_QUEUE *notify_queue_ptr))
{
diff --git a/common/src/tx_semaphore_ceiling_put.c b/common/src/tx_semaphore_ceiling_put.c
index a72b094a..9b02e731 100644
--- a/common/src/tx_semaphore_ceiling_put.c
+++ b/common/src/tx_semaphore_ceiling_put.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling)
{
diff --git a/common/src/tx_semaphore_cleanup.c b/common/src/tx_semaphore_cleanup.c
index 512f6c60..0e3cd965 100644
--- a/common/src/tx_semaphore_cleanup.c
+++ b/common/src/tx_semaphore_cleanup.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* _tx_thread_terminate Thread terminate processing */
/* _tx_thread_wait_abort Thread wait abort processing */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_semaphore_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence)
{
diff --git a/common/src/tx_semaphore_create.c b/common/src/tx_semaphore_create.c
index 3acf3f41..849f5d3b 100644
--- a/common/src/tx_semaphore_create.c
+++ b/common/src/tx_semaphore_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count)
{
diff --git a/common/src/tx_semaphore_delete.c b/common/src/tx_semaphore_delete.c
index eee19755..8a0515a0 100644
--- a/common/src/tx_semaphore_delete.c
+++ b/common/src/tx_semaphore_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_delete(TX_SEMAPHORE *semaphore_ptr)
{
diff --git a/common/src/tx_semaphore_get.c b/common/src/tx_semaphore_get.c
index 5a471997..52802da1 100644
--- a/common/src/tx_semaphore_get.c
+++ b/common/src/tx_semaphore_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option)
{
diff --git a/common/src/tx_semaphore_info_get.c b/common/src/tx_semaphore_info_get.c
index 70e98a71..89fd9423 100644
--- a/common/src/tx_semaphore_info_get.c
+++ b/common/src/tx_semaphore_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value,
TX_THREAD **first_suspended, ULONG *suspended_count,
diff --git a/common/src/tx_semaphore_initialize.c b/common/src/tx_semaphore_initialize.c
index 84358cc5..d2b169df 100644
--- a/common/src/tx_semaphore_initialize.c
+++ b/common/src/tx_semaphore_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -97,17 +98,6 @@ ULONG _tx_semaphore_performance_timeout_count;
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* opt out of function when */
-/* TX_INLINE_INITIALIZATION is */
-/* defined, */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_semaphore_initialize(VOID)
{
diff --git a/common/src/tx_semaphore_performance_info_get.c b/common/src/tx_semaphore_performance_info_get.c
index a623705f..4c7ffa4e 100644
--- a/common/src/tx_semaphore_performance_info_get.c
+++ b/common/src/tx_semaphore_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,14 +71,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_performance_info_get(TX_SEMAPHORE *semaphore_ptr, ULONG *puts, ULONG *gets,
ULONG *suspensions, ULONG *timeouts)
diff --git a/common/src/tx_semaphore_performance_system_info_get.c b/common/src/tx_semaphore_performance_system_info_get.c
index 5245d00b..db17c937 100644
--- a/common/src/tx_semaphore_performance_system_info_get.c
+++ b/common/src/tx_semaphore_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_performance_system_info_get(ULONG *puts, ULONG *gets, ULONG *suspensions, ULONG *timeouts)
{
diff --git a/common/src/tx_semaphore_prioritize.c b/common/src/tx_semaphore_prioritize.c
index 56245df8..eec5e7b7 100644
--- a/common/src/tx_semaphore_prioritize.c
+++ b/common/src/tx_semaphore_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_prioritize(TX_SEMAPHORE *semaphore_ptr)
{
diff --git a/common/src/tx_semaphore_put.c b/common/src/tx_semaphore_put.c
index dacd0db0..1ce9d145 100644
--- a/common/src/tx_semaphore_put.c
+++ b/common/src/tx_semaphore_put.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_put(TX_SEMAPHORE *semaphore_ptr)
{
diff --git a/common/src/tx_semaphore_put_notify.c b/common/src/tx_semaphore_put_notify.c
index b1abe3be..80894d6e 100644
--- a/common/src/tx_semaphore_put_notify.c
+++ b/common/src/tx_semaphore_put_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semaphore_put_notify)(TX_SEMAPHORE *notify_semaphore_ptr))
{
diff --git a/common/src/tx_thread_create.c b/common/src/tx_thread_create.c
index 2f4d011d..026b0ada 100644
--- a/common/src/tx_thread_create.c
+++ b/common/src/tx_thread_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,24 +75,6 @@
/* Application Code */
/* _tx_timer_initialize Create system timer thread */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 William E. Lamie Modified comment(s), and */
-/* changed stack calculations */
-/* to use ALIGN_TYPE integers, */
-/* resulting in version 6.1 */
-/* 06-02-2021 William E. Lamie Modified comment(s), and */
-/* supported TX_MISRA_ENABLE, */
-/* 08-02-2021 Scott Larson Removed unneeded cast, */
-/* resulting in version 6.1.8 */
-/* 10-31-2023 Xiuwen Cai Modified comment(s), */
-/* added option for random */
-/* number stack filling, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, VOID (*entry_function)(ULONG id), ULONG entry_input,
VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold,
diff --git a/common/src/tx_thread_delete.c b/common/src/tx_thread_delete.c
index 69626c50..510f6565 100644
--- a/common/src/tx_thread_delete.c
+++ b/common/src/tx_thread_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_delete(TX_THREAD *thread_ptr)
{
diff --git a/common/src/tx_thread_entry_exit_notify.c b/common/src/tx_thread_entry_exit_notify.c
index 7d5919de..fdce25ef 100644
--- a/common/src/tx_thread_entry_exit_notify.c
+++ b/common/src/tx_thread_entry_exit_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT id))
{
diff --git a/common/src/tx_thread_identify.c b/common/src/tx_thread_identify.c
index 7808d053..86f56194 100644
--- a/common/src/tx_thread_identify.c
+++ b/common/src/tx_thread_identify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
TX_THREAD *_tx_thread_identify(VOID)
{
diff --git a/common/src/tx_thread_info_get.c b/common/src/tx_thread_info_get.c
index d9069457..740a3b95 100644
--- a/common/src/tx_thread_info_get.c
+++ b/common/src/tx_thread_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,14 +71,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count,
UINT *priority, UINT *preemption_threshold, ULONG *time_slice,
diff --git a/common/src/tx_thread_initialize.c b/common/src/tx_thread_initialize.c
index 11ddcc67..c9cfea33 100644
--- a/common/src/tx_thread_initialize.c
+++ b/common/src/tx_thread_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -48,7 +49,7 @@ TX_THREAD * _tx_thread_current_ptr;
/* Define the variable that holds the next thread to execute. It is important
- to remember that this is not necessarily equal to the current thread
+ to remember that this is not necessarily equal to the current thread
pointer. */
TX_THREAD * _tx_thread_execute_ptr;
@@ -65,7 +66,7 @@ ULONG _tx_thread_created_count;
/* Define the current state variable. When this value is 0, a thread
- is executing or the system is idle. Other values indicate that
+ is executing or the system is idle. Other values indicate that
interrupt or initialization processing is active. This variable is
initialized to TX_INITIALIZE_IN_PROGRESS to indicate initialization is
active. */
@@ -74,15 +75,15 @@ volatile ULONG _tx_thread_system_state = TX_INITIALIZE_IN_PROGRESS;
/* Define the 32-bit priority bit-maps. There is one priority bit map for each
- 32 priority levels supported. If only 32 priorities are supported there is
- only one bit map. Each bit within a priority bit map represents that one
+ 32 priority levels supported. If only 32 priorities are supported there is
+ only one bit map. Each bit within a priority bit map represents that one
or more threads at the associated thread priority are ready. */
ULONG _tx_thread_priority_maps[TX_MAX_PRIORITIES/32];
-/* Define the priority map active bit map that specifies which of the previously
- defined priority maps have something set. This is only necessary if more than
+/* Define the priority map active bit map that specifies which of the previously
+ defined priority maps have something set. This is only necessary if more than
32 priorities are supported. */
#if TX_MAX_PRIORITIES > 32
@@ -92,17 +93,17 @@ ULONG _tx_thread_priority_map_active;
#ifndef TX_DISABLE_PREEMPTION_THRESHOLD
-/* Define the 32-bit preempt priority bit maps. There is one preempt bit map
- for each 32 priority levels supported. If only 32 priorities are supported
- there is only one bit map. Each set set bit corresponds to a preempted priority
- level that had preemption-threshold active to protect against preemption of a
+/* Define the 32-bit preempt priority bit maps. There is one preempt bit map
+ for each 32 priority levels supported. If only 32 priorities are supported
+ there is only one bit map. Each set set bit corresponds to a preempted priority
+ level that had preemption-threshold active to protect against preemption of a
range of relatively higher priority threads. */
ULONG _tx_thread_preempted_maps[TX_MAX_PRIORITIES/32];
-/* Define the preempt map active bit map that specifies which of the previously
- defined preempt maps have something set. This is only necessary if more than
+/* Define the preempt map active bit map that specifies which of the previously
+ defined preempt maps have something set. This is only necessary if more than
32 priorities are supported. */
#if TX_MAX_PRIORITIES > 32
@@ -110,7 +111,7 @@ ULONG _tx_thread_preempted_map_active;
#endif
#endif
-/* Define the variable that holds the highest priority group ready for
+/* Define the variable that holds the highest priority group ready for
execution. It is important to note that this is not necessarily the same
as the priority of the thread pointed to by _tx_execute_thread. */
@@ -126,13 +127,13 @@ TX_THREAD * _tx_thread_priority_list[TX_MAX_PRIORITIES];
/* Define the global preempt disable variable. If this is non-zero, preemption is
- disabled. It is used internally by ThreadX to prevent preemption of a thread in
+ disabled. It is used internally by ThreadX to prevent preemption of a thread in
the middle of a service that is resuming or suspending another thread. */
volatile UINT _tx_thread_preempt_disable;
-/* Define the global function pointer for mutex cleanup on thread completion or
+/* Define the global function pointer for mutex cleanup on thread completion or
termination. This pointer is setup during mutex initialization. */
VOID (*_tx_thread_mutex_release)(TX_THREAD *thread_ptr);
@@ -176,8 +177,8 @@ ULONG _tx_build_options;
#if defined(TX_ENABLE_STACK_CHECKING) || defined(TX_PORT_THREAD_STACK_ERROR_HANDLING)
-/* Define the global function pointer for stack error handling. If a stack error is
- detected and the application has registered a stack error handler, it will be
+/* Define the global function pointer for stack error handling. If a stack error is
+ detected and the application has registered a stack error handler, it will be
called via this function pointer. */
VOID (*_tx_thread_application_stack_error_handler)(TX_THREAD *thread_ptr);
@@ -192,20 +193,20 @@ VOID (*_tx_thread_application_stack_error_handler)(TX_THREAD *thread_
ULONG _tx_thread_performance_resume_count;
-/* Define the total number of thread suspensions. Each time a thread enters a
+/* Define the total number of thread suspensions. Each time a thread enters a
suspended state this variable is incremented. */
ULONG _tx_thread_performance_suspend_count;
-/* Define the total number of solicited thread preemptions. Each time a thread is
+/* Define the total number of solicited thread preemptions. Each time a thread is
preempted by directly calling a ThreadX service, this variable is incremented. */
ULONG _tx_thread_performance_solicited_preemption_count;
-/* Define the total number of interrupt thread preemptions. Each time a thread is
- preempted as a result of an ISR calling a ThreadX service, this variable is
+/* Define the total number of interrupt thread preemptions. Each time a thread is
+ preempted as a result of an ISR calling a ThreadX service, this variable is
incremented. */
ULONG _tx_thread_performance_interrupt_preemption_count;
@@ -217,45 +218,45 @@ ULONG _tx_thread_performance_interrupt_preemption_count;
ULONG _tx_thread_performance_priority_inversion_count;
-/* Define the total number of time-slices. Each time a time-slice operation is
- actually performed (another thread is setup for running) this variable is
+/* Define the total number of time-slices. Each time a time-slice operation is
+ actually performed (another thread is setup for running) this variable is
incremented. */
ULONG _tx_thread_performance_time_slice_count;
-/* Define the total number of thread relinquish operations. Each time a thread
+/* Define the total number of thread relinquish operations. Each time a thread
relinquish operation is actually performed (another thread is setup for running)
this variable is incremented. */
ULONG _tx_thread_performance_relinquish_count;
-/* Define the total number of thread timeouts. Each time a thread has a
+/* Define the total number of thread timeouts. Each time a thread has a
timeout this variable is incremented. */
ULONG _tx_thread_performance_timeout_count;
-/* Define the total number of thread wait aborts. Each time a thread's suspension
+/* Define the total number of thread wait aborts. Each time a thread's suspension
is lifted by the tx_thread_wait_abort call this variable is incremented. */
ULONG _tx_thread_performance_wait_abort_count;
-/* Define the total number of idle system thread returns. Each time a thread returns to
+/* Define the total number of idle system thread returns. Each time a thread returns to
an idle system (no other thread is ready to run) this variable is incremented. */
ULONG _tx_thread_performance_idle_return_count;
-/* Define the total number of non-idle system thread returns. Each time a thread returns to
+/* Define the total number of non-idle system thread returns. Each time a thread returns to
a non-idle system (another thread is ready to run) this variable is incremented. */
ULONG _tx_thread_performance_non_idle_return_count;
-/* Define the last TX_THREAD_EXECUTE_LOG_SIZE threads scheduled in ThreadX. This
+/* Define the last TX_THREAD_EXECUTE_LOG_SIZE threads scheduled in ThreadX. This
is a circular list, where the index points to the oldest entry. */
ULONG _tx_thread_performance__execute_log_index;
@@ -266,7 +267,7 @@ TX_THREAD * _tx_thread_performance_execute_log[TX_THREAD_EXECUTE_LOG_SIZE];
/* Define special string. */
#ifndef TX_MISRA_ENABLE
-const CHAR _tx_thread_special_string[] =
+const CHAR _tx_thread_special_string[] =
"G-ML-EL-ML-BL-DL-BL-GB-GL-M-D-DL-GZ-KH-EL-CM-NH-HA-GF-DD-JC-YZ-CT-AT-DW-USA-CA-SD-SDSU";
#endif
@@ -302,25 +303,11 @@ const CHAR _tx_thread_special_string[] =
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 06-02-2021 Yuxin Zhou Modified comment(s), added */
-/* Execution Profile support, */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Yuxin Zhou Modified comment(s), improved */
-/* stack check error handling, */
-/* resulting in version 6.1.9 */
-/* */
/**************************************************************************/
VOID _tx_thread_initialize(VOID)
{
- /* Note: the system stack pointer and the system state variables are
+ /* Note: the system stack pointer and the system state variables are
initialized by the low and high-level initialization functions,
respectively. */
@@ -388,8 +375,8 @@ VOID _tx_thread_initialize(VOID)
#endif
/* Setup the build options flag. This is used to identify how the ThreadX library was constructed. */
- _tx_build_options = _tx_build_options
- | (((ULONG) (TX_MAX_PRIORITIES/32)) << 24)
+ _tx_build_options = _tx_build_options
+ | (((ULONG) (TX_MAX_PRIORITIES/32)) << 24)
#ifdef TX_NOT_INTERRUPTABLE
| (((ULONG) 1) << 31)
#endif
diff --git a/common/src/tx_thread_performance_info_get.c b/common/src/tx_thread_performance_info_get.c
index 92c0e02b..79a8c7ee 100644
--- a/common/src/tx_thread_performance_info_get.c
+++ b/common/src/tx_thread_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -87,14 +88,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_performance_info_get(TX_THREAD *thread_ptr, ULONG *resumptions, ULONG *suspensions,
ULONG *solicited_preemptions, ULONG *interrupt_preemptions, ULONG *priority_inversions,
diff --git a/common/src/tx_thread_performance_system_info_get.c b/common/src/tx_thread_performance_system_info_get.c
index a6c300aa..8ade15dd 100644
--- a/common/src/tx_thread_performance_system_info_get.c
+++ b/common/src/tx_thread_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -87,14 +88,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_performance_system_info_get(ULONG *resumptions, ULONG *suspensions,
ULONG *solicited_preemptions, ULONG *interrupt_preemptions, ULONG *priority_inversions,
diff --git a/common/src/tx_thread_preemption_change.c b/common/src/tx_thread_preemption_change.c
index cafb5792..59a37514 100644
--- a/common/src/tx_thread_preemption_change.c
+++ b/common/src/tx_thread_preemption_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_preemption_change(TX_THREAD *thread_ptr, UINT new_threshold, UINT *old_threshold)
{
diff --git a/common/src/tx_thread_priority_change.c b/common/src/tx_thread_priority_change.c
index 9e8da188..bdf2a993 100644
--- a/common/src/tx_thread_priority_change.c
+++ b/common/src/tx_thread_priority_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,19 +72,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 William E. Lamie Modified comment(s), and */
-/* change thread state from */
-/* TX_SUSPENDED to */
-/* TX_PRIORITY_CHANGE before */
-/* calling */
-/* _tx_thread_system_suspend, */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_priority_change(TX_THREAD *thread_ptr, UINT new_priority, UINT *old_priority)
{
diff --git a/common/src/tx_thread_relinquish.c b/common/src/tx_thread_relinquish.c
index 6f3a33ab..c84e4d99 100644
--- a/common/src/tx_thread_relinquish.c
+++ b/common/src/tx_thread_relinquish.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_relinquish(VOID)
{
diff --git a/common/src/tx_thread_reset.c b/common/src/tx_thread_reset.c
index 1fea78be..da56daf5 100644
--- a/common/src/tx_thread_reset.c
+++ b/common/src/tx_thread_reset.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_reset(TX_THREAD *thread_ptr)
{
diff --git a/common/src/tx_thread_resume.c b/common/src/tx_thread_resume.c
index b97bdb4b..f662be5a 100644
--- a/common/src/tx_thread_resume.c
+++ b/common/src/tx_thread_resume.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_resume(TX_THREAD *thread_ptr)
{
diff --git a/common/src/tx_thread_shell_entry.c b/common/src/tx_thread_shell_entry.c
index 161ea80e..45fe9d6d 100644
--- a/common/src/tx_thread_shell_entry.c
+++ b/common/src/tx_thread_shell_entry.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Initial thread stack frame */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_shell_entry(VOID)
{
diff --git a/common/src/tx_thread_sleep.c b/common/src/tx_thread_sleep.c
index 6d6c92c4..fd986a0b 100644
--- a/common/src/tx_thread_sleep.c
+++ b/common/src/tx_thread_sleep.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_sleep(ULONG timer_ticks)
{
diff --git a/common/src/tx_thread_stack_analyze.c b/common/src/tx_thread_stack_analyze.c
index bdadab0d..080d0052 100644
--- a/common/src/tx_thread_stack_analyze.c
+++ b/common/src/tx_thread_stack_analyze.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,14 +61,6 @@
/* */
/* ThreadX internal code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_stack_analyze(TX_THREAD *thread_ptr)
{
diff --git a/common/src/tx_thread_stack_error_handler.c b/common/src/tx_thread_stack_error_handler.c
index 6e2422ed..2a63fe4e 100644
--- a/common/src/tx_thread_stack_error_handler.c
+++ b/common/src/tx_thread_stack_error_handler.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,26 +61,6 @@
/* */
/* ThreadX internal code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* update misra support, */
-/* resulting in version 6.1 */
-/* 10-16-2020 William E. Lamie Modified comment(s), */
-/* fixed link issue, */
-/* resulting in version 6.1.1 */
-/* 06-02-2021 William E. Lamie Modified comment(s), */
-/* fixed link issue, added */
-/* conditional compilation */
-/* for ARMv8-M (Cortex M23/33) */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Yuxin Zhou Modified comment(s), improved */
-/* stack check error handling, */
-/* resulting in version 6.1.9 */
-/* */
/**************************************************************************/
VOID _tx_thread_stack_error_handler(TX_THREAD *thread_ptr)
{
diff --git a/common/src/tx_thread_stack_error_notify.c b/common/src/tx_thread_stack_error_notify.c
index 796ff460..d1c76213 100644
--- a/common/src/tx_thread_stack_error_notify.c
+++ b/common/src/tx_thread_stack_error_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,21 +67,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 06-02-2021 Yuxin Zhou Modified comment(s), added */
-/* conditional compilation */
-/* for ARMv8-M (Cortex M23/33) */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Yuxin Zhou Modified comment(s), improved */
-/* stack check error handling, */
-/* resulting in version 6.1.9 */
-/* */
/**************************************************************************/
UINT _tx_thread_stack_error_notify(VOID (*stack_error_handler)(TX_THREAD *thread_ptr))
{
diff --git a/common/src/tx_thread_suspend.c b/common/src/tx_thread_suspend.c
index ccf3ebc3..460944b6 100644
--- a/common/src/tx_thread_suspend.c
+++ b/common/src/tx_thread_suspend.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,18 +63,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 10-16-2020 Yuxin Zhou Modified comment(s), and */
-/* added type cast to address */
-/* a MISRA compliance issue, */
-/* resulting in version 6.1.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_suspend(TX_THREAD *thread_ptr)
{
diff --git a/common/src/tx_thread_system_preempt_check.c b/common/src/tx_thread_system_preempt_check.c
index 7511a02c..9dd039de 100644
--- a/common/src/tx_thread_system_preempt_check.c
+++ b/common/src/tx_thread_system_preempt_check.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,14 +61,6 @@
/* */
/* Other ThreadX Components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_system_preempt_check(VOID)
{
diff --git a/common/src/tx_thread_system_resume.c b/common/src/tx_thread_system_resume.c
index 7b9f557d..708e5e5e 100644
--- a/common/src/tx_thread_system_resume.c
+++ b/common/src/tx_thread_system_resume.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* _tx_thread_wait_abort Thread wait abort */
/* Other ThreadX Components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_system_resume(TX_THREAD *thread_ptr)
#ifndef TX_NOT_INTERRUPTABLE
diff --git a/common/src/tx_thread_system_suspend.c b/common/src/tx_thread_system_suspend.c
index 33f8cac2..4cc14f5a 100644
--- a/common/src/tx_thread_system_suspend.c
+++ b/common/src/tx_thread_system_suspend.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,14 +71,6 @@
/* _tx_thread_terminate Thread terminate */
/* Other ThreadX Components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_system_suspend(TX_THREAD *thread_ptr)
#ifndef TX_NOT_INTERRUPTABLE
diff --git a/common/src/tx_thread_terminate.c b/common/src/tx_thread_terminate.c
index 1e30687f..86e34bae 100644
--- a/common/src/tx_thread_terminate.c
+++ b/common/src/tx_thread_terminate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_terminate(TX_THREAD *thread_ptr)
{
diff --git a/common/src/tx_thread_time_slice.c b/common/src/tx_thread_time_slice.c
index 31bc45ad..129ca322 100644
--- a/common/src/tx_thread_time_slice.c
+++ b/common/src/tx_thread_time_slice.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,16 +65,6 @@
/* */
/* _tx_timer_interrupt Timer interrupt handling */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Scott Larson Modified comment(s), and */
-/* opt out of function when */
-/* TX_NO_TIMER is defined, */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_time_slice(VOID)
{
diff --git a/common/src/tx_thread_time_slice_change.c b/common/src/tx_thread_time_slice_change.c
index c15c9ae3..67a1c26b 100644
--- a/common/src/tx_thread_time_slice_change.c
+++ b/common/src/tx_thread_time_slice_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_time_slice_change(TX_THREAD *thread_ptr, ULONG new_time_slice, ULONG *old_time_slice)
{
diff --git a/common/src/tx_thread_timeout.c b/common/src/tx_thread_timeout.c
index 33ea5352..21b62e34 100644
--- a/common/src/tx_thread_timeout.c
+++ b/common/src/tx_thread_timeout.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,14 +67,6 @@
/* _tx_timer_expiration_process Timer expiration function */
/* _tx_timer_thread_entry Timer thread function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_timeout(ULONG timeout_input)
{
diff --git a/common/src/tx_thread_wait_abort.c b/common/src/tx_thread_wait_abort.c
index 372a72b2..24bce69b 100644
--- a/common/src/tx_thread_wait_abort.c
+++ b/common/src/tx_thread_wait_abort.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,17 +64,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 03-08-2023 Scott Larson Check if thread is coming out */
-/* of suspension elsewhere, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_wait_abort(TX_THREAD *thread_ptr)
{
diff --git a/common/src/tx_time_get.c b/common/src/tx_time_get.c
index 16361142..6ed7d731 100644
--- a/common/src/tx_time_get.c
+++ b/common/src/tx_time_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,16 +61,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 12-31-2020 Andres Mlinar Modified comment(s), */
-/* resulting in version 6.1.3 */
-/* */
/**************************************************************************/
ULONG _tx_time_get(VOID)
{
diff --git a/common/src/tx_time_set.c b/common/src/tx_time_set.c
index 613274ac..97b42986 100644
--- a/common/src/tx_time_set.c
+++ b/common/src/tx_time_set.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,14 +61,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_time_set(ULONG new_time)
{
diff --git a/common/src/tx_timer_activate.c b/common/src/tx_timer_activate.c
index d8609573..5a59eade 100644
--- a/common/src/tx_timer_activate.c
+++ b/common/src/tx_timer_activate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_activate(TX_TIMER *timer_ptr)
{
diff --git a/common/src/tx_timer_change.c b/common/src/tx_timer_change.c
index 420ff26a..24661d3d 100644
--- a/common/src/tx_timer_change.c
+++ b/common/src/tx_timer_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks)
{
diff --git a/common/src/tx_timer_create.c b/common/src/tx_timer_create.c
index 707e743b..30dd4e11 100644
--- a/common/src/tx_timer_create.c
+++ b/common/src/tx_timer_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr,
VOID (*expiration_function)(ULONG id), ULONG expiration_input,
diff --git a/common/src/tx_timer_deactivate.c b/common/src/tx_timer_deactivate.c
index 97c786bf..98eacd4b 100644
--- a/common/src/tx_timer_deactivate.c
+++ b/common/src/tx_timer_deactivate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_deactivate(TX_TIMER *timer_ptr)
{
diff --git a/common/src/tx_timer_delete.c b/common/src/tx_timer_delete.c
index 7baef6d4..60d425ec 100644
--- a/common/src/tx_timer_delete.c
+++ b/common/src/tx_timer_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_delete(TX_TIMER *timer_ptr)
{
diff --git a/common/src/tx_timer_expiration_process.c b/common/src/tx_timer_expiration_process.c
index 72faed11..33923a93 100644
--- a/common/src/tx_timer_expiration_process.c
+++ b/common/src/tx_timer_expiration_process.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,16 +68,6 @@
/* */
/* _tx_timer_interrupt Timer interrupt handler */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Scott Larson Modified comment(s), and */
-/* opt out of function when */
-/* TX_NO_TIMER is defined, */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_timer_expiration_process(VOID)
{
diff --git a/common/src/tx_timer_info_get.c b/common/src/tx_timer_info_get.c
index ca04c4ea..31c801f9 100644
--- a/common/src/tx_timer_info_get.c
+++ b/common/src/tx_timer_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,14 +67,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks,
ULONG *reschedule_ticks, TX_TIMER **next_timer)
diff --git a/common/src/tx_timer_initialize.c b/common/src/tx_timer_initialize.c
index 1ae442df..2172b4a6 100644
--- a/common/src/tx_timer_initialize.c
+++ b/common/src/tx_timer_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -192,14 +193,6 @@ ULONG _tx_timer_time_slice;
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_timer_initialize(VOID)
{
diff --git a/common/src/tx_timer_performance_info_get.c b/common/src/tx_timer_performance_info_get.c
index 05e332c1..37cacee4 100644
--- a/common/src/tx_timer_performance_info_get.c
+++ b/common/src/tx_timer_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -73,14 +74,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_performance_info_get(TX_TIMER *timer_ptr, ULONG *activates, ULONG *reactivates,
ULONG *deactivates, ULONG *expirations, ULONG *expiration_adjusts)
diff --git a/common/src/tx_timer_performance_system_info_get.c b/common/src/tx_timer_performance_system_info_get.c
index 367e1149..9b6c3862 100644
--- a/common/src/tx_timer_performance_system_info_get.c
+++ b/common/src/tx_timer_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,14 +71,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_performance_system_info_get(ULONG *activates, ULONG *reactivates,
ULONG *deactivates, ULONG *expirations, ULONG *expiration_adjusts)
diff --git a/common/src/tx_timer_system_activate.c b/common/src/tx_timer_system_activate.c
index 4c6f7b04..af57fdf5 100644
--- a/common/src/tx_timer_system_activate.c
+++ b/common/src/tx_timer_system_activate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,16 +65,6 @@
/* _tx_timer_thread_entry Timer thread processing */
/* _tx_timer_activate Application timer activate */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Scott Larson Modified comment(s), and */
-/* opt out of function when */
-/* TX_NO_TIMER is defined, */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_timer_system_activate(TX_TIMER_INTERNAL *timer_ptr)
{
diff --git a/common/src/tx_timer_system_deactivate.c b/common/src/tx_timer_system_deactivate.c
index 487ead9d..ae955077 100644
--- a/common/src/tx_timer_system_deactivate.c
+++ b/common/src/tx_timer_system_deactivate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* _tx_thread_system_resume Thread resume function */
/* _tx_timer_thread_entry Timer thread processing */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_timer_system_deactivate(TX_TIMER_INTERNAL *timer_ptr)
{
diff --git a/common/src/tx_timer_thread_entry.c b/common/src/tx_timer_thread_entry.c
index 33074239..971a0703 100644
--- a/common/src/tx_timer_thread_entry.c
+++ b/common/src/tx_timer_thread_entry.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* ThreadX Scheduler */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_TIMER_PROCESS_IN_ISR
VOID _tx_timer_thread_entry(ULONG timer_thread_input)
diff --git a/common/src/tx_trace_buffer_full_notify.c b/common/src/tx_trace_buffer_full_notify.c
index 9e07c0a3..7253e8a4 100644
--- a/common/src/tx_trace_buffer_full_notify.c
+++ b/common/src/tx_trace_buffer_full_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_trace_buffer_full_notify(VOID (*full_buffer_callback)(VOID *buffer))
{
diff --git a/common/src/tx_trace_disable.c b/common/src/tx_trace_disable.c
index 1ef211e0..96c28740 100644
--- a/common/src/tx_trace_disable.c
+++ b/common/src/tx_trace_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_trace_disable(VOID)
{
diff --git a/common/src/tx_trace_enable.c b/common/src/tx_trace_enable.c
index aa372e8d..2fb1252c 100644
--- a/common/src/tx_trace_enable.c
+++ b/common/src/tx_trace_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -73,14 +74,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_trace_enable(VOID *trace_buffer_start, ULONG trace_buffer_size, ULONG registry_entries)
{
diff --git a/common/src/tx_trace_event_filter.c b/common/src/tx_trace_event_filter.c
index 3afb8ed5..9caf18ae 100644
--- a/common/src/tx_trace_event_filter.c
+++ b/common/src/tx_trace_event_filter.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_trace_event_filter(ULONG event_filter_bits)
{
diff --git a/common/src/tx_trace_event_unfilter.c b/common/src/tx_trace_event_unfilter.c
index f9d054d7..652e4143 100644
--- a/common/src/tx_trace_event_unfilter.c
+++ b/common/src/tx_trace_event_unfilter.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_trace_event_unfilter(ULONG event_unfilter_bits)
{
diff --git a/common/src/tx_trace_initialize.c b/common/src/tx_trace_initialize.c
index 14877b9c..5cec8eae 100644
--- a/common/src/tx_trace_initialize.c
+++ b/common/src/tx_trace_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -125,14 +126,6 @@ ULONG _tx_trace_registry_search_start;
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_trace_initialize(VOID)
{
diff --git a/common/src/tx_trace_interrupt_control.c b/common/src/tx_trace_interrupt_control.c
index 595dff77..2e35c62d 100644
--- a/common/src/tx_trace_interrupt_control.c
+++ b/common/src/tx_trace_interrupt_control.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,14 +61,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_trace_interrupt_control(UINT new_posture)
{
diff --git a/common/src/tx_trace_isr_enter_insert.c b/common/src/tx_trace_isr_enter_insert.c
index 628cc8ff..f9971cf2 100644
--- a/common/src/tx_trace_isr_enter_insert.c
+++ b/common/src/tx_trace_isr_enter_insert.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_trace_isr_enter_insert(ULONG isr_id)
{
diff --git a/common/src/tx_trace_isr_exit_insert.c b/common/src/tx_trace_isr_exit_insert.c
index 0d743c19..a4a8ade8 100644
--- a/common/src/tx_trace_isr_exit_insert.c
+++ b/common/src/tx_trace_isr_exit_insert.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_trace_isr_exit_insert(ULONG isr_id)
{
diff --git a/common/src/tx_trace_object_register.c b/common/src/tx_trace_object_register.c
index 0805063d..f7cd4a4a 100644
--- a/common/src/tx_trace_object_register.c
+++ b/common/src/tx_trace_object_register.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,17 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 07-29-2022 Scott Larson Modified comment(s), */
-/* check for null name, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, CHAR *object_name, ULONG parameter_1, ULONG parameter_2)
{
diff --git a/common/src/tx_trace_object_unregister.c b/common/src/tx_trace_object_unregister.c
index a7fef275..2166c973 100644
--- a/common/src/tx_trace_object_unregister.c
+++ b/common/src/tx_trace_object_unregister.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_trace_object_unregister(VOID *object_ptr)
{
diff --git a/common/src/tx_trace_user_event_insert.c b/common/src/tx_trace_user_event_insert.c
index fda09610..787a55f0 100644
--- a/common/src/tx_trace_user_event_insert.c
+++ b/common/src/tx_trace_user_event_insert.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_trace_user_event_insert(ULONG event_id, ULONG info_field_1, ULONG info_field_2, ULONG info_field_3, ULONG info_field_4)
{
diff --git a/common/src/txe_block_allocate.c b/common/src/txe_block_allocate.c
index 5564354b..c9c7a1a8 100644
--- a/common/src/txe_block_allocate.c
+++ b/common/src/txe_block_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option)
{
diff --git a/common/src/txe_block_pool_create.c b/common/src/txe_block_pool_create.c
index 8cbeadbd..08ef7e69 100644
--- a/common/src/txe_block_pool_create.c
+++ b/common/src/txe_block_pool_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,14 +73,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size,
VOID *pool_start, ULONG pool_size, UINT pool_control_block_size)
diff --git a/common/src/txe_block_pool_delete.c b/common/src/txe_block_pool_delete.c
index 844ff57a..f9af71cb 100644
--- a/common/src/txe_block_pool_delete.c
+++ b/common/src/txe_block_pool_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_block_pool_delete(TX_BLOCK_POOL *pool_ptr)
{
diff --git a/common/src/txe_block_pool_info_get.c b/common/src/txe_block_pool_info_get.c
index 77d9df4a..f91ca206 100644
--- a/common/src/txe_block_pool_info_get.c
+++ b/common/src/txe_block_pool_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks,
ULONG *total_blocks, TX_THREAD **first_suspended,
diff --git a/common/src/txe_block_pool_prioritize.c b/common/src/txe_block_pool_prioritize.c
index 593ac6dc..87742011 100644
--- a/common/src/txe_block_pool_prioritize.c
+++ b/common/src/txe_block_pool_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_block_pool_prioritize(TX_BLOCK_POOL *pool_ptr)
{
diff --git a/common/src/txe_block_release.c b/common/src/txe_block_release.c
index e7eaed24..ba63d0b6 100644
--- a/common/src/txe_block_release.c
+++ b/common/src/txe_block_release.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_block_release(VOID *block_ptr)
{
diff --git a/common/src/txe_byte_allocate.c b/common/src/txe_byte_allocate.c
index dbb3937e..dacbede9 100644
--- a/common/src/txe_byte_allocate.c
+++ b/common/src/txe_byte_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,14 +71,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr,
ULONG memory_size, ULONG wait_option)
diff --git a/common/src/txe_byte_pool_create.c b/common/src/txe_byte_pool_create.c
index 2f37d063..99a89698 100644
--- a/common/src/txe_byte_pool_create.c
+++ b/common/src/txe_byte_pool_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,14 +72,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size)
{
diff --git a/common/src/txe_byte_pool_delete.c b/common/src/txe_byte_pool_delete.c
index 2a6baad2..6bbeb8f0 100644
--- a/common/src/txe_byte_pool_delete.c
+++ b/common/src/txe_byte_pool_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_byte_pool_delete(TX_BYTE_POOL *pool_ptr)
{
diff --git a/common/src/txe_byte_pool_info_get.c b/common/src/txe_byte_pool_info_get.c
index 0a7536ef..85e7a233 100644
--- a/common/src/txe_byte_pool_info_get.c
+++ b/common/src/txe_byte_pool_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes,
ULONG *fragments, TX_THREAD **first_suspended,
diff --git a/common/src/txe_byte_pool_prioritize.c b/common/src/txe_byte_pool_prioritize.c
index a0f0f1ae..9acec73c 100644
--- a/common/src/txe_byte_pool_prioritize.c
+++ b/common/src/txe_byte_pool_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_byte_pool_prioritize(TX_BYTE_POOL *pool_ptr)
{
diff --git a/common/src/txe_byte_release.c b/common/src/txe_byte_release.c
index 67f91907..89c3a82b 100644
--- a/common/src/txe_byte_release.c
+++ b/common/src/txe_byte_release.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_byte_release(VOID *memory_ptr)
{
diff --git a/common/src/txe_event_flags_create.c b/common/src/txe_event_flags_create.c
index 4c71bd95..4e3fed77 100644
--- a/common/src/txe_event_flags_create.c
+++ b/common/src/txe_event_flags_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size)
{
diff --git a/common/src/txe_event_flags_delete.c b/common/src/txe_event_flags_delete.c
index 66066276..23c04807 100644
--- a/common/src/txe_event_flags_delete.c
+++ b/common/src/txe_event_flags_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr)
{
diff --git a/common/src/txe_event_flags_get.c b/common/src/txe_event_flags_get.c
index 23767630..1e9c6e0c 100644
--- a/common/src/txe_event_flags_get.c
+++ b/common/src/txe_event_flags_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,14 +72,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags,
UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option)
diff --git a/common/src/txe_event_flags_info_get.c b/common/src/txe_event_flags_info_get.c
index 3400c55e..e551d025 100644
--- a/common/src/txe_event_flags_info_get.c
+++ b/common/src/txe_event_flags_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,14 +71,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags,
TX_THREAD **first_suspended, ULONG *suspended_count,
diff --git a/common/src/txe_event_flags_set.c b/common/src/txe_event_flags_set.c
index 03d309ab..4df57fad 100644
--- a/common/src/txe_event_flags_set.c
+++ b/common/src/txe_event_flags_set.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_set(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG flags_to_set, UINT set_option)
{
diff --git a/common/src/txe_event_flags_set_notify.c b/common/src/txe_event_flags_set_notify.c
index f93963d3..51887fd7 100644
--- a/common/src/txe_event_flags_set_notify.c
+++ b/common/src/txe_event_flags_set_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_set_notify(TX_EVENT_FLAGS_GROUP *group_ptr, VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *notify_group_ptr))
{
diff --git a/common/src/txe_mutex_create.c b/common/src/txe_mutex_create.c
index fb65a5be..392f8b0e 100644
--- a/common/src/txe_mutex_create.c
+++ b/common/src/txe_mutex_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -69,14 +70,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size)
{
diff --git a/common/src/txe_mutex_delete.c b/common/src/txe_mutex_delete.c
index b2a3fd2b..3692bf89 100644
--- a/common/src/txe_mutex_delete.c
+++ b/common/src/txe_mutex_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_mutex_delete(TX_MUTEX *mutex_ptr)
{
diff --git a/common/src/txe_mutex_get.c b/common/src/txe_mutex_get.c
index 7ef04eef..2d457c82 100644
--- a/common/src/txe_mutex_get.c
+++ b/common/src/txe_mutex_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,14 +67,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option)
{
diff --git a/common/src/txe_mutex_info_get.c b/common/src/txe_mutex_info_get.c
index 826fead1..f4ef4168 100644
--- a/common/src/txe_mutex_info_get.c
+++ b/common/src/txe_mutex_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -69,14 +70,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner,
TX_THREAD **first_suspended, ULONG *suspended_count,
diff --git a/common/src/txe_mutex_prioritize.c b/common/src/txe_mutex_prioritize.c
index 9ae4b868..d3302c1c 100644
--- a/common/src/txe_mutex_prioritize.c
+++ b/common/src/txe_mutex_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_mutex_prioritize(TX_MUTEX *mutex_ptr)
{
diff --git a/common/src/txe_mutex_put.c b/common/src/txe_mutex_put.c
index 85d5929f..8a085b7b 100644
--- a/common/src/txe_mutex_put.c
+++ b/common/src/txe_mutex_put.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_mutex_put(TX_MUTEX *mutex_ptr)
{
diff --git a/common/src/txe_queue_create.c b/common/src/txe_queue_create.c
index 68d3540a..185289fe 100644
--- a/common/src/txe_queue_create.c
+++ b/common/src/txe_queue_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,14 +71,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size,
VOID *queue_start, ULONG queue_size, UINT queue_control_block_size)
@@ -178,8 +171,8 @@ TX_THREAD *thread_ptr;
status = TX_SIZE_ERROR;
}
- /* Check for an invalid message size - greater than 16. */
- else if (message_size > TX_16_ULONG)
+ /* Check for an invalid message size - greater than TX_QUEUE_MESSAGE_MAX_SIZE 16 by default. */
+ else if (message_size > TX_QUEUE_MESSAGE_MAX_SIZE)
{
/* Invalid message size specified. */
diff --git a/common/src/txe_queue_delete.c b/common/src/txe_queue_delete.c
index 3062edeb..43dc9d6f 100644
--- a/common/src/txe_queue_delete.c
+++ b/common/src/txe_queue_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_delete(TX_QUEUE *queue_ptr)
{
diff --git a/common/src/txe_queue_flush.c b/common/src/txe_queue_flush.c
index 348de23e..b514db95 100644
--- a/common/src/txe_queue_flush.c
+++ b/common/src/txe_queue_flush.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,14 +61,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_flush(TX_QUEUE *queue_ptr)
{
diff --git a/common/src/txe_queue_front_send.c b/common/src/txe_queue_front_send.c
index 21c254ab..798aada6 100644
--- a/common/src/txe_queue_front_send.c
+++ b/common/src/txe_queue_front_send.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option)
{
diff --git a/common/src/txe_queue_info_get.c b/common/src/txe_queue_info_get.c
index b4507b01..78d98392 100644
--- a/common/src/txe_queue_info_get.c
+++ b/common/src/txe_queue_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage,
TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue)
diff --git a/common/src/txe_queue_prioritize.c b/common/src/txe_queue_prioritize.c
index f74809a1..ba40b02a 100644
--- a/common/src/txe_queue_prioritize.c
+++ b/common/src/txe_queue_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_prioritize(TX_QUEUE *queue_ptr)
{
diff --git a/common/src/txe_queue_receive.c b/common/src/txe_queue_receive.c
index b40e6a56..de6f4dcd 100644
--- a/common/src/txe_queue_receive.c
+++ b/common/src/txe_queue_receive.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_receive(TX_QUEUE *queue_ptr, VOID *destination_ptr, ULONG wait_option)
{
diff --git a/common/src/txe_queue_send.c b/common/src/txe_queue_send.c
index 5873f025..1b752e75 100644
--- a/common/src/txe_queue_send.c
+++ b/common/src/txe_queue_send.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option)
{
diff --git a/common/src/txe_queue_send_notify.c b/common/src/txe_queue_send_notify.c
index 9ffb0a93..dd2beaf2 100644
--- a/common/src/txe_queue_send_notify.c
+++ b/common/src/txe_queue_send_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_send_notify(TX_QUEUE *queue_ptr, VOID (*queue_send_notify)(TX_QUEUE *notify_queue_ptr))
{
diff --git a/common/src/txe_semaphore_ceiling_put.c b/common/src/txe_semaphore_ceiling_put.c
index 51fee9d7..4c8b4603 100644
--- a/common/src/txe_semaphore_ceiling_put.c
+++ b/common/src/txe_semaphore_ceiling_put.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling)
{
diff --git a/common/src/txe_semaphore_create.c b/common/src/txe_semaphore_create.c
index 3390491c..a190b03c 100644
--- a/common/src/txe_semaphore_create.c
+++ b/common/src/txe_semaphore_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size)
{
diff --git a/common/src/txe_semaphore_delete.c b/common/src/txe_semaphore_delete.c
index 2083a22a..3d9f366c 100644
--- a/common/src/txe_semaphore_delete.c
+++ b/common/src/txe_semaphore_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_delete(TX_SEMAPHORE *semaphore_ptr)
{
diff --git a/common/src/txe_semaphore_get.c b/common/src/txe_semaphore_get.c
index 403d43b4..7b92d317 100644
--- a/common/src/txe_semaphore_get.c
+++ b/common/src/txe_semaphore_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option)
{
diff --git a/common/src/txe_semaphore_info_get.c b/common/src/txe_semaphore_info_get.c
index 142bad37..7695028e 100644
--- a/common/src/txe_semaphore_info_get.c
+++ b/common/src/txe_semaphore_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value,
TX_THREAD **first_suspended, ULONG *suspended_count,
diff --git a/common/src/txe_semaphore_prioritize.c b/common/src/txe_semaphore_prioritize.c
index 52525ded..cd873c5a 100644
--- a/common/src/txe_semaphore_prioritize.c
+++ b/common/src/txe_semaphore_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_prioritize(TX_SEMAPHORE *semaphore_ptr)
{
diff --git a/common/src/txe_semaphore_put.c b/common/src/txe_semaphore_put.c
index 4a26fbd8..452c39bd 100644
--- a/common/src/txe_semaphore_put.c
+++ b/common/src/txe_semaphore_put.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_put(TX_SEMAPHORE *semaphore_ptr)
{
diff --git a/common/src/txe_semaphore_put_notify.c b/common/src/txe_semaphore_put_notify.c
index 646c293a..33aa8d9a 100644
--- a/common/src/txe_semaphore_put_notify.c
+++ b/common/src/txe_semaphore_put_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semaphore_put_notify)(TX_SEMAPHORE *notify_semaphore_ptr))
{
diff --git a/common/src/txe_thread_create.c b/common/src/txe_thread_create.c
index c3902cd1..d319bc9e 100644
--- a/common/src/txe_thread_create.c
+++ b/common/src/txe_thread_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,14 +78,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr,
VOID (*entry_function)(ULONG id), ULONG entry_input,
diff --git a/common/src/txe_thread_delete.c b/common/src/txe_thread_delete.c
index 6e2d1d2b..85cf31ca 100644
--- a/common/src/txe_thread_delete.c
+++ b/common/src/txe_thread_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,14 +61,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_delete(TX_THREAD *thread_ptr)
{
diff --git a/common/src/txe_thread_entry_exit_notify.c b/common/src/txe_thread_entry_exit_notify.c
index ab4e835d..33420683 100644
--- a/common/src/txe_thread_entry_exit_notify.c
+++ b/common/src/txe_thread_entry_exit_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type))
{
diff --git a/common/src/txe_thread_info_get.c b/common/src/txe_thread_info_get.c
index 17f9155d..ad1db3f7 100644
--- a/common/src/txe_thread_info_get.c
+++ b/common/src/txe_thread_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,14 +73,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count,
UINT *priority, UINT *preemption_threshold, ULONG *time_slice,
diff --git a/common/src/txe_thread_preemption_change.c b/common/src/txe_thread_preemption_change.c
index c0cfa91e..e3de0a85 100644
--- a/common/src/txe_thread_preemption_change.c
+++ b/common/src/txe_thread_preemption_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_preemption_change(TX_THREAD *thread_ptr, UINT new_threshold, UINT *old_threshold)
{
diff --git a/common/src/txe_thread_priority_change.c b/common/src/txe_thread_priority_change.c
index b4a1224b..2bf0058b 100644
--- a/common/src/txe_thread_priority_change.c
+++ b/common/src/txe_thread_priority_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_priority_change(TX_THREAD *thread_ptr, UINT new_priority, UINT *old_priority)
{
diff --git a/common/src/txe_thread_relinquish.c b/common/src/txe_thread_relinquish.c
index 1c5ab21a..080bad47 100644
--- a/common/src/txe_thread_relinquish.c
+++ b/common/src/txe_thread_relinquish.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _txe_thread_relinquish(VOID)
{
diff --git a/common/src/txe_thread_reset.c b/common/src/txe_thread_reset.c
index 4fed5e7a..1815f5bb 100644
--- a/common/src/txe_thread_reset.c
+++ b/common/src/txe_thread_reset.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_reset(TX_THREAD *thread_ptr)
{
diff --git a/common/src/txe_thread_resume.c b/common/src/txe_thread_resume.c
index e8a341dd..ae356c6c 100644
--- a/common/src/txe_thread_resume.c
+++ b/common/src/txe_thread_resume.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_resume(TX_THREAD *thread_ptr)
{
diff --git a/common/src/txe_thread_suspend.c b/common/src/txe_thread_suspend.c
index 951d35eb..dab42db7 100644
--- a/common/src/txe_thread_suspend.c
+++ b/common/src/txe_thread_suspend.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_suspend(TX_THREAD *thread_ptr)
{
diff --git a/common/src/txe_thread_terminate.c b/common/src/txe_thread_terminate.c
index aa54501c..8e1f18f5 100644
--- a/common/src/txe_thread_terminate.c
+++ b/common/src/txe_thread_terminate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_terminate(TX_THREAD *thread_ptr)
{
diff --git a/common/src/txe_thread_time_slice_change.c b/common/src/txe_thread_time_slice_change.c
index d01137d8..456dbb2a 100644
--- a/common/src/txe_thread_time_slice_change.c
+++ b/common/src/txe_thread_time_slice_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_time_slice_change(TX_THREAD *thread_ptr, ULONG new_time_slice, ULONG *old_time_slice)
{
diff --git a/common/src/txe_thread_wait_abort.c b/common/src/txe_thread_wait_abort.c
index 8132c597..086fb33b 100644
--- a/common/src/txe_thread_wait_abort.c
+++ b/common/src/txe_thread_wait_abort.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_wait_abort(TX_THREAD *thread_ptr)
{
diff --git a/common/src/txe_timer_activate.c b/common/src/txe_timer_activate.c
index 9bd62341..094eda85 100644
--- a/common/src/txe_timer_activate.c
+++ b/common/src/txe_timer_activate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_timer_activate(TX_TIMER *timer_ptr)
{
diff --git a/common/src/txe_timer_change.c b/common/src/txe_timer_change.c
index 70a7ed0d..ef503ffa 100644
--- a/common/src/txe_timer_change.c
+++ b/common/src/txe_timer_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,14 +67,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks)
{
diff --git a/common/src/txe_timer_create.c b/common/src/txe_timer_create.c
index 553418bf..02cf7c1a 100644
--- a/common/src/txe_timer_create.c
+++ b/common/src/txe_timer_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,14 +73,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr,
VOID (*expiration_function)(ULONG id), ULONG expiration_input,
diff --git a/common/src/txe_timer_deactivate.c b/common/src/txe_timer_deactivate.c
index a5736919..d44ba67b 100644
--- a/common/src/txe_timer_deactivate.c
+++ b/common/src/txe_timer_deactivate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,14 +61,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_timer_deactivate(TX_TIMER *timer_ptr)
{
diff --git a/common/src/txe_timer_delete.c b/common/src/txe_timer_delete.c
index 3a1bf33c..e94ba4d6 100644
--- a/common/src/txe_timer_delete.c
+++ b/common/src/txe_timer_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_timer_delete(TX_TIMER *timer_ptr)
{
diff --git a/common/src/txe_timer_info_get.c b/common/src/txe_timer_info_get.c
index a227f137..16ac5f64 100644
--- a/common/src/txe_timer_info_get.c
+++ b/common/src/txe_timer_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks,
ULONG *reschedule_ticks, TX_TIMER **next_timer)
diff --git a/common_modules/inc/txm_module.h b/common_modules/inc/txm_module.h
index d8c714f9..88f79d9e 100644
--- a/common_modules/inc/txm_module.h
+++ b/common_modules/inc/txm_module.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -35,18 +36,6 @@
/* This file defines the basic module constants, interface structures, */
/* and function prototypes. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 12-31-2020 Scott Larson Modified comment(s), added */
-/* port-specific extension, */
-/* resulting in version 6.1.3 */
-/* 01-31-2022 Scott Larson Modified comment(s), added */
-/* callback thread prototype, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TXM_MODULE_H
diff --git a/common_modules/inc/txm_module_user_sample.h b/common_modules/inc/txm_module_user_sample.h
index e480fc1d..889e0b91 100644
--- a/common_modules/inc/txm_module_user_sample.h
+++ b/common_modules/inc/txm_module_user_sample.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,15 +40,6 @@
/* the command line when building Modules library and application */
/* objects. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED defines, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TXM_MODULE_USER_H
diff --git a/common_modules/module_lib/src/txm_block_allocate.c b/common_modules/module_lib/src/txm_block_allocate.c
index 0a98d1b8..4ab3983f 100644
--- a/common_modules/module_lib/src/txm_block_allocate.c
+++ b/common_modules/module_lib/src/txm_block_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option)
{
diff --git a/common_modules/module_lib/src/txm_block_pool_create.c b/common_modules/module_lib/src/txm_block_pool_create.c
index d4b33e2b..90838e3b 100644
--- a/common_modules/module_lib/src/txm_block_pool_create.c
+++ b/common_modules/module_lib/src/txm_block_pool_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,15 +63,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size)
{
diff --git a/common_modules/module_lib/src/txm_block_pool_delete.c b/common_modules/module_lib/src/txm_block_pool_delete.c
index b32f144e..aa146b8b 100644
--- a/common_modules/module_lib/src/txm_block_pool_delete.c
+++ b/common_modules/module_lib/src/txm_block_pool_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_block_pool_delete(TX_BLOCK_POOL *pool_ptr)
{
diff --git a/common_modules/module_lib/src/txm_block_pool_info_get.c b/common_modules/module_lib/src/txm_block_pool_info_get.c
index ef61b698..fa4ea686 100644
--- a/common_modules/module_lib/src/txm_block_pool_info_get.c
+++ b/common_modules/module_lib/src/txm_block_pool_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,15 +63,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks, ULONG *total_blocks, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BLOCK_POOL **next_pool)
{
diff --git a/common_modules/module_lib/src/txm_block_pool_performance_info_get.c b/common_modules/module_lib/src/txm_block_pool_performance_info_get.c
index 8df0375b..2c2db6b1 100644
--- a/common_modules/module_lib/src/txm_block_pool_performance_info_get.c
+++ b/common_modules/module_lib/src/txm_block_pool_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,15 +62,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_block_pool_performance_info_get(TX_BLOCK_POOL *pool_ptr, ULONG *allocates, ULONG *releases, ULONG *suspensions, ULONG *timeouts)
{
diff --git a/common_modules/module_lib/src/txm_block_pool_performance_system_info_get.c b/common_modules/module_lib/src/txm_block_pool_performance_system_info_get.c
index 48c1771b..ca395c31 100644
--- a/common_modules/module_lib/src/txm_block_pool_performance_system_info_get.c
+++ b/common_modules/module_lib/src/txm_block_pool_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_block_pool_performance_system_info_get(ULONG *allocates, ULONG *releases, ULONG *suspensions, ULONG *timeouts)
{
diff --git a/common_modules/module_lib/src/txm_block_pool_prioritize.c b/common_modules/module_lib/src/txm_block_pool_prioritize.c
index 467b4574..1b3fc2b4 100644
--- a/common_modules/module_lib/src/txm_block_pool_prioritize.c
+++ b/common_modules/module_lib/src/txm_block_pool_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -52,15 +53,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_block_pool_prioritize(TX_BLOCK_POOL *pool_ptr)
{
diff --git a/common_modules/module_lib/src/txm_block_release.c b/common_modules/module_lib/src/txm_block_release.c
index 892257cb..0d02f83f 100644
--- a/common_modules/module_lib/src/txm_block_release.c
+++ b/common_modules/module_lib/src/txm_block_release.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,15 +54,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_block_release(VOID *block_ptr)
{
diff --git a/common_modules/module_lib/src/txm_byte_allocate.c b/common_modules/module_lib/src/txm_byte_allocate.c
index 7ce96bd7..acb88e9c 100644
--- a/common_modules/module_lib/src/txm_byte_allocate.c
+++ b/common_modules/module_lib/src/txm_byte_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,15 +62,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option)
{
diff --git a/common_modules/module_lib/src/txm_byte_pool_create.c b/common_modules/module_lib/src/txm_byte_pool_create.c
index d37d7aeb..d7775e3f 100644
--- a/common_modules/module_lib/src/txm_byte_pool_create.c
+++ b/common_modules/module_lib/src/txm_byte_pool_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,15 +62,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size)
{
diff --git a/common_modules/module_lib/src/txm_byte_pool_delete.c b/common_modules/module_lib/src/txm_byte_pool_delete.c
index 5cd7237b..c7413635 100644
--- a/common_modules/module_lib/src/txm_byte_pool_delete.c
+++ b/common_modules/module_lib/src/txm_byte_pool_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_byte_pool_delete(TX_BYTE_POOL *pool_ptr)
{
diff --git a/common_modules/module_lib/src/txm_byte_pool_info_get.c b/common_modules/module_lib/src/txm_byte_pool_info_get.c
index f2d2bb81..1ad38f48 100644
--- a/common_modules/module_lib/src/txm_byte_pool_info_get.c
+++ b/common_modules/module_lib/src/txm_byte_pool_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,15 +63,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes, ULONG *fragments, TX_THREAD **first_suspended, ULONG *suspended_count, TX_BYTE_POOL **next_pool)
{
diff --git a/common_modules/module_lib/src/txm_byte_pool_performance_info_get.c b/common_modules/module_lib/src/txm_byte_pool_performance_info_get.c
index d0baf652..9c23d749 100644
--- a/common_modules/module_lib/src/txm_byte_pool_performance_info_get.c
+++ b/common_modules/module_lib/src/txm_byte_pool_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -69,15 +70,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_byte_pool_performance_info_get(TX_BYTE_POOL *pool_ptr, ULONG *allocates, ULONG *releases, ULONG *fragments_searched, ULONG *merges, ULONG *splits, ULONG *suspensions, ULONG *timeouts)
{
diff --git a/common_modules/module_lib/src/txm_byte_pool_performance_system_info_get.c b/common_modules/module_lib/src/txm_byte_pool_performance_system_info_get.c
index 806c283a..c9d92fa8 100644
--- a/common_modules/module_lib/src/txm_byte_pool_performance_system_info_get.c
+++ b/common_modules/module_lib/src/txm_byte_pool_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,15 +68,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_byte_pool_performance_system_info_get(ULONG *allocates, ULONG *releases, ULONG *fragments_searched, ULONG *merges, ULONG *splits, ULONG *suspensions, ULONG *timeouts)
{
diff --git a/common_modules/module_lib/src/txm_byte_pool_prioritize.c b/common_modules/module_lib/src/txm_byte_pool_prioritize.c
index 261679f7..6b1a47d4 100644
--- a/common_modules/module_lib/src/txm_byte_pool_prioritize.c
+++ b/common_modules/module_lib/src/txm_byte_pool_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -52,15 +53,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_byte_pool_prioritize(TX_BYTE_POOL *pool_ptr)
{
diff --git a/common_modules/module_lib/src/txm_byte_release.c b/common_modules/module_lib/src/txm_byte_release.c
index 54d57b95..aef10b3e 100644
--- a/common_modules/module_lib/src/txm_byte_release.c
+++ b/common_modules/module_lib/src/txm_byte_release.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,15 +55,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_byte_release(VOID *memory_ptr)
{
diff --git a/common_modules/module_lib/src/txm_event_flags_create.c b/common_modules/module_lib/src/txm_event_flags_create.c
index 482cff18..76f1fe31 100644
--- a/common_modules/module_lib/src/txm_event_flags_create.c
+++ b/common_modules/module_lib/src/txm_event_flags_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,15 +59,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size)
{
diff --git a/common_modules/module_lib/src/txm_event_flags_delete.c b/common_modules/module_lib/src/txm_event_flags_delete.c
index 1b347c22..8ddbe611 100644
--- a/common_modules/module_lib/src/txm_event_flags_delete.c
+++ b/common_modules/module_lib/src/txm_event_flags_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr)
{
diff --git a/common_modules/module_lib/src/txm_event_flags_get.c b/common_modules/module_lib/src/txm_event_flags_get.c
index e8b0e5bf..5c1e2b6f 100644
--- a/common_modules/module_lib/src/txm_event_flags_get.c
+++ b/common_modules/module_lib/src/txm_event_flags_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,15 +64,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags, UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option)
{
diff --git a/common_modules/module_lib/src/txm_event_flags_info_get.c b/common_modules/module_lib/src/txm_event_flags_info_get.c
index 3fac9791..eedcce1f 100644
--- a/common_modules/module_lib/src/txm_event_flags_info_get.c
+++ b/common_modules/module_lib/src/txm_event_flags_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,15 +64,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags, TX_THREAD **first_suspended, ULONG *suspended_count, TX_EVENT_FLAGS_GROUP **next_group)
{
diff --git a/common_modules/module_lib/src/txm_event_flags_performance_info_get.c b/common_modules/module_lib/src/txm_event_flags_performance_info_get.c
index febcc5a6..1aac708c 100644
--- a/common_modules/module_lib/src/txm_event_flags_performance_info_get.c
+++ b/common_modules/module_lib/src/txm_event_flags_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,15 +63,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_performance_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG *sets, ULONG *gets, ULONG *suspensions, ULONG *timeouts)
{
diff --git a/common_modules/module_lib/src/txm_event_flags_performance_system_info_get.c b/common_modules/module_lib/src/txm_event_flags_performance_system_info_get.c
index ff07989e..bb0230ee 100644
--- a/common_modules/module_lib/src/txm_event_flags_performance_system_info_get.c
+++ b/common_modules/module_lib/src/txm_event_flags_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_performance_system_info_get(ULONG *sets, ULONG *gets, ULONG *suspensions, ULONG *timeouts)
{
diff --git a/common_modules/module_lib/src/txm_event_flags_set.c b/common_modules/module_lib/src/txm_event_flags_set.c
index 20999272..6c5e155e 100644
--- a/common_modules/module_lib/src/txm_event_flags_set.c
+++ b/common_modules/module_lib/src/txm_event_flags_set.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,15 +59,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_set(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG flags_to_set, UINT set_option)
{
diff --git a/common_modules/module_lib/src/txm_event_flags_set_notify.c b/common_modules/module_lib/src/txm_event_flags_set_notify.c
index 8564c847..84c8b6ce 100644
--- a/common_modules/module_lib/src/txm_event_flags_set_notify.c
+++ b/common_modules/module_lib/src/txm_event_flags_set_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_set_notify(TX_EVENT_FLAGS_GROUP *group_ptr, VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *))
{
diff --git a/common_modules/module_lib/src/txm_module_application_request.c b/common_modules/module_lib/src/txm_module_application_request.c
index 1c452767..3c65c080 100644
--- a/common_modules/module_lib/src/txm_module_application_request.c
+++ b/common_modules/module_lib/src/txm_module_application_request.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT txm_module_application_request(ULONG request, ALIGN_TYPE param_1, ALIGN_TYPE param_2, ALIGN_TYPE param_3)
{
diff --git a/common_modules/module_lib/src/txm_module_callback_request_thread_entry.c b/common_modules/module_lib/src/txm_module_callback_request_thread_entry.c
index 16015755..cf030f92 100644
--- a/common_modules/module_lib/src/txm_module_callback_request_thread_entry.c
+++ b/common_modules/module_lib/src/txm_module_callback_request_thread_entry.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -73,15 +74,6 @@ extern TXM_MODULE_THREAD_ENTRY_INFO *_txm_module_entry_info;
/* */
/* Initial thread stack frame */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _txm_module_callback_request_thread_entry(ULONG id)
{
diff --git a/common_modules/module_lib/src/txm_module_object_allocate.c b/common_modules/module_lib/src/txm_module_object_allocate.c
index 40d548fb..2cf169d5 100644
--- a/common_modules/module_lib/src/txm_module_object_allocate.c
+++ b/common_modules/module_lib/src/txm_module_object_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,15 +59,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txm_module_object_allocate(VOID **object_ptr, ULONG object_size)
{
diff --git a/common_modules/module_lib/src/txm_module_object_deallocate.c b/common_modules/module_lib/src/txm_module_object_deallocate.c
index 100c4e9f..c0ffb097 100644
--- a/common_modules/module_lib/src/txm_module_object_deallocate.c
+++ b/common_modules/module_lib/src/txm_module_object_deallocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -52,15 +53,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txm_module_object_deallocate(VOID *object_ptr)
{
diff --git a/common_modules/module_lib/src/txm_module_object_pointer_get.c b/common_modules/module_lib/src/txm_module_object_pointer_get.c
index 921d0fa9..6417457a 100644
--- a/common_modules/module_lib/src/txm_module_object_pointer_get.c
+++ b/common_modules/module_lib/src/txm_module_object_pointer_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,15 +69,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txm_module_object_pointer_get(UINT object_type, CHAR *name, VOID **object_ptr)
{
diff --git a/common_modules/module_lib/src/txm_module_object_pointer_get_extended.c b/common_modules/module_lib/src/txm_module_object_pointer_get_extended.c
index 87d986aa..b820cf1d 100644
--- a/common_modules/module_lib/src/txm_module_object_pointer_get_extended.c
+++ b/common_modules/module_lib/src/txm_module_object_pointer_get_extended.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,15 +72,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txm_module_object_pointer_get_extended(UINT object_type, CHAR *name, UINT name_length, VOID **object_ptr)
{
diff --git a/common_modules/module_lib/src/txm_module_thread_system_suspend.c b/common_modules/module_lib/src/txm_module_thread_system_suspend.c
index 46129074..ad8e8ea7 100644
--- a/common_modules/module_lib/src/txm_module_thread_system_suspend.c
+++ b/common_modules/module_lib/src/txm_module_thread_system_suspend.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,15 +61,6 @@
/* _tx_thread_terminate Thread terminate */
/* Other ThreadX Components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txm_module_thread_system_suspend(TX_THREAD *thread_ptr)
{
diff --git a/common_modules/module_lib/src/txm_mutex_create.c b/common_modules/module_lib/src/txm_mutex_create.c
index 19e8d03b..f50fd52f 100644
--- a/common_modules/module_lib/src/txm_mutex_create.c
+++ b/common_modules/module_lib/src/txm_mutex_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size)
{
diff --git a/common_modules/module_lib/src/txm_mutex_delete.c b/common_modules/module_lib/src/txm_mutex_delete.c
index 9989ac8a..c487744e 100644
--- a/common_modules/module_lib/src/txm_mutex_delete.c
+++ b/common_modules/module_lib/src/txm_mutex_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_mutex_delete(TX_MUTEX *mutex_ptr)
{
diff --git a/common_modules/module_lib/src/txm_mutex_get.c b/common_modules/module_lib/src/txm_mutex_get.c
index 88da1ca3..fb6191e2 100644
--- a/common_modules/module_lib/src/txm_mutex_get.c
+++ b/common_modules/module_lib/src/txm_mutex_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option)
{
diff --git a/common_modules/module_lib/src/txm_mutex_info_get.c b/common_modules/module_lib/src/txm_mutex_info_get.c
index 981b7959..8e63c779 100644
--- a/common_modules/module_lib/src/txm_mutex_info_get.c
+++ b/common_modules/module_lib/src/txm_mutex_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,15 +64,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner, TX_THREAD **first_suspended, ULONG *suspended_count, TX_MUTEX **next_mutex)
{
diff --git a/common_modules/module_lib/src/txm_mutex_performance_info_get.c b/common_modules/module_lib/src/txm_mutex_performance_info_get.c
index 26bbde81..95e1045b 100644
--- a/common_modules/module_lib/src/txm_mutex_performance_info_get.c
+++ b/common_modules/module_lib/src/txm_mutex_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,15 +66,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_mutex_performance_info_get(TX_MUTEX *mutex_ptr, ULONG *puts, ULONG *gets, ULONG *suspensions, ULONG *timeouts, ULONG *inversions, ULONG *inheritances)
{
diff --git a/common_modules/module_lib/src/txm_mutex_performance_system_info_get.c b/common_modules/module_lib/src/txm_mutex_performance_system_info_get.c
index 29906c9f..1c899abd 100644
--- a/common_modules/module_lib/src/txm_mutex_performance_system_info_get.c
+++ b/common_modules/module_lib/src/txm_mutex_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,15 +64,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_mutex_performance_system_info_get(ULONG *puts, ULONG *gets, ULONG *suspensions, ULONG *timeouts, ULONG *inversions, ULONG *inheritances)
{
diff --git a/common_modules/module_lib/src/txm_mutex_prioritize.c b/common_modules/module_lib/src/txm_mutex_prioritize.c
index e0b596ec..32223b5f 100644
--- a/common_modules/module_lib/src/txm_mutex_prioritize.c
+++ b/common_modules/module_lib/src/txm_mutex_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -52,15 +53,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_mutex_prioritize(TX_MUTEX *mutex_ptr)
{
diff --git a/common_modules/module_lib/src/txm_mutex_put.c b/common_modules/module_lib/src/txm_mutex_put.c
index fc19b69b..d0e03d02 100644
--- a/common_modules/module_lib/src/txm_mutex_put.c
+++ b/common_modules/module_lib/src/txm_mutex_put.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,15 +54,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_mutex_put(TX_MUTEX *mutex_ptr)
{
diff --git a/common_modules/module_lib/src/txm_queue_create.c b/common_modules/module_lib/src/txm_queue_create.c
index 890abc43..a18b9f85 100644
--- a/common_modules/module_lib/src/txm_queue_create.c
+++ b/common_modules/module_lib/src/txm_queue_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,15 +61,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size, VOID *queue_start, ULONG queue_size, UINT queue_control_block_size)
{
diff --git a/common_modules/module_lib/src/txm_queue_delete.c b/common_modules/module_lib/src/txm_queue_delete.c
index 36377bfc..f39ddb99 100644
--- a/common_modules/module_lib/src/txm_queue_delete.c
+++ b/common_modules/module_lib/src/txm_queue_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,15 +55,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_queue_delete(TX_QUEUE *queue_ptr)
{
diff --git a/common_modules/module_lib/src/txm_queue_flush.c b/common_modules/module_lib/src/txm_queue_flush.c
index 26a1c20d..5f33c111 100644
--- a/common_modules/module_lib/src/txm_queue_flush.c
+++ b/common_modules/module_lib/src/txm_queue_flush.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,15 +55,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_queue_flush(TX_QUEUE *queue_ptr)
{
diff --git a/common_modules/module_lib/src/txm_queue_front_send.c b/common_modules/module_lib/src/txm_queue_front_send.c
index 09532f80..64555e83 100644
--- a/common_modules/module_lib/src/txm_queue_front_send.c
+++ b/common_modules/module_lib/src/txm_queue_front_send.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option)
{
diff --git a/common_modules/module_lib/src/txm_queue_info_get.c b/common_modules/module_lib/src/txm_queue_info_get.c
index 67e814ea..c66a3d7e 100644
--- a/common_modules/module_lib/src/txm_queue_info_get.c
+++ b/common_modules/module_lib/src/txm_queue_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,15 +63,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage, TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue)
{
diff --git a/common_modules/module_lib/src/txm_queue_performance_info_get.c b/common_modules/module_lib/src/txm_queue_performance_info_get.c
index 6eb65642..a7c77eee 100644
--- a/common_modules/module_lib/src/txm_queue_performance_info_get.c
+++ b/common_modules/module_lib/src/txm_queue_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,15 +64,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_queue_performance_info_get(TX_QUEUE *queue_ptr, ULONG *messages_sent, ULONG *messages_received, ULONG *empty_suspensions, ULONG *full_suspensions, ULONG *full_errors, ULONG *timeouts)
{
diff --git a/common_modules/module_lib/src/txm_queue_performance_system_info_get.c b/common_modules/module_lib/src/txm_queue_performance_system_info_get.c
index 78bd22dd..9a09fd5a 100644
--- a/common_modules/module_lib/src/txm_queue_performance_system_info_get.c
+++ b/common_modules/module_lib/src/txm_queue_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,15 +64,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_queue_performance_system_info_get(ULONG *messages_sent, ULONG *messages_received, ULONG *empty_suspensions, ULONG *full_suspensions, ULONG *full_errors, ULONG *timeouts)
{
diff --git a/common_modules/module_lib/src/txm_queue_prioritize.c b/common_modules/module_lib/src/txm_queue_prioritize.c
index cc6badb7..417ad17a 100644
--- a/common_modules/module_lib/src/txm_queue_prioritize.c
+++ b/common_modules/module_lib/src/txm_queue_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -52,15 +53,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_queue_prioritize(TX_QUEUE *queue_ptr)
{
diff --git a/common_modules/module_lib/src/txm_queue_receive.c b/common_modules/module_lib/src/txm_queue_receive.c
index c7839127..07a9c8f3 100644
--- a/common_modules/module_lib/src/txm_queue_receive.c
+++ b/common_modules/module_lib/src/txm_queue_receive.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_queue_receive(TX_QUEUE *queue_ptr, VOID *destination_ptr, ULONG wait_option)
{
diff --git a/common_modules/module_lib/src/txm_queue_send.c b/common_modules/module_lib/src/txm_queue_send.c
index 0c5304b2..0fd522b2 100644
--- a/common_modules/module_lib/src/txm_queue_send.c
+++ b/common_modules/module_lib/src/txm_queue_send.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_queue_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option)
{
diff --git a/common_modules/module_lib/src/txm_queue_send_notify.c b/common_modules/module_lib/src/txm_queue_send_notify.c
index 5b8e782e..dab5d5b0 100644
--- a/common_modules/module_lib/src/txm_queue_send_notify.c
+++ b/common_modules/module_lib/src/txm_queue_send_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_queue_send_notify(TX_QUEUE *queue_ptr, VOID (*queue_send_notify)(TX_QUEUE *notify_queue_ptr))
{
diff --git a/common_modules/module_lib/src/txm_semaphore_ceiling_put.c b/common_modules/module_lib/src/txm_semaphore_ceiling_put.c
index 55765072..10d76090 100644
--- a/common_modules/module_lib/src/txm_semaphore_ceiling_put.c
+++ b/common_modules/module_lib/src/txm_semaphore_ceiling_put.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling)
{
diff --git a/common_modules/module_lib/src/txm_semaphore_create.c b/common_modules/module_lib/src/txm_semaphore_create.c
index 671892cb..229b46cd 100644
--- a/common_modules/module_lib/src/txm_semaphore_create.c
+++ b/common_modules/module_lib/src/txm_semaphore_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,15 +59,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size)
{
diff --git a/common_modules/module_lib/src/txm_semaphore_delete.c b/common_modules/module_lib/src/txm_semaphore_delete.c
index 0229bf69..08dfebbf 100644
--- a/common_modules/module_lib/src/txm_semaphore_delete.c
+++ b/common_modules/module_lib/src/txm_semaphore_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_delete(TX_SEMAPHORE *semaphore_ptr)
{
diff --git a/common_modules/module_lib/src/txm_semaphore_get.c b/common_modules/module_lib/src/txm_semaphore_get.c
index 2ab634de..9745da0b 100644
--- a/common_modules/module_lib/src/txm_semaphore_get.c
+++ b/common_modules/module_lib/src/txm_semaphore_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option)
{
diff --git a/common_modules/module_lib/src/txm_semaphore_info_get.c b/common_modules/module_lib/src/txm_semaphore_info_get.c
index 0627fe7c..2bdfa2c0 100644
--- a/common_modules/module_lib/src/txm_semaphore_info_get.c
+++ b/common_modules/module_lib/src/txm_semaphore_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,15 +63,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value, TX_THREAD **first_suspended, ULONG *suspended_count, TX_SEMAPHORE **next_semaphore)
{
diff --git a/common_modules/module_lib/src/txm_semaphore_performance_info_get.c b/common_modules/module_lib/src/txm_semaphore_performance_info_get.c
index 1c09d2f1..13204bc9 100644
--- a/common_modules/module_lib/src/txm_semaphore_performance_info_get.c
+++ b/common_modules/module_lib/src/txm_semaphore_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,15 +62,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_performance_info_get(TX_SEMAPHORE *semaphore_ptr, ULONG *puts, ULONG *gets, ULONG *suspensions, ULONG *timeouts)
{
diff --git a/common_modules/module_lib/src/txm_semaphore_performance_system_info_get.c b/common_modules/module_lib/src/txm_semaphore_performance_system_info_get.c
index 9a50edb9..7d196030 100644
--- a/common_modules/module_lib/src/txm_semaphore_performance_system_info_get.c
+++ b/common_modules/module_lib/src/txm_semaphore_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_performance_system_info_get(ULONG *puts, ULONG *gets, ULONG *suspensions, ULONG *timeouts)
{
diff --git a/common_modules/module_lib/src/txm_semaphore_prioritize.c b/common_modules/module_lib/src/txm_semaphore_prioritize.c
index 02cd2a9f..2a72de20 100644
--- a/common_modules/module_lib/src/txm_semaphore_prioritize.c
+++ b/common_modules/module_lib/src/txm_semaphore_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -52,15 +53,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_prioritize(TX_SEMAPHORE *semaphore_ptr)
{
diff --git a/common_modules/module_lib/src/txm_semaphore_put.c b/common_modules/module_lib/src/txm_semaphore_put.c
index 2ea4c04e..0e0831b3 100644
--- a/common_modules/module_lib/src/txm_semaphore_put.c
+++ b/common_modules/module_lib/src/txm_semaphore_put.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,15 +54,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_put(TX_SEMAPHORE *semaphore_ptr)
{
diff --git a/common_modules/module_lib/src/txm_semaphore_put_notify.c b/common_modules/module_lib/src/txm_semaphore_put_notify.c
index db7dea85..05c916fd 100644
--- a/common_modules/module_lib/src/txm_semaphore_put_notify.c
+++ b/common_modules/module_lib/src/txm_semaphore_put_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semaphore_put_notify)(TX_SEMAPHORE *notify_semaphore_ptr))
{
diff --git a/common_modules/module_lib/src/txm_thread_create.c b/common_modules/module_lib/src/txm_thread_create.c
index 62618314..8b1bc367 100644
--- a/common_modules/module_lib/src/txm_thread_create.c
+++ b/common_modules/module_lib/src/txm_thread_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,15 +69,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, VOID (*entry_function)(ULONG entry_input), ULONG entry_input, VOID *stack_start, ULONG stack_size, UINT priority, UINT preempt_threshold, ULONG time_slice, UINT auto_start, UINT thread_control_block_size)
{
diff --git a/common_modules/module_lib/src/txm_thread_delete.c b/common_modules/module_lib/src/txm_thread_delete.c
index 641c220d..11a1bbd6 100644
--- a/common_modules/module_lib/src/txm_thread_delete.c
+++ b/common_modules/module_lib/src/txm_thread_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,15 +55,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_thread_delete(TX_THREAD *thread_ptr)
{
diff --git a/common_modules/module_lib/src/txm_thread_entry_exit_notify.c b/common_modules/module_lib/src/txm_thread_entry_exit_notify.c
index 907840d6..db393071 100644
--- a/common_modules/module_lib/src/txm_thread_entry_exit_notify.c
+++ b/common_modules/module_lib/src/txm_thread_entry_exit_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type))
{
diff --git a/common_modules/module_lib/src/txm_thread_identify.c b/common_modules/module_lib/src/txm_thread_identify.c
index d18aaec1..6f83cb80 100644
--- a/common_modules/module_lib/src/txm_thread_identify.c
+++ b/common_modules/module_lib/src/txm_thread_identify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
TX_THREAD *_tx_thread_identify(VOID)
{
diff --git a/common_modules/module_lib/src/txm_thread_info_get.c b/common_modules/module_lib/src/txm_thread_info_get.c
index 6e2b921c..d956c031 100644
--- a/common_modules/module_lib/src/txm_thread_info_get.c
+++ b/common_modules/module_lib/src/txm_thread_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,15 +66,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count, UINT *priority, UINT *preemption_threshold, ULONG *time_slice, TX_THREAD **next_thread, TX_THREAD **next_suspended_thread)
{
diff --git a/common_modules/module_lib/src/txm_thread_interrupt_control.c b/common_modules/module_lib/src/txm_thread_interrupt_control.c
index 915b56b9..7a4cf51f 100644
--- a/common_modules/module_lib/src/txm_thread_interrupt_control.c
+++ b/common_modules/module_lib/src/txm_thread_interrupt_control.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_thread_interrupt_control(UINT new_posture)
{
diff --git a/common_modules/module_lib/src/txm_thread_performance_info_get.c b/common_modules/module_lib/src/txm_thread_performance_info_get.c
index 362c50e6..c6ab325b 100644
--- a/common_modules/module_lib/src/txm_thread_performance_info_get.c
+++ b/common_modules/module_lib/src/txm_thread_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,15 +79,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_thread_performance_info_get(TX_THREAD *thread_ptr, ULONG *resumptions, ULONG *suspensions, ULONG *solicited_preemptions, ULONG *interrupt_preemptions, ULONG *priority_inversions, ULONG *time_slices, ULONG *relinquishes, ULONG *timeouts, ULONG *wait_aborts, TX_THREAD **last_preempted_by)
{
diff --git a/common_modules/module_lib/src/txm_thread_performance_system_info_get.c b/common_modules/module_lib/src/txm_thread_performance_system_info_get.c
index 3bafa024..efe49868 100644
--- a/common_modules/module_lib/src/txm_thread_performance_system_info_get.c
+++ b/common_modules/module_lib/src/txm_thread_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,15 +79,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_thread_performance_system_info_get(ULONG *resumptions, ULONG *suspensions, ULONG *solicited_preemptions, ULONG *interrupt_preemptions, ULONG *priority_inversions, ULONG *time_slices, ULONG *relinquishes, ULONG *timeouts, ULONG *wait_aborts, ULONG *non_idle_returns, ULONG *idle_returns)
{
diff --git a/common_modules/module_lib/src/txm_thread_preemption_change.c b/common_modules/module_lib/src/txm_thread_preemption_change.c
index 617b99d1..8c956942 100644
--- a/common_modules/module_lib/src/txm_thread_preemption_change.c
+++ b/common_modules/module_lib/src/txm_thread_preemption_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,15 +59,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_thread_preemption_change(TX_THREAD *thread_ptr, UINT new_threshold, UINT *old_threshold)
{
diff --git a/common_modules/module_lib/src/txm_thread_priority_change.c b/common_modules/module_lib/src/txm_thread_priority_change.c
index 82193749..a31ad09f 100644
--- a/common_modules/module_lib/src/txm_thread_priority_change.c
+++ b/common_modules/module_lib/src/txm_thread_priority_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,15 +59,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_thread_priority_change(TX_THREAD *thread_ptr, UINT new_priority, UINT *old_priority)
{
diff --git a/common_modules/module_lib/src/txm_thread_relinquish.c b/common_modules/module_lib/src/txm_thread_relinquish.c
index c8cf6b3e..347ab163 100644
--- a/common_modules/module_lib/src/txm_thread_relinquish.c
+++ b/common_modules/module_lib/src/txm_thread_relinquish.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,15 +54,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _txe_thread_relinquish(VOID)
{
diff --git a/common_modules/module_lib/src/txm_thread_reset.c b/common_modules/module_lib/src/txm_thread_reset.c
index f53506dd..b3c00290 100644
--- a/common_modules/module_lib/src/txm_thread_reset.c
+++ b/common_modules/module_lib/src/txm_thread_reset.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,15 +55,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_thread_reset(TX_THREAD *thread_ptr)
{
diff --git a/common_modules/module_lib/src/txm_thread_resume.c b/common_modules/module_lib/src/txm_thread_resume.c
index a6023a62..a02100bc 100644
--- a/common_modules/module_lib/src/txm_thread_resume.c
+++ b/common_modules/module_lib/src/txm_thread_resume.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,15 +54,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_thread_resume(TX_THREAD *thread_ptr)
{
diff --git a/common_modules/module_lib/src/txm_thread_sleep.c b/common_modules/module_lib/src/txm_thread_sleep.c
index 8dccdab5..d5639af2 100644
--- a/common_modules/module_lib/src/txm_thread_sleep.c
+++ b/common_modules/module_lib/src/txm_thread_sleep.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,15 +54,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_thread_sleep(ULONG timer_ticks)
{
diff --git a/common_modules/module_lib/src/txm_thread_stack_error_notify.c b/common_modules/module_lib/src/txm_thread_stack_error_notify.c
index 67fd4c79..eafb4b50 100644
--- a/common_modules/module_lib/src/txm_thread_stack_error_notify.c
+++ b/common_modules/module_lib/src/txm_thread_stack_error_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_thread_stack_error_notify(VOID (*stack_error_handler)(TX_THREAD *thread_ptr))
{
diff --git a/common_modules/module_lib/src/txm_thread_suspend.c b/common_modules/module_lib/src/txm_thread_suspend.c
index e0f6ab21..69a31b31 100644
--- a/common_modules/module_lib/src/txm_thread_suspend.c
+++ b/common_modules/module_lib/src/txm_thread_suspend.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_thread_suspend(TX_THREAD *thread_ptr)
{
diff --git a/common_modules/module_lib/src/txm_thread_terminate.c b/common_modules/module_lib/src/txm_thread_terminate.c
index 37b3fc92..65eb13ab 100644
--- a/common_modules/module_lib/src/txm_thread_terminate.c
+++ b/common_modules/module_lib/src/txm_thread_terminate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_thread_terminate(TX_THREAD *thread_ptr)
{
diff --git a/common_modules/module_lib/src/txm_thread_time_slice_change.c b/common_modules/module_lib/src/txm_thread_time_slice_change.c
index 581b13a9..bb7cc4eb 100644
--- a/common_modules/module_lib/src/txm_thread_time_slice_change.c
+++ b/common_modules/module_lib/src/txm_thread_time_slice_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_thread_time_slice_change(TX_THREAD *thread_ptr, ULONG new_time_slice, ULONG *old_time_slice)
{
diff --git a/common_modules/module_lib/src/txm_thread_wait_abort.c b/common_modules/module_lib/src/txm_thread_wait_abort.c
index fdf62e4c..e827946b 100644
--- a/common_modules/module_lib/src/txm_thread_wait_abort.c
+++ b/common_modules/module_lib/src/txm_thread_wait_abort.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,15 +54,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_thread_wait_abort(TX_THREAD *thread_ptr)
{
diff --git a/common_modules/module_lib/src/txm_time_get.c b/common_modules/module_lib/src/txm_time_get.c
index f31570c6..fd73e4bc 100644
--- a/common_modules/module_lib/src/txm_time_get.c
+++ b/common_modules/module_lib/src/txm_time_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,15 +54,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
ULONG _tx_time_get(VOID)
{
diff --git a/common_modules/module_lib/src/txm_time_set.c b/common_modules/module_lib/src/txm_time_set.c
index 87030665..8e36663d 100644
--- a/common_modules/module_lib/src/txm_time_set.c
+++ b/common_modules/module_lib/src/txm_time_set.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,15 +54,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_time_set(ULONG new_time)
{
diff --git a/common_modules/module_lib/src/txm_timer_activate.c b/common_modules/module_lib/src/txm_timer_activate.c
index 87bd6c9c..357be63e 100644
--- a/common_modules/module_lib/src/txm_timer_activate.c
+++ b/common_modules/module_lib/src/txm_timer_activate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_timer_activate(TX_TIMER *timer_ptr)
{
diff --git a/common_modules/module_lib/src/txm_timer_change.c b/common_modules/module_lib/src/txm_timer_change.c
index 3e694d4b..85bdff87 100644
--- a/common_modules/module_lib/src/txm_timer_change.c
+++ b/common_modules/module_lib/src/txm_timer_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,15 +59,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks)
{
diff --git a/common_modules/module_lib/src/txm_timer_create.c b/common_modules/module_lib/src/txm_timer_create.c
index eca01d04..d65989eb 100644
--- a/common_modules/module_lib/src/txm_timer_create.c
+++ b/common_modules/module_lib/src/txm_timer_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,15 +64,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr, VOID (*expiration_function)(ULONG), ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks, UINT auto_activate, UINT timer_control_block_size)
{
diff --git a/common_modules/module_lib/src/txm_timer_deactivate.c b/common_modules/module_lib/src/txm_timer_deactivate.c
index 532dfe9d..5420ba5c 100644
--- a/common_modules/module_lib/src/txm_timer_deactivate.c
+++ b/common_modules/module_lib/src/txm_timer_deactivate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,15 +55,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_timer_deactivate(TX_TIMER *timer_ptr)
{
diff --git a/common_modules/module_lib/src/txm_timer_delete.c b/common_modules/module_lib/src/txm_timer_delete.c
index 3a316278..a8b116a8 100644
--- a/common_modules/module_lib/src/txm_timer_delete.c
+++ b/common_modules/module_lib/src/txm_timer_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_timer_delete(TX_TIMER *timer_ptr)
{
diff --git a/common_modules/module_lib/src/txm_timer_info_get.c b/common_modules/module_lib/src/txm_timer_info_get.c
index 767012ab..f918ca67 100644
--- a/common_modules/module_lib/src/txm_timer_info_get.c
+++ b/common_modules/module_lib/src/txm_timer_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,15 +62,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txe_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks, ULONG *reschedule_ticks, TX_TIMER **next_timer)
{
diff --git a/common_modules/module_lib/src/txm_timer_performance_info_get.c b/common_modules/module_lib/src/txm_timer_performance_info_get.c
index 620dbb9f..9e9c1ea4 100644
--- a/common_modules/module_lib/src/txm_timer_performance_info_get.c
+++ b/common_modules/module_lib/src/txm_timer_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,15 +65,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_timer_performance_info_get(TX_TIMER *timer_ptr, ULONG *activates, ULONG *reactivates, ULONG *deactivates, ULONG *expirations, ULONG *expiration_adjusts)
{
diff --git a/common_modules/module_lib/src/txm_timer_performance_system_info_get.c b/common_modules/module_lib/src/txm_timer_performance_system_info_get.c
index 02b98518..202ad1ad 100644
--- a/common_modules/module_lib/src/txm_timer_performance_system_info_get.c
+++ b/common_modules/module_lib/src/txm_timer_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,15 +62,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_timer_performance_system_info_get(ULONG *activates, ULONG *reactivates, ULONG *deactivates, ULONG *expirations, ULONG *expiration_adjusts)
{
diff --git a/common_modules/module_lib/src/txm_trace_buffer_full_notify.c b/common_modules/module_lib/src/txm_trace_buffer_full_notify.c
index 3e46bfe4..3494b741 100644
--- a/common_modules/module_lib/src/txm_trace_buffer_full_notify.c
+++ b/common_modules/module_lib/src/txm_trace_buffer_full_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_trace_buffer_full_notify(VOID (*full_buffer_callback)(VOID *buffer))
{
diff --git a/common_modules/module_lib/src/txm_trace_disable.c b/common_modules/module_lib/src/txm_trace_disable.c
index 569db575..9861533b 100644
--- a/common_modules/module_lib/src/txm_trace_disable.c
+++ b/common_modules/module_lib/src/txm_trace_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -52,15 +53,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_trace_disable(VOID)
{
diff --git a/common_modules/module_lib/src/txm_trace_enable.c b/common_modules/module_lib/src/txm_trace_enable.c
index fd3532e3..3355520e 100644
--- a/common_modules/module_lib/src/txm_trace_enable.c
+++ b/common_modules/module_lib/src/txm_trace_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_trace_enable(VOID *trace_buffer_start, ULONG trace_buffer_size, ULONG registry_entries)
{
diff --git a/common_modules/module_lib/src/txm_trace_event_filter.c b/common_modules/module_lib/src/txm_trace_event_filter.c
index 526fd690..1eeb9d4b 100644
--- a/common_modules/module_lib/src/txm_trace_event_filter.c
+++ b/common_modules/module_lib/src/txm_trace_event_filter.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,15 +54,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_trace_event_filter(ULONG event_filter_bits)
{
diff --git a/common_modules/module_lib/src/txm_trace_event_unfilter.c b/common_modules/module_lib/src/txm_trace_event_unfilter.c
index e5ca5d69..66ec727e 100644
--- a/common_modules/module_lib/src/txm_trace_event_unfilter.c
+++ b/common_modules/module_lib/src/txm_trace_event_unfilter.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,15 +54,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_trace_event_unfilter(ULONG event_unfilter_bits)
{
diff --git a/common_modules/module_lib/src/txm_trace_interrupt_control.c b/common_modules/module_lib/src/txm_trace_interrupt_control.c
index a26651f5..4bd9028c 100644
--- a/common_modules/module_lib/src/txm_trace_interrupt_control.c
+++ b/common_modules/module_lib/src/txm_trace_interrupt_control.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,15 +54,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_trace_interrupt_control(UINT new_posture)
{
diff --git a/common_modules/module_lib/src/txm_trace_isr_enter_insert.c b/common_modules/module_lib/src/txm_trace_isr_enter_insert.c
index 9411443b..19a8ad18 100644
--- a/common_modules/module_lib/src/txm_trace_isr_enter_insert.c
+++ b/common_modules/module_lib/src/txm_trace_isr_enter_insert.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,15 +54,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_trace_isr_enter_insert(ULONG isr_id)
{
diff --git a/common_modules/module_lib/src/txm_trace_isr_exit_insert.c b/common_modules/module_lib/src/txm_trace_isr_exit_insert.c
index b686cb7c..3b60c0fb 100644
--- a/common_modules/module_lib/src/txm_trace_isr_exit_insert.c
+++ b/common_modules/module_lib/src/txm_trace_isr_exit_insert.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,15 +54,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_trace_isr_exit_insert(ULONG isr_id)
{
diff --git a/common_modules/module_lib/src/txm_trace_user_event_insert.c b/common_modules/module_lib/src/txm_trace_user_event_insert.c
index c3d0e0cb..dfe7dd23 100644
--- a/common_modules/module_lib/src/txm_trace_user_event_insert.c
+++ b/common_modules/module_lib/src/txm_trace_user_event_insert.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* Module application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _tx_trace_user_event_insert(ULONG event_id, ULONG info_field_1, ULONG info_field_2, ULONG info_field_3, ULONG info_field_4)
{
diff --git a/common_modules/module_manager/inc/txm_module_manager_dispatch.h b/common_modules/module_manager/inc/txm_module_manager_dispatch.h
index 4f30ad26..03bd86eb 100644
--- a/common_modules/module_manager/inc/txm_module_manager_dispatch.h
+++ b/common_modules/module_manager/inc/txm_module_manager_dispatch.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2025 Eclipse ThreadX Contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -2389,6 +2390,11 @@ static ALIGN_TYPE _txm_module_manager_tx_thread_preemption_change_dispatch(TXM_M
ALIGN_TYPE return_value;
+ if (param_1 < module_instance -> txm_module_instance_maximum_priority)
+ {
+ return(TX_THRESH_ERROR);
+ }
+
if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
{
if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD)))
@@ -2418,6 +2424,11 @@ static ALIGN_TYPE _txm_module_manager_tx_thread_priority_change_dispatch(TXM_MOD
ALIGN_TYPE return_value;
+ if (param_1 < module_instance -> txm_module_instance_maximum_priority)
+ {
+ return(TX_PRIORITY_ERROR);
+ }
+
if (module_instance -> txm_module_instance_property_flags & TXM_MODULE_MEMORY_PROTECTION)
{
if (!TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, param_0, sizeof(TX_THREAD)))
diff --git a/common_modules/module_manager/inc/txm_module_manager_util.h b/common_modules/module_manager/inc/txm_module_manager_util.h
index bf971049..45c7f409 100644
--- a/common_modules/module_manager/inc/txm_module_manager_util.h
+++ b/common_modules/module_manager/inc/txm_module_manager_util.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -25,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* txm_module_manager_util.h PORTABLE C */
-/* 6.3.0 */
+/* 6.4.3 */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -35,18 +36,6 @@
/* This file declares prototypes of utility functions used by the */
/* module manager. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 04-02-2021 Scott Larson Modified comment(s) and */
-/* optimized object checks, */
-/* resulting in version 6.1.6 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s) and */
-/* improved object check, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#ifndef TXM_MODULE_MANAGER_UTIL_H
@@ -102,16 +91,11 @@
/* Kernel objects should be outside the module at the very least. */
#define TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_USE(module_instance, obj_ptr, obj_size) \
- (TXM_MODULE_MANAGER_ENSURE_OUTSIDE_MODULE(module_instance, obj_ptr, obj_size) || \
- (_txm_module_manager_created_object_check(module_instance, (void *)obj_ptr) == TX_FALSE) || \
- ((void *) (obj_ptr) == TX_NULL))
+ (_txm_module_manager_param_check_object_for_use(module_instance, obj_ptr, obj_size))
/* When creating an object, the object must be inside the object pool. */
#define TXM_MODULE_MANAGER_PARAM_CHECK_OBJECT_FOR_CREATION(module_instance, obj_ptr, obj_size) \
- ((TXM_MODULE_MANAGER_ENSURE_INSIDE_OBJ_POOL(module_instance, obj_ptr, obj_size) && \
- (_txm_module_manager_object_size_check(obj_ptr, obj_size) == TX_SUCCESS)) || \
- (_txm_module_manager_created_object_check(module_instance, (void *)obj_ptr) == TX_FALSE) || \
- ((void *) (obj_ptr) == TX_NULL))
+ (_txm_module_manager_param_check_object_for_creation(module_instance, obj_ptr, obj_size))
/* Strings we dereference can be in RW/RO/Shared areas. */
#define TXM_MODULE_MANAGER_PARAM_CHECK_DEREFERENCE_STRING(module_instance, string_ptr) \
@@ -136,6 +120,8 @@ UINT _txm_module_manager_object_memory_check(TXM_MODULE_INSTANCE *module_inst
UINT _txm_module_manager_object_size_check(ALIGN_TYPE object_ptr, ULONG object_size);
UINT _txm_module_manager_object_name_compare(CHAR *object_name1, UINT object_name1_length, CHAR *object_name2);
UCHAR _txm_module_manager_created_object_check(TXM_MODULE_INSTANCE *module_instance, void *object_ptr);
+UINT _txm_module_manager_param_check_object_for_creation(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, ULONG object_size);
+UINT _txm_module_manager_param_check_object_for_use(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, ULONG object_size);
UINT _txm_module_manager_util_code_allocation_size_and_alignment_get(TXM_MODULE_PREAMBLE *module_preamble, ULONG *code_alignment_dest, ULONG *code_allocation_size_dest);
#endif
diff --git a/common_modules/module_manager/src/txm_module_manager_absolute_load.c b/common_modules/module_manager/src/txm_module_manager_absolute_load.c
index d8a771f8..dee6efd2 100644
--- a/common_modules/module_manager/src/txm_module_manager_absolute_load.c
+++ b/common_modules/module_manager/src/txm_module_manager_absolute_load.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,12 +67,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 12-31-2020 Andres Mlinar Initial Version 6.1.3 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_absolute_load(TXM_MODULE_INSTANCE *module_instance, CHAR *module_name, VOID *module_location)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_application_request.c b/common_modules/module_manager/src/txm_module_manager_application_request.c
index 4682968a..111dbbdc 100644
--- a/common_modules/module_manager/src/txm_module_manager_application_request.c
+++ b/common_modules/module_manager/src/txm_module_manager_application_request.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,15 +62,6 @@
/* */
/* _txm_module_manager_kernel_dispatch Kernel dispatch function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_application_request(ULONG request_id, ALIGN_TYPE param_1, ALIGN_TYPE param_2, ALIGN_TYPE param_3)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_callback_request.c b/common_modules/module_manager/src/txm_module_manager_callback_request.c
index 4d5211d6..bae5c00b 100644
--- a/common_modules/module_manager/src/txm_module_manager_callback_request.c
+++ b/common_modules/module_manager/src/txm_module_manager_callback_request.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,12 +60,6 @@
/* */
/* ThreadX */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_callback_request(TX_QUEUE *module_callback_queue, TXM_MODULE_CALLBACK_MESSAGE *callback_message)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_event_flags_notify_trampoline.c b/common_modules/module_manager/src/txm_module_manager_event_flags_notify_trampoline.c
index 44dd1872..7510f36b 100644
--- a/common_modules/module_manager/src/txm_module_manager_event_flags_notify_trampoline.c
+++ b/common_modules/module_manager/src/txm_module_manager_event_flags_notify_trampoline.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,12 +61,6 @@
/* */
/* ThreadX */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_event_flags_notify_trampoline(TX_EVENT_FLAGS_GROUP *group_ptr)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_file_load.c b/common_modules/module_manager/src/txm_module_manager_file_load.c
index 55ac57a2..c444c5c1 100644
--- a/common_modules/module_manager/src/txm_module_manager_file_load.c
+++ b/common_modules/module_manager/src/txm_module_manager_file_load.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -75,12 +76,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_file_load(TXM_MODULE_INSTANCE *module_instance, CHAR *module_name, FX_MEDIA *media_ptr, CHAR *file_name)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_in_place_load.c b/common_modules/module_manager/src/txm_module_manager_in_place_load.c
index acc5828c..781ef628 100644
--- a/common_modules/module_manager/src/txm_module_manager_in_place_load.c
+++ b/common_modules/module_manager/src/txm_module_manager_in_place_load.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,12 +66,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_in_place_load(TXM_MODULE_INSTANCE *module_instance, CHAR *module_name, VOID *module_location)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_initialize.c b/common_modules/module_manager/src/txm_module_manager_initialize.c
index fba853f5..7626c19b 100644
--- a/common_modules/module_manager/src/txm_module_manager_initialize.c
+++ b/common_modules/module_manager/src/txm_module_manager_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -129,12 +130,6 @@ ULONG _txm_module_manager_callback_error_count;
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_initialize(VOID *module_memory_start, ULONG module_memory_size)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_internal_load.c b/common_modules/module_manager/src/txm_module_manager_internal_load.c
index 46416127..49d57354 100644
--- a/common_modules/module_manager/src/txm_module_manager_internal_load.c
+++ b/common_modules/module_manager/src/txm_module_manager_internal_load.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,12 +69,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_internal_load(TXM_MODULE_INSTANCE *module_instance, CHAR *module_name, VOID *module_location,
ULONG code_size, VOID *code_allocation_ptr, ULONG code_allocation_size)
diff --git a/common_modules/module_manager/src/txm_module_manager_kernel_dispatch.c b/common_modules/module_manager/src/txm_module_manager_kernel_dispatch.c
index 769ebcc5..aa377430 100644
--- a/common_modules/module_manager/src/txm_module_manager_kernel_dispatch.c
+++ b/common_modules/module_manager/src/txm_module_manager_kernel_dispatch.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -76,22 +77,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 12-31-2020 Scott Larson Modified comment(s), added */
-/* port-specific dispatch, */
-/* resulting in version 6.1.3 */
-/* 04-02-2021 Scott Larson Modified comment(s), */
-/* added optional defines to */
-/* remove unneeded functions, */
-/* resulting in version 6.1.6 */
-/* 01-31-2022 Scott Larson Modified comments and added */
-/* CALL_NOT_USED option, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
ALIGN_TYPE _txm_module_manager_kernel_dispatch(ULONG kernel_request, ALIGN_TYPE param_0, ALIGN_TYPE param_1, ALIGN_TYPE param_2)
{
@@ -439,7 +424,7 @@ TXM_MODULE_INSTANCE *module_instance;
break;
}
#endif
-
+
#ifndef TXM_QUEUE_SEND_CALL_NOT_USED
case TXM_QUEUE_SEND_CALL:
{
diff --git a/common_modules/module_manager/src/txm_module_manager_maximum_module_priority_set.c b/common_modules/module_manager/src/txm_module_manager_maximum_module_priority_set.c
index a3b31c8e..35560eea 100644
--- a/common_modules/module_manager/src/txm_module_manager_maximum_module_priority_set.c
+++ b/common_modules/module_manager/src/txm_module_manager_maximum_module_priority_set.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,12 +59,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_maximum_module_priority_set(TXM_MODULE_INSTANCE *module_instance, UINT priority)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_memory_load.c b/common_modules/module_manager/src/txm_module_manager_memory_load.c
index 88679544..e615e4f2 100644
--- a/common_modules/module_manager/src/txm_module_manager_memory_load.c
+++ b/common_modules/module_manager/src/txm_module_manager_memory_load.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,12 +67,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_memory_load(TXM_MODULE_INSTANCE *module_instance, CHAR *module_name, VOID *module_location)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_object_allocate.c b/common_modules/module_manager/src/txm_module_manager_object_allocate.c
index 49a6485e..92ae128c 100644
--- a/common_modules/module_manager/src/txm_module_manager_object_allocate.c
+++ b/common_modules/module_manager/src/txm_module_manager_object_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,12 +62,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_object_allocate(VOID **object_ptr_ptr, ULONG object_size, TXM_MODULE_INSTANCE *module_instance)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_object_deallocate.c b/common_modules/module_manager/src/txm_module_manager_object_deallocate.c
index b5deeb6b..2efc465b 100644
--- a/common_modules/module_manager/src/txm_module_manager_object_deallocate.c
+++ b/common_modules/module_manager/src/txm_module_manager_object_deallocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,12 +59,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_object_deallocate(VOID *object_ptr)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_object_pointer_get.c b/common_modules/module_manager/src/txm_module_manager_object_pointer_get.c
index 198e8c70..84cf6c96 100644
--- a/common_modules/module_manager/src/txm_module_manager_object_pointer_get.c
+++ b/common_modules/module_manager/src/txm_module_manager_object_pointer_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,12 +72,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_object_pointer_get(UINT object_type, CHAR *name, VOID **object_ptr)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_object_pointer_get_extended.c b/common_modules/module_manager/src/txm_module_manager_object_pointer_get_extended.c
index 017ed364..1ddd987b 100644
--- a/common_modules/module_manager/src/txm_module_manager_object_pointer_get_extended.c
+++ b/common_modules/module_manager/src/txm_module_manager_object_pointer_get_extended.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -88,12 +89,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_object_pointer_get_extended(UINT object_type, CHAR *search_name, UINT search_name_length, VOID **object_ptr)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_object_pool_create.c b/common_modules/module_manager/src/txm_module_manager_object_pool_create.c
index b9038a81..ad05aa95 100644
--- a/common_modules/module_manager/src/txm_module_manager_object_pool_create.c
+++ b/common_modules/module_manager/src/txm_module_manager_object_pool_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,12 +60,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_object_pool_create(VOID *object_memory, ULONG object_memory_size)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_properties_get.c b/common_modules/module_manager/src/txm_module_manager_properties_get.c
index bab824fc..3705583f 100644
--- a/common_modules/module_manager/src/txm_module_manager_properties_get.c
+++ b/common_modules/module_manager/src/txm_module_manager_properties_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,12 +56,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_properties_get(TXM_MODULE_INSTANCE *module_instance, ULONG *module_properties_ptr)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_queue_notify_trampoline.c b/common_modules/module_manager/src/txm_module_manager_queue_notify_trampoline.c
index 94cb62e8..a6ffa56c 100644
--- a/common_modules/module_manager/src/txm_module_manager_queue_notify_trampoline.c
+++ b/common_modules/module_manager/src/txm_module_manager_queue_notify_trampoline.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,12 +58,6 @@
/* */
/* ThreadX */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_queue_notify_trampoline(TX_QUEUE *queue_ptr)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_semaphore_notify_trampoline.c b/common_modules/module_manager/src/txm_module_manager_semaphore_notify_trampoline.c
index f070c26d..f1545cf6 100644
--- a/common_modules/module_manager/src/txm_module_manager_semaphore_notify_trampoline.c
+++ b/common_modules/module_manager/src/txm_module_manager_semaphore_notify_trampoline.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,12 +59,6 @@
/* */
/* ThreadX */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_semaphore_notify_trampoline(TX_SEMAPHORE *semaphore_ptr)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_start.c b/common_modules/module_manager/src/txm_module_manager_start.c
index 4e2383bf..afad039f 100644
--- a/common_modules/module_manager/src/txm_module_manager_start.c
+++ b/common_modules/module_manager/src/txm_module_manager_start.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 12-31-2020 Scott Larson Modified comment(s), */
-/* resulting in version 6.1.3 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_start(TXM_MODULE_INSTANCE *module_instance)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_stop.c b/common_modules/module_manager/src/txm_module_manager_stop.c
index c960dae1..69ab949b 100644
--- a/common_modules/module_manager/src/txm_module_manager_stop.c
+++ b/common_modules/module_manager/src/txm_module_manager_stop.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -107,17 +108,6 @@ extern UINT _txm_module_manager_usbx_stop(TXM_MODULE_INSTANCE *module_instance)
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-02-2021 Scott Larson Modified comments, fix */
-/* object delete underflow, */
-/* resulting in version 6.1.5 */
-/* 03-08-2023 Scott Larson Added tx_trace.h include, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_stop(TXM_MODULE_INSTANCE *module_instance)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_thread_create.c b/common_modules/module_manager/src/txm_module_manager_thread_create.c
index d759a064..c14d8e4e 100644
--- a/common_modules/module_manager/src/txm_module_manager_thread_create.c
+++ b/common_modules/module_manager/src/txm_module_manager_thread_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -80,26 +81,6 @@
/* _txm_module_manager_stop Initiate module's stop thread */
/* _txm_module_manager_kernel_dispatch Kernel dispatch function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 12-31-2020 Scott Larson Modified comment(s), */
-/* fix stack overlap checking, */
-/* added 64-bit support, */
-/* added SMP support, */
-/* resulting in version 6.1.3 */
-/* 03-08-2023 Scott Larson Check module stack for */
-/* overlap, */
-/* resulting in version 6.2.1 */
-/* 10-31-2023 Xiuwen Cai, Yajun xia Modified comment(s), */
-/* added option for random */
-/* number stack filling, */
-/* fixed the kernel stack */
-/* allocation issue, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr,
VOID (*shell_function)(TX_THREAD *, TXM_MODULE_INSTANCE *),
diff --git a/common_modules/module_manager/src/txm_module_manager_thread_notify_trampoline.c b/common_modules/module_manager/src/txm_module_manager_thread_notify_trampoline.c
index 01ff1260..b7f2d552 100644
--- a/common_modules/module_manager/src/txm_module_manager_thread_notify_trampoline.c
+++ b/common_modules/module_manager/src/txm_module_manager_thread_notify_trampoline.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,12 +60,6 @@
/* */
/* ThreadX */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_thread_notify_trampoline(TX_THREAD *thread_ptr, UINT type)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_thread_reset.c b/common_modules/module_manager/src/txm_module_manager_thread_reset.c
index 176f78e0..75dd4a49 100644
--- a/common_modules/module_manager/src/txm_module_manager_thread_reset.c
+++ b/common_modules/module_manager/src/txm_module_manager_thread_reset.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,12 +61,6 @@
/* */
/* _txm_module_manager_kernel_dispatch Kernel dispatch function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_thread_reset(TX_THREAD *thread_ptr)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_timer_notify_trampoline.c b/common_modules/module_manager/src/txm_module_manager_timer_notify_trampoline.c
index 0d462d1e..b2df699b 100644
--- a/common_modules/module_manager/src/txm_module_manager_timer_notify_trampoline.c
+++ b/common_modules/module_manager/src/txm_module_manager_timer_notify_trampoline.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,12 +59,6 @@
/* */
/* ThreadX */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _txm_module_manager_timer_notify_trampoline(ULONG id)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_unload.c b/common_modules/module_manager/src/txm_module_manager_unload.c
index 3f8b923a..5fe96f6f 100644
--- a/common_modules/module_manager/src/txm_module_manager_unload.c
+++ b/common_modules/module_manager/src/txm_module_manager_unload.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,12 +62,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_unload(TXM_MODULE_INSTANCE *module_instance)
{
diff --git a/common_modules/module_manager/src/txm_module_manager_util.c b/common_modules/module_manager/src/txm_module_manager_util.c
index 23a989ac..78031b5f 100644
--- a/common_modules/module_manager/src/txm_module_manager_util.c
+++ b/common_modules/module_manager/src/txm_module_manager_util.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* _txm_module_manager_kernel_dispatch Kernel dispatch function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txm_module_manager_object_memory_check(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, ULONG object_size)
{
@@ -104,7 +99,7 @@ UINT _txm_module_manager_object_memory_check(TXM_MODULE_INSTANCE *module_instan
/* FUNCTION RELEASE */
/* */
/* _txm_module_manager_created_object_check PORTABLE C */
-/* 6.1 */
+/* 6.1x */
/* AUTHOR */
/* */
/* Scott Larson, Microsoft Corporation */
@@ -137,6 +132,10 @@ UINT _txm_module_manager_object_memory_check(TXM_MODULE_INSTANCE *module_instan
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 Scott Larson Initial Version 6.1 */
+/* xx-xx-2025 William E. Lamie Modified comment(s), and */
+/* removed module local memory */
+/* check, resulting in */
+/* version 6.1x */
/* */
/**************************************************************************/
UCHAR _txm_module_manager_created_object_check(TXM_MODULE_INSTANCE *module_instance, VOID *object_ptr)
@@ -144,15 +143,9 @@ UCHAR _txm_module_manager_created_object_check(TXM_MODULE_INSTANCE *module_insta
TXM_MODULE_ALLOCATED_OBJECT *allocated_object_ptr;
- /* Determine if the socket control block is inside the module. */
- if ( (((CHAR *) object_ptr) >= ((CHAR *) module_instance -> txm_module_instance_data_start)) &&
- (((CHAR *) object_ptr) < ((CHAR *) module_instance -> txm_module_instance_data_end)))
- {
- return TX_TRUE;
- }
- /* Determine if this object control block was allocated by this module instance. */
- else if (_txm_module_manager_object_pool_created)
+ /* Determine if the object pool has been created. */
+ if (_txm_module_manager_object_pool_created)
{
/* Determine if the current object is from the pool of dynamically allocated objects. */
@@ -336,6 +329,158 @@ CHAR object_name_char;
}
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_manager_param_check_object_for_creation PORTABLE C */
+/* 6.4.3 */
+/* AUTHOR */
+/* */
+/* William E. Lamie, RTOSX */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks to make sure the object pointer for one of the */
+/* creation APIs is valid. */
+/* */
+/* INPUT */
+/* */
+/* module_instance Requesting module instance pointer*/
+/* object_ptr Address of object memory area */
+/* ojbect_size Size of object memory area */
+/* */
+/* OUTPUT */
+/* */
+/* TX_TRUE Valid object pointer */
+/* TX_FALSE Invalid object pointer */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* txm_module_manager_* Module manager functions */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* xx-xx-2025 William E. Lamie Initial Version 6.4.3 */
+/* */
+/**************************************************************************/
+UINT _txm_module_manager_param_check_object_for_creation(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, ULONG object_size)
+{
+
+ /* Determine if the object pointer is NULL. */
+ if ((void *) object_ptr == TX_NULL)
+ {
+
+ /* Object pointer is NULL, which is invalid. */
+ return(TX_FALSE);
+ }
+
+ /* Determine if the object pointer is inside the module object pool. */
+ if (TXM_MODULE_MANAGER_ENSURE_INSIDE_OBJ_POOL(module_instance, object_ptr, object_size) == TX_FALSE)
+ {
+
+ /* Object pointer is not inside the object pool, which is invalid. */
+ return(TX_FALSE);
+ }
+
+ /* Determine if the object size is correct. */
+ if (_txm_module_manager_object_size_check(object_ptr, object_size) != TX_SUCCESS)
+ {
+
+ /* Object size is invalid. */
+ return(TX_FALSE);
+ }
+
+ /* Determine if the ojbect has already been created. */
+ if (_txm_module_manager_created_object_check(module_instance, (void *) object_ptr) == TX_FALSE)
+ {
+
+ /* Object has already been created, which is invalid. */
+ return(TX_FALSE);
+ }
+
+ /* Everything is okay with the object, return TX_TRUE. */
+ return(TX_TRUE);
+}
+
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _txm_module_manager_param_check_object_for_use PORTABLE C */
+/* 6.4.3 */
+/* AUTHOR */
+/* */
+/* William E. Lamie, RTOSX */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks to make sure the object pointer is valid. */
+/* */
+/* INPUT */
+/* */
+/* module_instance Requesting module instance pointer*/
+/* object_ptr Address of object memory area */
+/* ojbect_size Size of object memory area */
+/* */
+/* OUTPUT */
+/* */
+/* TX_TRUE Valid object pointer */
+/* TX_FALSE Invalid object pointer */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* txm_module_manager_* Module manager functions */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* xx-xx-2025 William E. Lamie Initial Version 6.4.3 */
+/* */
+/**************************************************************************/
+UINT _txm_module_manager_param_check_object_for_use(TXM_MODULE_INSTANCE *module_instance, ALIGN_TYPE object_ptr, ULONG object_size)
+{
+
+ /* Determine if the object pointer is NULL. */
+ if ((void *) object_ptr == TX_NULL)
+ {
+
+ /* Object pointer is NULL, which is invalid. */
+ return(TX_FALSE);
+ }
+
+ /* Determine if the object pointer is inside the module object pool. */
+ if (TXM_MODULE_MANAGER_ENSURE_OUTSIDE_MODULE(module_instance, object_ptr, object_size) == TX_FALSE)
+ {
+
+ /* Object pointer is not inside the object pool, which is invalid. */
+ return(TX_FALSE);
+ }
+
+ /* Define application-specific object memory check. */
+#ifdef TXM_MODULE_MANGER_APPLICATION_VALID_OBJECT_MEMORY_CHECK
+
+ /* Bring in the application-spefic objeft memory check, defined by the user. */
+ TXM_MODULE_MANGER_APPLICATION_VALID_OBJECT_MEMORY_CHECK
+#endif /* TXM_MODULE_MANGER_APPLICATION_VALID_OBJECT_MEMORY_ENABLE */
+
+ /* Everything is okay with the object, return TX_TRUE. */
+ return(TX_TRUE);
+}
+
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
@@ -414,3 +559,5 @@ ULONG data_alignment_ignored;
/* Return success. */
return(TX_SUCCESS);
}
+
+
diff --git a/common_modules/module_manager/utilities/module_binary_to_c_array.c b/common_modules/module_manager/utilities/module_binary_to_c_array.c
index b02fde6e..da0cf97c 100644
--- a/common_modules/module_manager/utilities/module_binary_to_c_array.c
+++ b/common_modules/module_manager/utilities/module_binary_to_c_array.c
@@ -21,7 +21,7 @@ unsigned long column;
/* Determine if the proper number of files are provided. */
- if (argc != 3)
+ if (argc != 3)
{
/* Print an error message out and wait for user key hit. */
@@ -44,7 +44,7 @@ unsigned long column;
printf(" File: %s ", argv[1]);
return(2);
}
-
+
/* Determine if the binary file is a valid ThreadX module. */
alpha = fgetc(source_file);
alpha1 = fgetc(source_file);
@@ -94,7 +94,7 @@ unsigned long column;
address = 0;
column = 0;
- do
+ do
{
/* Get character from the input file. */
diff --git a/common_modules/module_manager/utilities/module_to_binary.c b/common_modules/module_manager/utilities/module_to_binary.c
index 77517e0d..a749c8a3 100644
--- a/common_modules/module_manager/utilities/module_to_binary.c
+++ b/common_modules/module_manager/utilities/module_to_binary.c
@@ -14,7 +14,7 @@ FILE *binary_file;
#define ELF_EXECUTABLE 2
-typedef struct ELF_HEADER_STRUCT
+typedef struct ELF_HEADER_STRUCT
{
unsigned char elf_header_id_string[ELF_ID_STRING_SIZE];
unsigned short elf_header_file_type;
@@ -114,12 +114,12 @@ unsigned char *buffer;
for (i = 0; i < object_size; i++)
{
alpha = fgetc(source_file);
-
+
if (alpha == EOF)
return(1);
-
+
buffer[i] = (unsigned char) alpha;
- }
+ }
/* Return success. */
return(0);
@@ -140,7 +140,7 @@ unsigned char zero_value;
/* Determine if the proper number of files are provided. */
- if (argc != 3)
+ if (argc != 3)
{
/* Print an error message out and wait for user key hit. */
@@ -163,7 +163,7 @@ unsigned char zero_value;
printf(" File: %s ", argv[1]);
return(2);
}
-
+
/* Attempt to open the binary file for writing. */
binary_file = fopen(argv[2], "wb");
@@ -182,7 +182,7 @@ unsigned char zero_value;
/* Allocate memory for the program header(s). */
program_header = malloc(sizeof(ELF_PROGRAM_HEADER)*header.elf_header_program_header_entries);
-
+
/* Read the program header(s). */
elf_object_read(header.elf_header_program_header_offset, program_header, (sizeof(ELF_PROGRAM_HEADER)*header.elf_header_program_header_entries));
@@ -194,7 +194,7 @@ unsigned char zero_value;
/* Alocate memory for the section string table. */
- section_string_table = malloc(section_header[header.elf_header_section_string_index].elf_section_header_size);
+ section_string_table = malloc(section_header[header.elf_header_section_string_index].elf_section_header_size);
/* Read the section string table. */
elf_object_read(section_header[header.elf_header_section_string_index].elf_section_header_offset, section_string_table, section_header[header.elf_header_section_string_index].elf_section_header_size);
@@ -315,7 +315,7 @@ unsigned char zero_value;
/* Move address forward. */
address++;
-
+
/* Decrement size. */
size--;
diff --git a/common_modules/module_manager/utilities/module_to_c_array.c b/common_modules/module_manager/utilities/module_to_c_array.c
index fc72092c..37d931f3 100644
--- a/common_modules/module_manager/utilities/module_to_c_array.c
+++ b/common_modules/module_manager/utilities/module_to_c_array.c
@@ -14,7 +14,7 @@ FILE *array_file;
#define ELF_EXECUTABLE 2
-typedef struct ELF_HEADER_STRUCT
+typedef struct ELF_HEADER_STRUCT
{
unsigned char elf_header_id_string[ELF_ID_STRING_SIZE];
unsigned short elf_header_file_type;
@@ -114,12 +114,12 @@ unsigned char *buffer;
for (i = 0; i < object_size; i++)
{
alpha = fgetc(source_file);
-
+
if (alpha == EOF)
return(1);
-
+
buffer[i] = (unsigned char) alpha;
- }
+ }
/* Return success. */
return(0);
@@ -140,7 +140,7 @@ CODE_SECTION_ENTRY code_section_temp;
/* Determine if the proper number of files are provided. */
- if (argc != 3)
+ if (argc != 3)
{
/* Print an error message out and wait for user key hit. */
@@ -163,7 +163,7 @@ CODE_SECTION_ENTRY code_section_temp;
printf(" File: %s ", argv[1]);
return(2);
}
-
+
/* Attempt to open the dump file for writing. */
array_file = fopen(argv[2], "w");
@@ -192,7 +192,7 @@ CODE_SECTION_ENTRY code_section_temp;
/* Allocate memory for the program header(s). */
program_header = malloc(sizeof(ELF_PROGRAM_HEADER)*header.elf_header_program_header_entries);
-
+
/* Read the program header(s). */
elf_object_read(header.elf_header_program_header_offset, program_header, (sizeof(ELF_PROGRAM_HEADER)*header.elf_header_program_header_entries));
@@ -204,7 +204,7 @@ CODE_SECTION_ENTRY code_section_temp;
/* Alocate memory for the section string table. */
- section_string_table = malloc(section_header[header.elf_header_section_string_index].elf_section_header_size);
+ section_string_table = malloc(section_header[header.elf_header_section_string_index].elf_section_header_size);
/* Read the section string table. */
elf_object_read(section_header[header.elf_header_section_string_index].elf_section_header_offset, section_string_table, section_header[header.elf_header_section_string_index].elf_section_header_size);
@@ -260,7 +260,7 @@ CODE_SECTION_ENTRY code_section_temp;
printf("**** Error: No code sections found! **** \n");
fprintf(array_file, "unsigned char module_code[] = {0x00};\n\n");
-
+
/* Close files. */
fclose(source_file);
fclose(array_file);
@@ -337,7 +337,7 @@ CODE_SECTION_ENTRY code_section_temp;
/* Write out the contents of this program area. */
size = code_section_array[i].code_section_size;
-
+
j = 0;
k = 0;
while (size)
@@ -372,7 +372,7 @@ CODE_SECTION_ENTRY code_section_temp;
/* Move address forward. */
address++;
-
+
/* Decrement size. */
size--;
diff --git a/common_smp/CMakeLists.txt b/common_smp/CMakeLists.txt
new file mode 100644
index 00000000..80b9d315
--- /dev/null
+++ b/common_smp/CMakeLists.txt
@@ -0,0 +1,218 @@
+function(target_sources_if_not_overridden filename)
+ list(FIND TX_SRC_OVERRIDES ${filename} OVERRIDE_FOUND)
+ if( OVERRIDE_FOUND EQUAL -1 )
+ # message(STATUS "** Using original ${filename} from common_smp/src **")
+ target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src/${filename})
+ endif()
+endfunction()
+
+# These files can be overridden by setting them in the variable list named TX_SRC_OVERRIDES
+target_sources_if_not_overridden("tx_thread_delete.c")
+target_sources_if_not_overridden("tx_thread_reset.c")
+
+target_sources(${PROJECT_NAME}
+ PRIVATE
+ # {{BEGIN_TARGET_SOURCES}}
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_allocate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_cleanup.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_performance_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_performance_system_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_release.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_allocate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_cleanup.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_performance_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_performance_system_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_search.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_release.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_cleanup.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_performance_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_performance_system_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_set_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_set.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_initialize_high_level.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_initialize_kernel_enter.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_initialize_kernel_setup.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_misra.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_cleanup.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_performance_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_performance_system_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_priority_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_put.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_cleanup.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_flush.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_front_send.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_performance_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_performance_system_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_receive.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_send_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_send.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_ceiling_put.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_cleanup.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_performance_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_performance_system_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_put_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_put.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_entry_exit_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_identify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_performance_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_performance_system_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_preemption_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_priority_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_relinquish.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_reset.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_resume.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_shell_entry.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_sleep.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_core_exclude_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_core_exclude.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_current_state_set.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_debug_entry_insert.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_high_level_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_rebalance_execute_list.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_utilities.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_analyze.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_error_handler.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_error_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_suspend.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_preempt_check.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_resume.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_suspend.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_terminate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_time_slice_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_time_slice.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_timeout.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_wait_abort.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_time_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_time_set.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_activate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_deactivate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_expiration_process.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_performance_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_performance_system_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_smp_core_exclude_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_smp_core_exclude.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_system_activate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_system_deactivate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_thread_entry.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_buffer_full_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_disable.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_enable.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_event_filter.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_event_unfilter.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_interrupt_control.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_isr_enter_insert.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_isr_exit_insert.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_object_register.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_object_unregister.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_user_event_insert.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_allocate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_pool_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_pool_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_pool_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_pool_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_release.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_allocate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_pool_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_pool_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_pool_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_pool_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_release.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_set_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_set.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_put.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_flush.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_front_send.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_receive.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_send_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_send.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_ceiling_put.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_put_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_put.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_entry_exit_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_preemption_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_priority_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_relinquish.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_reset.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_resume.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_suspend.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_terminate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_time_slice_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_wait_abort.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_activate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_deactivate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_info_get.c
+ # {{END_TARGET_SOURCES}}
+)
+
+# Add the Common/inc directory to the project include list
+target_include_directories(${PROJECT_NAME}
+ SYSTEM
+ PUBLIC
+ ${CMAKE_CURRENT_LIST_DIR}/inc
+)
diff --git a/common_smp/inc/tx_api.h b/common_smp/inc/tx_api.h
index f18a3f20..7d0ccbe5 100644
--- a/common_smp/inc/tx_api.h
+++ b/common_smp/inc/tx_api.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -38,63 +39,6 @@
/* Please note that basic data type definitions and other architecture-*/
/* specific information is contained in the file tx_port.h. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-16-2020 William E. Lamie Modified comment(s), and */
-/* increased patch version, */
-/* resulting in version 6.1.1 */
-/* 12-31-2020 William E. Lamie Modified comment(s), and */
-/* increased patch version, */
-/* resulting in version 6.1.3 */
-/* 03-02-2021 Scott Larson Modified comment(s), and */
-/* order defines numerically, */
-/* add option to remove FileX */
-/* pointer, fix whitespace, */
-/* resulting in version 6.1.5 */
-/* 04-02-2021 Scott Larson Modified comment(s), and */
-/* update patch number, */
-/* resulting in version 6.1.6 */
-/* 06-02-2021 Scott Larson Added options for multiple */
-/* block pool search & delay, */
-/* resulting in version 6.1.7 */
-/* 08-02-2021 Scott Larson Modified comment(s), and */
-/* update patch number, */
-/* resulting in version 6.1.8 */
-/* 10-15-2021 Yuxin Zhou Modified comment(s), */
-/* update patch number, */
-/* resulting in version 6.1.9 */
-/* 01-31-2022 Scott Larson Modified comment(s), */
-/* add unused parameter macro, */
-/* update patch number, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Wenhui Xie Modified comment(s), */
-/* optimized the definition of */
-/* TX_TIMER_TICKS_PER_SECOND, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comment(s), */
-/* update patch number, */
-/* resulting in version 6.1.12 */
-/* 10-31-2022 Scott Larson Modified comment(s), */
-/* add extension macros, */
-/* update version numbers, */
-/* resulting in version 6.2.0 */
-/* 03-08-2023 Tiejun Zhou Modified comment(s), */
-/* update patch number, */
-/* resulting in version 6.2.1 */
-/* 10-31-2023 Xiuwen Cai Modified comment(s), */
-/* added option for random */
-/* number stack filling, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Tiejun Zhou Modified comment(s), */
-/* update version number, */
-/* resulting in version 6.4.0 */
-/* 03-01-2024 Tiejun Zhou Modified comment(s), */
-/* update version number, */
-/* resulting in version 6.4.1 */
-/* */
/**************************************************************************/
#ifndef TX_API_H
@@ -132,9 +76,10 @@ extern "C" {
#ifndef TX_BYTE_POOL_MULTIPLE_BLOCK_SEARCH
#define TX_BYTE_POOL_MULTIPLE_BLOCK_SEARCH 20
#endif
-#ifndef TX_BTYE_POOL_DELAY_VALUE
+
+#ifndef TX_BYTE_POOL_DELAY_VALUE
#define TX_BYTE_POOL_DELAY_VALUE 3
-#endif
+#endif /* TX_BYTE_POOL_DELAY_VALUE */
/* Define basic constants for the ThreadX kernel. */
@@ -145,8 +90,11 @@ extern "C" {
#define AZURE_RTOS_THREADX
#define THREADX_MAJOR_VERSION 6
-#define THREADX_MINOR_VERSION 4
-#define THREADX_PATCH_VERSION 1
+#define THREADX_MINOR_VERSION 5
+#define THREADX_PATCH_VERSION 0
+#define THREADX_BUILD_VERSION 202601
+#define THREADX_HOTFIX_VERSION ' '
+
/* Define the following symbol for backward compatibility */
#define EL_PRODUCT_THREADX
@@ -327,6 +275,14 @@ extern "C" {
#endif
+/* Define the default maximum message size in a queue. The default value is TX_16_ULONG, but may
+ be customized in tx_user.h or as a compilation option. */
+
+#ifndef TX_QUEUE_MESSAGE_MAX_SIZE
+#define TX_QUEUE_MESSAGE_MAX_SIZE TX_16_ULONG
+#endif
+
+
/* Event numbers 0 through 4095 are reserved by Azure RTOS. Specific event assignments are:
ThreadX events: 1-199
@@ -653,7 +609,7 @@ typedef struct TX_THREAD_STRUCT
ULONG tx_thread_suspension_sequence;
#if defined(TX_ENABLE_RANDOM_NUMBER_STACK_FILLING) && defined(TX_ENABLE_STACK_CHECKING)
-
+
/* Define the random stack fill number. This can be used to detect stack overflow. */
ULONG tx_thread_stack_fill_value;
#endif
diff --git a/common_smp/inc/tx_block_pool.h b/common_smp/inc/tx_block_pool.h
index 2a8bb51e..89c9dfbe 100644
--- a/common_smp/inc/tx_block_pool.h
+++ b/common_smp/inc/tx_block_pool.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,14 +37,6 @@
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_BLOCK_POOL_H
diff --git a/common_smp/inc/tx_byte_pool.h b/common_smp/inc/tx_byte_pool.h
index 8f1050fa..b9f34311 100644
--- a/common_smp/inc/tx_byte_pool.h
+++ b/common_smp/inc/tx_byte_pool.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,14 +37,6 @@
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_BYTE_POOL_H
diff --git a/common_smp/inc/tx_event_flags.h b/common_smp/inc/tx_event_flags.h
index 51e99536..6506dd13 100644
--- a/common_smp/inc/tx_event_flags.h
+++ b/common_smp/inc/tx_event_flags.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,14 +37,6 @@
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_EVENT_FLAGS_H
diff --git a/common_smp/inc/tx_initialize.h b/common_smp/inc/tx_initialize.h
index 28c7251b..fd944965 100644
--- a/common_smp/inc/tx_initialize.h
+++ b/common_smp/inc/tx_initialize.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,14 +37,6 @@
/* data types and external references. It is assumed that tx_api.h */
/* and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_INITIALIZE_H
diff --git a/common_smp/inc/tx_mutex.h b/common_smp/inc/tx_mutex.h
index a3b52386..b0b46c2f 100644
--- a/common_smp/inc/tx_mutex.h
+++ b/common_smp/inc/tx_mutex.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,14 +37,6 @@
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_MUTEX_H
diff --git a/common_smp/inc/tx_queue.h b/common_smp/inc/tx_queue.h
index 7074a91e..c8b4122c 100644
--- a/common_smp/inc/tx_queue.h
+++ b/common_smp/inc/tx_queue.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,14 +37,6 @@
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_QUEUE_H
diff --git a/common_smp/inc/tx_semaphore.h b/common_smp/inc/tx_semaphore.h
index 6784e58f..baf292bd 100644
--- a/common_smp/inc/tx_semaphore.h
+++ b/common_smp/inc/tx_semaphore.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,14 +37,6 @@
/* including all data types and external references. It is assumed */
/* that tx_api.h and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_SEMAPHORE_H
diff --git a/common_smp/inc/tx_thread.h b/common_smp/inc/tx_thread.h
index 8bd68438..7dc7801b 100644
--- a/common_smp/inc/tx_thread.h
+++ b/common_smp/inc/tx_thread.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,14 +37,6 @@
/* data types and external references. It is assumed that tx_api.h */
/* and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Fixed MISRA2012 rule 8.3, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#ifndef TX_THREAD_H
diff --git a/common_smp/inc/tx_timer.h b/common_smp/inc/tx_timer.h
index d8277082..71a65b27 100644
--- a/common_smp/inc/tx_timer.h
+++ b/common_smp/inc/tx_timer.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,12 +37,6 @@
/* data types and external references. It is assumed that tx_api.h */
/* and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_TIMER_H
diff --git a/common_smp/inc/tx_trace.h b/common_smp/inc/tx_trace.h
index 07da204b..ea0e59e5 100644
--- a/common_smp/inc/tx_trace.h
+++ b/common_smp/inc/tx_trace.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -35,14 +36,6 @@
/* and structure definitions as well as external references. It is */
/* assumed that tx_api.h and tx_port.h have already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
diff --git a/common_smp/inc/tx_user_sample.h b/common_smp/inc/tx_user_sample.h
index e7ecb56a..64ff9aed 100644
--- a/common_smp/inc/tx_user_sample.h
+++ b/common_smp/inc/tx_user_sample.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,33 +40,6 @@
/* Note that all the defines in this file may also be made on the */
/* command line when building ThreadX library and application objects. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 03-02-2021 Scott Larson Modified comment(s), */
-/* added option to remove */
-/* FileX pointer, */
-/* resulting in version 6.1.5 */
-/* 06-02-2021 Scott Larson Added options for multiple */
-/* block pool search & delay, */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Yuxin Zhou Modified comment(s), added */
-/* user-configurable symbol */
-/* TX_TIMER_TICKS_PER_SECOND */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Wenhui Xie Modified comment(s), */
-/* optimized the definition of */
-/* TX_TIMER_TICKS_PER_SECOND, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Xiuwen Cai Modified comment(s), */
-/* added option for random */
-/* number stack filling, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#ifndef TX_USER_H
@@ -175,7 +149,7 @@
/* Determine if random number is used for stack filling. By default, ThreadX uses a fixed
pattern for stack filling. When the following is defined, ThreadX uses a random number
- for stack filling. This is effective only when TX_ENABLE_STACK_CHECKING is defined. */
+ for stack filling. This is effective only when TX_ENABLE_STACK_CHECKING is defined. */
/*
#define TX_ENABLE_RANDOM_NUMBER_STACK_FILLING
diff --git a/common_smp/src/tx_block_allocate.c b/common_smp/src/tx_block_allocate.c
index b2c7bef5..78619603 100644
--- a/common_smp/src/tx_block_allocate.c
+++ b/common_smp/src/tx_block_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option)
{
diff --git a/common_smp/src/tx_block_pool_cleanup.c b/common_smp/src/tx_block_pool_cleanup.c
index 9bae546d..7bcfecd8 100644
--- a/common_smp/src/tx_block_pool_cleanup.c
+++ b/common_smp/src/tx_block_pool_cleanup.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* _tx_thread_terminate Thread terminate processing */
/* _tx_thread_wait_abort Thread wait abort processing */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_block_pool_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence)
{
diff --git a/common_smp/src/tx_block_pool_create.c b/common_smp/src/tx_block_pool_create.c
index 54612019..1d2c803c 100644
--- a/common_smp/src/tx_block_pool_create.c
+++ b/common_smp/src/tx_block_pool_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size,
VOID *pool_start, ULONG pool_size)
diff --git a/common_smp/src/tx_block_pool_delete.c b/common_smp/src/tx_block_pool_delete.c
index da27ef57..19ecb055 100644
--- a/common_smp/src/tx_block_pool_delete.c
+++ b/common_smp/src/tx_block_pool_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_block_pool_delete(TX_BLOCK_POOL *pool_ptr)
{
diff --git a/common_smp/src/tx_block_pool_info_get.c b/common_smp/src/tx_block_pool_info_get.c
index aebd0db6..5998f1db 100644
--- a/common_smp/src/tx_block_pool_info_get.c
+++ b/common_smp/src/tx_block_pool_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks,
ULONG *total_blocks, TX_THREAD **first_suspended,
diff --git a/common_smp/src/tx_block_pool_initialize.c b/common_smp/src/tx_block_pool_initialize.c
index 21132159..e01eba32 100644
--- a/common_smp/src/tx_block_pool_initialize.c
+++ b/common_smp/src/tx_block_pool_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -97,17 +98,6 @@ ULONG _tx_block_pool_performance_timeout_count;
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* opt out of function when */
-/* TX_INLINE_INITIALIZATION is */
-/* defined, */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_block_pool_initialize(VOID)
{
diff --git a/common_smp/src/tx_block_pool_performance_info_get.c b/common_smp/src/tx_block_pool_performance_info_get.c
index 84f68026..aecf7851 100644
--- a/common_smp/src/tx_block_pool_performance_info_get.c
+++ b/common_smp/src/tx_block_pool_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,14 +71,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_block_pool_performance_info_get(TX_BLOCK_POOL *pool_ptr, ULONG *allocates, ULONG *releases,
ULONG *suspensions, ULONG *timeouts)
diff --git a/common_smp/src/tx_block_pool_performance_system_info_get.c b/common_smp/src/tx_block_pool_performance_system_info_get.c
index 0707295d..86627dd0 100644
--- a/common_smp/src/tx_block_pool_performance_system_info_get.c
+++ b/common_smp/src/tx_block_pool_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_block_pool_performance_system_info_get(ULONG *allocates, ULONG *releases, ULONG *suspensions, ULONG *timeouts)
{
diff --git a/common_smp/src/tx_block_pool_prioritize.c b/common_smp/src/tx_block_pool_prioritize.c
index c4ee4e94..89c2d634 100644
--- a/common_smp/src/tx_block_pool_prioritize.c
+++ b/common_smp/src/tx_block_pool_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_block_pool_prioritize(TX_BLOCK_POOL *pool_ptr)
{
diff --git a/common_smp/src/tx_block_release.c b/common_smp/src/tx_block_release.c
index 3b94c1bb..4a11fe08 100644
--- a/common_smp/src/tx_block_release.c
+++ b/common_smp/src/tx_block_release.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_block_release(VOID *block_ptr)
{
diff --git a/common_smp/src/tx_byte_allocate.c b/common_smp/src/tx_byte_allocate.c
index 69e837e3..2e1a2e5e 100644
--- a/common_smp/src/tx_byte_allocate.c
+++ b/common_smp/src/tx_byte_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -69,14 +70,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr, ULONG memory_size, ULONG wait_option)
{
diff --git a/common_smp/src/tx_byte_pool_cleanup.c b/common_smp/src/tx_byte_pool_cleanup.c
index a1260c5b..3a7acd54 100644
--- a/common_smp/src/tx_byte_pool_cleanup.c
+++ b/common_smp/src/tx_byte_pool_cleanup.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* _tx_thread_terminate Thread terminate processing */
/* _tx_thread_wait_abort Thread wait abort processing */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_byte_pool_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence)
{
diff --git a/common_smp/src/tx_byte_pool_create.c b/common_smp/src/tx_byte_pool_create.c
index 439eed7c..21abbe35 100644
--- a/common_smp/src/tx_byte_pool_create.c
+++ b/common_smp/src/tx_byte_pool_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, ULONG pool_size)
{
diff --git a/common_smp/src/tx_byte_pool_delete.c b/common_smp/src/tx_byte_pool_delete.c
index fc3d9be1..3a24705f 100644
--- a/common_smp/src/tx_byte_pool_delete.c
+++ b/common_smp/src/tx_byte_pool_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_byte_pool_delete(TX_BYTE_POOL *pool_ptr)
{
diff --git a/common_smp/src/tx_byte_pool_info_get.c b/common_smp/src/tx_byte_pool_info_get.c
index 339aa771..bd096440 100644
--- a/common_smp/src/tx_byte_pool_info_get.c
+++ b/common_smp/src/tx_byte_pool_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes,
ULONG *fragments, TX_THREAD **first_suspended,
diff --git a/common_smp/src/tx_byte_pool_initialize.c b/common_smp/src/tx_byte_pool_initialize.c
index 65514536..652ec829 100644
--- a/common_smp/src/tx_byte_pool_initialize.c
+++ b/common_smp/src/tx_byte_pool_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -112,17 +113,6 @@ ULONG _tx_byte_pool_performance_timeout_count;
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* opt out of function when */
-/* TX_INLINE_INITIALIZATION is */
-/* defined, */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_byte_pool_initialize(VOID)
{
diff --git a/common_smp/src/tx_byte_pool_performance_info_get.c b/common_smp/src/tx_byte_pool_performance_info_get.c
index 400804a2..6c2fd615 100644
--- a/common_smp/src/tx_byte_pool_performance_info_get.c
+++ b/common_smp/src/tx_byte_pool_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,14 +79,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_byte_pool_performance_info_get(TX_BYTE_POOL *pool_ptr, ULONG *allocates, ULONG *releases,
ULONG *fragments_searched, ULONG *merges, ULONG *splits, ULONG *suspensions, ULONG *timeouts)
diff --git a/common_smp/src/tx_byte_pool_performance_system_info_get.c b/common_smp/src/tx_byte_pool_performance_system_info_get.c
index 266e2767..23f41c47 100644
--- a/common_smp/src/tx_byte_pool_performance_system_info_get.c
+++ b/common_smp/src/tx_byte_pool_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -75,14 +76,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_byte_pool_performance_system_info_get(ULONG *allocates, ULONG *releases,
ULONG *fragments_searched, ULONG *merges, ULONG *splits, ULONG *suspensions, ULONG *timeouts)
diff --git a/common_smp/src/tx_byte_pool_prioritize.c b/common_smp/src/tx_byte_pool_prioritize.c
index 0076e503..dc2ecc03 100644
--- a/common_smp/src/tx_byte_pool_prioritize.c
+++ b/common_smp/src/tx_byte_pool_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_byte_pool_prioritize(TX_BYTE_POOL *pool_ptr)
{
diff --git a/common_smp/src/tx_byte_pool_search.c b/common_smp/src/tx_byte_pool_search.c
index 7f24ee69..712c9489 100644
--- a/common_smp/src/tx_byte_pool_search.c
+++ b/common_smp/src/tx_byte_pool_search.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,18 +72,6 @@
/* _tx_byte_allocate Allocate bytes of memory */
/* _tx_byte_release Release bytes of memory */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 06-02-2021 Scott Larson Improve possible free bytes */
-/* calculation, and reduced */
-/* number of search resets, */
-/* resulting in version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Fixed MISRA2012 rule 10.4_a, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
UCHAR *_tx_byte_pool_search(TX_BYTE_POOL *pool_ptr, ULONG memory_size)
{
diff --git a/common_smp/src/tx_byte_release.c b/common_smp/src/tx_byte_release.c
index 387320ba..b56665ed 100644
--- a/common_smp/src/tx_byte_release.c
+++ b/common_smp/src/tx_byte_release.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_byte_release(VOID *memory_ptr)
{
diff --git a/common_smp/src/tx_event_flags_cleanup.c b/common_smp/src/tx_event_flags_cleanup.c
index 3f870564..ac7bc68b 100644
--- a/common_smp/src/tx_event_flags_cleanup.c
+++ b/common_smp/src/tx_event_flags_cleanup.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* _tx_thread_terminate Thread terminate processing */
/* _tx_thread_wait_abort Thread wait abort processing */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_event_flags_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence)
{
diff --git a/common_smp/src/tx_event_flags_create.c b/common_smp/src/tx_event_flags_create.c
index 2195527a..2a9c042d 100644
--- a/common_smp/src/tx_event_flags_create.c
+++ b/common_smp/src/tx_event_flags_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr)
{
diff --git a/common_smp/src/tx_event_flags_delete.c b/common_smp/src/tx_event_flags_delete.c
index 2b7c890a..777f2491 100644
--- a/common_smp/src/tx_event_flags_delete.c
+++ b/common_smp/src/tx_event_flags_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr)
{
diff --git a/common_smp/src/tx_event_flags_get.c b/common_smp/src/tx_event_flags_get.c
index 4e9abb80..3136d159 100644
--- a/common_smp/src/tx_event_flags_get.c
+++ b/common_smp/src/tx_event_flags_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,20 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 04-25-2022 Scott Larson Modified comment(s), */
-/* handle 0 flags case, */
-/* resulting in version 6.1.11 */
-/* 10-31-2022 Scott Larson Modified comment(s), always */
-/* return actual flags, */
-/* resulting in version 6.2.0 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags,
UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option)
diff --git a/common_smp/src/tx_event_flags_info_get.c b/common_smp/src/tx_event_flags_info_get.c
index 9d409bc5..21e85c9a 100644
--- a/common_smp/src/tx_event_flags_info_get.c
+++ b/common_smp/src/tx_event_flags_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -69,14 +70,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags,
TX_THREAD **first_suspended, ULONG *suspended_count,
diff --git a/common_smp/src/tx_event_flags_initialize.c b/common_smp/src/tx_event_flags_initialize.c
index f7b107c8..d5cd72b9 100644
--- a/common_smp/src/tx_event_flags_initialize.c
+++ b/common_smp/src/tx_event_flags_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -98,17 +99,6 @@ ULONG _tx_event_flags_performance_timeout_count;
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* opt out of function when */
-/* TX_INLINE_INITIALIZATION is */
-/* defined, */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_event_flags_initialize(VOID)
{
diff --git a/common_smp/src/tx_event_flags_performance_info_get.c b/common_smp/src/tx_event_flags_performance_info_get.c
index c0529b03..213c2d2a 100644
--- a/common_smp/src/tx_event_flags_performance_info_get.c
+++ b/common_smp/src/tx_event_flags_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,14 +72,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_performance_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG *sets, ULONG *gets,
ULONG *suspensions, ULONG *timeouts)
diff --git a/common_smp/src/tx_event_flags_performance_system_info_get.c b/common_smp/src/tx_event_flags_performance_system_info_get.c
index 3f1570df..4902b0e1 100644
--- a/common_smp/src/tx_event_flags_performance_system_info_get.c
+++ b/common_smp/src/tx_event_flags_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_performance_system_info_get(ULONG *sets, ULONG *gets, ULONG *suspensions, ULONG *timeouts)
{
diff --git a/common_smp/src/tx_event_flags_set.c b/common_smp/src/tx_event_flags_set.c
index 8309be14..749343c8 100644
--- a/common_smp/src/tx_event_flags_set.c
+++ b/common_smp/src/tx_event_flags_set.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,18 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 04-25-2022 William E. Lamie Modified comment(s), and */
-/* added corrected preemption */
-/* check logic, resulting in */
-/* version 6.1.11 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_set(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG flags_to_set, UINT set_option)
{
@@ -336,8 +325,8 @@ VOID (*events_set_notify)(struct TX_EVENT_FLAGS_GROUP_STRUCT *notify_
/* Disable preemption while we process the suspended list. */
_tx_thread_preempt_disable++;
- /* Since we have temporarily disabled preemption globally, set the preempt
- check flag to check for any preemption condition - including from
+ /* Since we have temporarily disabled preemption globally, set the preempt
+ check flag to check for any preemption condition - including from
unrelated ISR processing. */
preempt_check = TX_TRUE;
diff --git a/common_smp/src/tx_event_flags_set_notify.c b/common_smp/src/tx_event_flags_set_notify.c
index ab2b9a1c..4cafdd57 100644
--- a/common_smp/src/tx_event_flags_set_notify.c
+++ b/common_smp/src/tx_event_flags_set_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_event_flags_set_notify(TX_EVENT_FLAGS_GROUP *group_ptr, VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *notify_group_ptr))
{
diff --git a/common_smp/src/tx_initialize_high_level.c b/common_smp/src/tx_initialize_high_level.c
index b7224551..77bc3ed7 100644
--- a/common_smp/src/tx_initialize_high_level.c
+++ b/common_smp/src/tx_initialize_high_level.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -100,14 +101,6 @@ VOID *_tx_initialize_unused_memory;
/* is optionally called by */
/* compiler's startup code. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_initialize_high_level(VOID)
{
diff --git a/common_smp/src/tx_initialize_kernel_enter.c b/common_smp/src/tx_initialize_kernel_enter.c
index 89c94dba..5fa71b8f 100644
--- a/common_smp/src/tx_initialize_kernel_enter.c
+++ b/common_smp/src/tx_initialize_kernel_enter.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -82,16 +83,6 @@ TX_SAFETY_CRITICAL_EXCEPTION_HANDLER
/* */
/* main Application main program */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Xiuwen Cai Modified comment(s), */
-/* added random generator */
-/* initialization, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
VOID _tx_initialize_kernel_enter(VOID)
{
diff --git a/common_smp/src/tx_initialize_kernel_setup.c b/common_smp/src/tx_initialize_kernel_setup.c
index 2cc5e68e..1e750dbd 100644
--- a/common_smp/src/tx_initialize_kernel_setup.c
+++ b/common_smp/src/tx_initialize_kernel_setup.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,12 +67,6 @@
/* */
/* startup code Compiler startup code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_initialize_kernel_setup(VOID)
{
diff --git a/common_smp/src/tx_misra.c b/common_smp/src/tx_misra.c
index 49b6cf65..f5dd5f53 100644
--- a/common_smp/src/tx_misra.c
+++ b/common_smp/src/tx_misra.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -30,7 +31,7 @@
#ifdef TX_MISRA_ENABLE
#define TX_THREAD_INIT
-//CHAR _tx_version_id[100] = "Copyright (c) 2024 Microsoft Corporation. * ThreadX 6.1 MISRA C Compliant *";
+//CHAR _tx_version_id[100] = "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX 6.1 MISRA C Compliant *";
#include "tx_api.h"
#include "tx_thread.h"
diff --git a/common_smp/src/tx_mutex_cleanup.c b/common_smp/src/tx_mutex_cleanup.c
index 09acbf4d..d32f69fc 100644
--- a/common_smp/src/tx_mutex_cleanup.c
+++ b/common_smp/src/tx_mutex_cleanup.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* _tx_thread_terminate Thread terminate processing */
/* _tx_thread_wait_abort Thread wait abort processing */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_mutex_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence)
{
diff --git a/common_smp/src/tx_mutex_create.c b/common_smp/src/tx_mutex_create.c
index 993bf344..436c01f5 100644
--- a/common_smp/src/tx_mutex_create.c
+++ b/common_smp/src/tx_mutex_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit)
{
diff --git a/common_smp/src/tx_mutex_delete.c b/common_smp/src/tx_mutex_delete.c
index ca5aeca8..9c0a5aac 100644
--- a/common_smp/src/tx_mutex_delete.c
+++ b/common_smp/src/tx_mutex_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_mutex_delete(TX_MUTEX *mutex_ptr)
{
diff --git a/common_smp/src/tx_mutex_get.c b/common_smp/src/tx_mutex_get.c
index 91e97f14..402a0f0d 100644
--- a/common_smp/src/tx_mutex_get.c
+++ b/common_smp/src/tx_mutex_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option)
{
diff --git a/common_smp/src/tx_mutex_info_get.c b/common_smp/src/tx_mutex_info_get.c
index 219bcc18..a24d1e30 100644
--- a/common_smp/src/tx_mutex_info_get.c
+++ b/common_smp/src/tx_mutex_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner,
TX_THREAD **first_suspended, ULONG *suspended_count,
diff --git a/common_smp/src/tx_mutex_initialize.c b/common_smp/src/tx_mutex_initialize.c
index ea2ca458..98460cd6 100644
--- a/common_smp/src/tx_mutex_initialize.c
+++ b/common_smp/src/tx_mutex_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -107,17 +108,6 @@ ULONG _tx_mutex_performance__priority_inheritance_count;
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* opt out of function when */
-/* TX_INLINE_INITIALIZATION is */
-/* defined, */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_mutex_initialize(VOID)
{
diff --git a/common_smp/src/tx_mutex_performance_info_get.c b/common_smp/src/tx_mutex_performance_info_get.c
index 501a417a..0704c111 100644
--- a/common_smp/src/tx_mutex_performance_info_get.c
+++ b/common_smp/src/tx_mutex_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -73,14 +74,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_mutex_performance_info_get(TX_MUTEX *mutex_ptr, ULONG *puts, ULONG *gets,
ULONG *suspensions, ULONG *timeouts, ULONG *inversions, ULONG *inheritances)
diff --git a/common_smp/src/tx_mutex_performance_system_info_get.c b/common_smp/src/tx_mutex_performance_system_info_get.c
index 9ca17197..458a5945 100644
--- a/common_smp/src/tx_mutex_performance_system_info_get.c
+++ b/common_smp/src/tx_mutex_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,14 +73,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_mutex_performance_system_info_get(ULONG *puts, ULONG *gets, ULONG *suspensions,
ULONG *timeouts, ULONG *inversions, ULONG *inheritances)
diff --git a/common_smp/src/tx_mutex_prioritize.c b/common_smp/src/tx_mutex_prioritize.c
index 3006b7d0..6522307d 100644
--- a/common_smp/src/tx_mutex_prioritize.c
+++ b/common_smp/src/tx_mutex_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_mutex_prioritize(TX_MUTEX *mutex_ptr)
{
diff --git a/common_smp/src/tx_mutex_priority_change.c b/common_smp/src/tx_mutex_priority_change.c
index e7d2eeaf..8722a8fb 100644
--- a/common_smp/src/tx_mutex_priority_change.c
+++ b/common_smp/src/tx_mutex_priority_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,12 +72,6 @@
/* _tx_mutex_get Inherit priority */
/* _tx_mutex_put Restore previous priority */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_mutex_priority_change(TX_THREAD *thread_ptr, UINT new_priority)
{
diff --git a/common_smp/src/tx_mutex_put.c b/common_smp/src/tx_mutex_put.c
index 6ac5065d..062472a2 100644
--- a/common_smp/src/tx_mutex_put.c
+++ b/common_smp/src/tx_mutex_put.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_mutex_put(TX_MUTEX *mutex_ptr)
{
diff --git a/common_smp/src/tx_queue_cleanup.c b/common_smp/src/tx_queue_cleanup.c
index 82d02f45..05a423b3 100644
--- a/common_smp/src/tx_queue_cleanup.c
+++ b/common_smp/src/tx_queue_cleanup.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* _tx_thread_terminate Thread terminate processing */
/* _tx_thread_wait_abort Thread wait abort processing */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_queue_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence)
{
diff --git a/common_smp/src/tx_queue_create.c b/common_smp/src/tx_queue_create.c
index 00edbad9..59ae154e 100644
--- a/common_smp/src/tx_queue_create.c
+++ b/common_smp/src/tx_queue_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size,
VOID *queue_start, ULONG queue_size)
diff --git a/common_smp/src/tx_queue_delete.c b/common_smp/src/tx_queue_delete.c
index 9887b160..6a2bcf6f 100644
--- a/common_smp/src/tx_queue_delete.c
+++ b/common_smp/src/tx_queue_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_delete(TX_QUEUE *queue_ptr)
{
diff --git a/common_smp/src/tx_queue_flush.c b/common_smp/src/tx_queue_flush.c
index 5120c898..b721cf50 100644
--- a/common_smp/src/tx_queue_flush.c
+++ b/common_smp/src/tx_queue_flush.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_flush(TX_QUEUE *queue_ptr)
{
diff --git a/common_smp/src/tx_queue_front_send.c b/common_smp/src/tx_queue_front_send.c
index 5e8b4104..bb39b970 100644
--- a/common_smp/src/tx_queue_front_send.c
+++ b/common_smp/src/tx_queue_front_send.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option)
{
diff --git a/common_smp/src/tx_queue_info_get.c b/common_smp/src/tx_queue_info_get.c
index 3b37b37f..d0ecb2b6 100644
--- a/common_smp/src/tx_queue_info_get.c
+++ b/common_smp/src/tx_queue_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage,
TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue)
diff --git a/common_smp/src/tx_queue_initialize.c b/common_smp/src/tx_queue_initialize.c
index 7a811234..eb34f18b 100644
--- a/common_smp/src/tx_queue_initialize.c
+++ b/common_smp/src/tx_queue_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -105,17 +106,6 @@ ULONG _tx_queue_performance_timeout_count;
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* opt out of function when */
-/* TX_INLINE_INITIALIZATION is */
-/* defined, */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_queue_initialize(VOID)
{
diff --git a/common_smp/src/tx_queue_performance_info_get.c b/common_smp/src/tx_queue_performance_info_get.c
index 721a7e5f..7c426515 100644
--- a/common_smp/src/tx_queue_performance_info_get.c
+++ b/common_smp/src/tx_queue_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,14 +73,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_performance_info_get(TX_QUEUE *queue_ptr, ULONG *messages_sent, ULONG *messages_received,
ULONG *empty_suspensions, ULONG *full_suspensions, ULONG *full_errors, ULONG *timeouts)
diff --git a/common_smp/src/tx_queue_performance_system_info_get.c b/common_smp/src/tx_queue_performance_system_info_get.c
index 87cfb4a6..306c97a2 100644
--- a/common_smp/src/tx_queue_performance_system_info_get.c
+++ b/common_smp/src/tx_queue_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,14 +73,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_performance_system_info_get(ULONG *messages_sent, ULONG *messages_received,
ULONG *empty_suspensions, ULONG *full_suspensions, ULONG *full_errors, ULONG *timeouts)
diff --git a/common_smp/src/tx_queue_prioritize.c b/common_smp/src/tx_queue_prioritize.c
index 4f875078..dbea0a6b 100644
--- a/common_smp/src/tx_queue_prioritize.c
+++ b/common_smp/src/tx_queue_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_prioritize(TX_QUEUE *queue_ptr)
{
diff --git a/common_smp/src/tx_queue_receive.c b/common_smp/src/tx_queue_receive.c
index 31a22f94..a6ab0390 100644
--- a/common_smp/src/tx_queue_receive.c
+++ b/common_smp/src/tx_queue_receive.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -69,14 +70,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_receive(TX_QUEUE *queue_ptr, VOID *destination_ptr, ULONG wait_option)
{
diff --git a/common_smp/src/tx_queue_send.c b/common_smp/src/tx_queue_send.c
index 3ca970a0..7d22f5b9 100644
--- a/common_smp/src/tx_queue_send.c
+++ b/common_smp/src/tx_queue_send.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option)
{
diff --git a/common_smp/src/tx_queue_send_notify.c b/common_smp/src/tx_queue_send_notify.c
index f46d153a..05af2f03 100644
--- a/common_smp/src/tx_queue_send_notify.c
+++ b/common_smp/src/tx_queue_send_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_queue_send_notify(TX_QUEUE *queue_ptr, VOID (*queue_send_notify)(TX_QUEUE *notify_queue_ptr))
{
diff --git a/common_smp/src/tx_semaphore_ceiling_put.c b/common_smp/src/tx_semaphore_ceiling_put.c
index a72b094a..9b02e731 100644
--- a/common_smp/src/tx_semaphore_ceiling_put.c
+++ b/common_smp/src/tx_semaphore_ceiling_put.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling)
{
diff --git a/common_smp/src/tx_semaphore_cleanup.c b/common_smp/src/tx_semaphore_cleanup.c
index 512f6c60..0e3cd965 100644
--- a/common_smp/src/tx_semaphore_cleanup.c
+++ b/common_smp/src/tx_semaphore_cleanup.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* _tx_thread_terminate Thread terminate processing */
/* _tx_thread_wait_abort Thread wait abort processing */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_semaphore_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence)
{
diff --git a/common_smp/src/tx_semaphore_create.c b/common_smp/src/tx_semaphore_create.c
index 3acf3f41..849f5d3b 100644
--- a/common_smp/src/tx_semaphore_create.c
+++ b/common_smp/src/tx_semaphore_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count)
{
diff --git a/common_smp/src/tx_semaphore_delete.c b/common_smp/src/tx_semaphore_delete.c
index eee19755..8a0515a0 100644
--- a/common_smp/src/tx_semaphore_delete.c
+++ b/common_smp/src/tx_semaphore_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_delete(TX_SEMAPHORE *semaphore_ptr)
{
diff --git a/common_smp/src/tx_semaphore_get.c b/common_smp/src/tx_semaphore_get.c
index 5a471997..52802da1 100644
--- a/common_smp/src/tx_semaphore_get.c
+++ b/common_smp/src/tx_semaphore_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option)
{
diff --git a/common_smp/src/tx_semaphore_info_get.c b/common_smp/src/tx_semaphore_info_get.c
index 70e98a71..89fd9423 100644
--- a/common_smp/src/tx_semaphore_info_get.c
+++ b/common_smp/src/tx_semaphore_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value,
TX_THREAD **first_suspended, ULONG *suspended_count,
diff --git a/common_smp/src/tx_semaphore_initialize.c b/common_smp/src/tx_semaphore_initialize.c
index 84358cc5..d2b169df 100644
--- a/common_smp/src/tx_semaphore_initialize.c
+++ b/common_smp/src/tx_semaphore_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -97,17 +98,6 @@ ULONG _tx_semaphore_performance_timeout_count;
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* opt out of function when */
-/* TX_INLINE_INITIALIZATION is */
-/* defined, */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_semaphore_initialize(VOID)
{
diff --git a/common_smp/src/tx_semaphore_performance_info_get.c b/common_smp/src/tx_semaphore_performance_info_get.c
index a623705f..4c7ffa4e 100644
--- a/common_smp/src/tx_semaphore_performance_info_get.c
+++ b/common_smp/src/tx_semaphore_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,14 +71,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_performance_info_get(TX_SEMAPHORE *semaphore_ptr, ULONG *puts, ULONG *gets,
ULONG *suspensions, ULONG *timeouts)
diff --git a/common_smp/src/tx_semaphore_performance_system_info_get.c b/common_smp/src/tx_semaphore_performance_system_info_get.c
index 5245d00b..db17c937 100644
--- a/common_smp/src/tx_semaphore_performance_system_info_get.c
+++ b/common_smp/src/tx_semaphore_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_performance_system_info_get(ULONG *puts, ULONG *gets, ULONG *suspensions, ULONG *timeouts)
{
diff --git a/common_smp/src/tx_semaphore_prioritize.c b/common_smp/src/tx_semaphore_prioritize.c
index 56245df8..eec5e7b7 100644
--- a/common_smp/src/tx_semaphore_prioritize.c
+++ b/common_smp/src/tx_semaphore_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_prioritize(TX_SEMAPHORE *semaphore_ptr)
{
diff --git a/common_smp/src/tx_semaphore_put.c b/common_smp/src/tx_semaphore_put.c
index dacd0db0..1ce9d145 100644
--- a/common_smp/src/tx_semaphore_put.c
+++ b/common_smp/src/tx_semaphore_put.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_put(TX_SEMAPHORE *semaphore_ptr)
{
diff --git a/common_smp/src/tx_semaphore_put_notify.c b/common_smp/src/tx_semaphore_put_notify.c
index b1abe3be..80894d6e 100644
--- a/common_smp/src/tx_semaphore_put_notify.c
+++ b/common_smp/src/tx_semaphore_put_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semaphore_put_notify)(TX_SEMAPHORE *notify_semaphore_ptr))
{
diff --git a/common_smp/src/tx_thread_create.c b/common_smp/src/tx_thread_create.c
index f66e393c..28a1dae1 100644
--- a/common_smp/src/tx_thread_create.c
+++ b/common_smp/src/tx_thread_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -75,24 +76,6 @@
/* Application Code */
/* _tx_timer_initialize Create system timer thread */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 12-31-2020 Andres Mlinar Modified comment(s), */
-/* resulting in version 6.1.3 */
-/* 08-02-2021 Scott Larson Removed unneeded cast, */
-/* resulting in version 6.1.8 */
-/* 10-31-2022 Scott Larson Removed ifdef block to always */
-/* restore interrupts at end */
-/* of if block, */
-/* resulting in version 6.2.0 */
-/* 10-31-2023 Xiuwen Cai Modified comment(s), */
-/* added option for random */
-/* number stack filling, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr,
VOID (*entry_function)(ULONG id), ULONG entry_input,
diff --git a/common_smp/src/tx_thread_delete.c b/common_smp/src/tx_thread_delete.c
index 69626c50..510f6565 100644
--- a/common_smp/src/tx_thread_delete.c
+++ b/common_smp/src/tx_thread_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_delete(TX_THREAD *thread_ptr)
{
diff --git a/common_smp/src/tx_thread_entry_exit_notify.c b/common_smp/src/tx_thread_entry_exit_notify.c
index 7d5919de..fdce25ef 100644
--- a/common_smp/src/tx_thread_entry_exit_notify.c
+++ b/common_smp/src/tx_thread_entry_exit_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT id))
{
diff --git a/common_smp/src/tx_thread_identify.c b/common_smp/src/tx_thread_identify.c
index 7808d053..86f56194 100644
--- a/common_smp/src/tx_thread_identify.c
+++ b/common_smp/src/tx_thread_identify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
TX_THREAD *_tx_thread_identify(VOID)
{
diff --git a/common_smp/src/tx_thread_info_get.c b/common_smp/src/tx_thread_info_get.c
index d9069457..740a3b95 100644
--- a/common_smp/src/tx_thread_info_get.c
+++ b/common_smp/src/tx_thread_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,14 +71,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count,
UINT *priority, UINT *preemption_threshold, ULONG *time_slice,
diff --git a/common_smp/src/tx_thread_initialize.c b/common_smp/src/tx_thread_initialize.c
index eb0fc059..f3793109 100644
--- a/common_smp/src/tx_thread_initialize.c
+++ b/common_smp/src/tx_thread_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -341,12 +342,6 @@ const CHAR _tx_thread_special_string[] =
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_initialize(VOID)
{
diff --git a/common_smp/src/tx_thread_performance_info_get.c b/common_smp/src/tx_thread_performance_info_get.c
index 92c0e02b..79a8c7ee 100644
--- a/common_smp/src/tx_thread_performance_info_get.c
+++ b/common_smp/src/tx_thread_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -87,14 +88,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_performance_info_get(TX_THREAD *thread_ptr, ULONG *resumptions, ULONG *suspensions,
ULONG *solicited_preemptions, ULONG *interrupt_preemptions, ULONG *priority_inversions,
diff --git a/common_smp/src/tx_thread_performance_system_info_get.c b/common_smp/src/tx_thread_performance_system_info_get.c
index a6c300aa..8ade15dd 100644
--- a/common_smp/src/tx_thread_performance_system_info_get.c
+++ b/common_smp/src/tx_thread_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -87,14 +88,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_performance_system_info_get(ULONG *resumptions, ULONG *suspensions,
ULONG *solicited_preemptions, ULONG *interrupt_preemptions, ULONG *priority_inversions,
diff --git a/common_smp/src/tx_thread_preemption_change.c b/common_smp/src/tx_thread_preemption_change.c
index eac39d6f..b309308c 100644
--- a/common_smp/src/tx_thread_preemption_change.c
+++ b/common_smp/src/tx_thread_preemption_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,12 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_preemption_change(TX_THREAD *thread_ptr, UINT new_threshold, UINT *old_threshold)
{
diff --git a/common_smp/src/tx_thread_priority_change.c b/common_smp/src/tx_thread_priority_change.c
index 6436a292..57d6eda7 100644
--- a/common_smp/src/tx_thread_priority_change.c
+++ b/common_smp/src/tx_thread_priority_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,12 +75,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_priority_change(TX_THREAD *thread_ptr, UINT new_priority, UINT *old_priority)
{
diff --git a/common_smp/src/tx_thread_relinquish.c b/common_smp/src/tx_thread_relinquish.c
index ea160b50..10982b26 100644
--- a/common_smp/src/tx_thread_relinquish.c
+++ b/common_smp/src/tx_thread_relinquish.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,12 +66,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_relinquish(VOID)
{
diff --git a/common_smp/src/tx_thread_reset.c b/common_smp/src/tx_thread_reset.c
index 1fea78be..da56daf5 100644
--- a/common_smp/src/tx_thread_reset.c
+++ b/common_smp/src/tx_thread_reset.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_reset(TX_THREAD *thread_ptr)
{
diff --git a/common_smp/src/tx_thread_resume.c b/common_smp/src/tx_thread_resume.c
index 1537c730..e2da7d23 100644
--- a/common_smp/src/tx_thread_resume.c
+++ b/common_smp/src/tx_thread_resume.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,12 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_resume(TX_THREAD *thread_ptr)
{
diff --git a/common_smp/src/tx_thread_shell_entry.c b/common_smp/src/tx_thread_shell_entry.c
index 161ea80e..45fe9d6d 100644
--- a/common_smp/src/tx_thread_shell_entry.c
+++ b/common_smp/src/tx_thread_shell_entry.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Initial thread stack frame */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_shell_entry(VOID)
{
diff --git a/common_smp/src/tx_thread_sleep.c b/common_smp/src/tx_thread_sleep.c
index 6d6c92c4..fd986a0b 100644
--- a/common_smp/src/tx_thread_sleep.c
+++ b/common_smp/src/tx_thread_sleep.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_sleep(ULONG timer_ticks)
{
diff --git a/common_smp/src/tx_thread_smp_core_exclude.c b/common_smp/src/tx_thread_smp_core_exclude.c
index 477c99f1..ee67cfce 100644
--- a/common_smp/src/tx_thread_smp_core_exclude.c
+++ b/common_smp/src/tx_thread_smp_core_exclude.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,12 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_smp_core_exclude(TX_THREAD *thread_ptr, ULONG exclusion_map)
{
diff --git a/common_smp/src/tx_thread_smp_core_exclude_get.c b/common_smp/src/tx_thread_smp_core_exclude_get.c
index 962f45e3..bc517f5d 100644
--- a/common_smp/src/tx_thread_smp_core_exclude_get.c
+++ b/common_smp/src/tx_thread_smp_core_exclude_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_smp_core_exclude_get(TX_THREAD *thread_ptr, ULONG *exclusion_map_ptr)
{
diff --git a/common_smp/src/tx_thread_smp_current_state_set.c b/common_smp/src/tx_thread_smp_current_state_set.c
index 5491aa18..0187ac8c 100644
--- a/common_smp/src/tx_thread_smp_current_state_set.c
+++ b/common_smp/src/tx_thread_smp_current_state_set.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,12 +63,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
void _tx_thread_smp_current_state_set(ULONG new_state)
{
diff --git a/common_smp/src/tx_thread_smp_debug_entry_insert.c b/common_smp/src/tx_thread_smp_debug_entry_insert.c
index 70e86dc7..95148703 100644
--- a/common_smp/src/tx_thread_smp_debug_entry_insert.c
+++ b/common_smp/src/tx_thread_smp_debug_entry_insert.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -118,12 +119,6 @@ ULONG _tx_thread_smp_debug_info_current_index;
/* */
/* Internal routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
void _tx_thread_smp_debug_entry_insert(ULONG id, ULONG suspend, VOID *thread_void_ptr)
{
diff --git a/common_smp/src/tx_thread_smp_high_level_initialize.c b/common_smp/src/tx_thread_smp_high_level_initialize.c
index 73c77ac6..a544b3de 100644
--- a/common_smp/src/tx_thread_smp_high_level_initialize.c
+++ b/common_smp/src/tx_thread_smp_high_level_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,16 +64,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 12-31-2020 William E. Lamie Modified comments, added */
-/* cast to address a MISRA */
-/* compliant issue, */
-/* resulting in version 6.1.3 */
-/* */
/**************************************************************************/
void _tx_thread_smp_high_level_initialize(void)
{
diff --git a/common_smp/src/tx_thread_smp_rebalance_execute_list.c b/common_smp/src/tx_thread_smp_rebalance_execute_list.c
index 019c7209..6be7257a 100644
--- a/common_smp/src/tx_thread_smp_rebalance_execute_list.c
+++ b/common_smp/src/tx_thread_smp_rebalance_execute_list.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -82,12 +83,6 @@
/* _tx_thread_system_suspend Thread suspend */
/* _tx_thread_time_slice Thread time-slice */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
void _tx_thread_smp_rebalance_execute_list(UINT core_index)
{
diff --git a/common_smp/src/tx_thread_smp_utilities.c b/common_smp/src/tx_thread_smp_utilities.c
index 25e24df1..833a9aab 100644
--- a/common_smp/src/tx_thread_smp_utilities.c
+++ b/common_smp/src/tx_thread_smp_utilities.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/common_smp/src/tx_thread_stack_analyze.c b/common_smp/src/tx_thread_stack_analyze.c
index bdadab0d..080d0052 100644
--- a/common_smp/src/tx_thread_stack_analyze.c
+++ b/common_smp/src/tx_thread_stack_analyze.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,14 +61,6 @@
/* */
/* ThreadX internal code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_stack_analyze(TX_THREAD *thread_ptr)
{
diff --git a/common_smp/src/tx_thread_stack_error_handler.c b/common_smp/src/tx_thread_stack_error_handler.c
index 1f8d89fa..d82005f0 100644
--- a/common_smp/src/tx_thread_stack_error_handler.c
+++ b/common_smp/src/tx_thread_stack_error_handler.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,15 +61,6 @@
/* */
/* ThreadX internal code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-16-2020 William E. Lamie Modified comment(s), */
-/* fixed link issue, */
-/* resulting in version 6.1.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_stack_error_handler(TX_THREAD *thread_ptr)
{
diff --git a/common_smp/src/tx_thread_stack_error_notify.c b/common_smp/src/tx_thread_stack_error_notify.c
index 4a257740..b300a131 100644
--- a/common_smp/src/tx_thread_stack_error_notify.c
+++ b/common_smp/src/tx_thread_stack_error_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,12 +67,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_stack_error_notify(VOID (*stack_error_handler)(TX_THREAD *thread_ptr))
{
diff --git a/common_smp/src/tx_thread_suspend.c b/common_smp/src/tx_thread_suspend.c
index c600c3df..1ad3cd81 100644
--- a/common_smp/src/tx_thread_suspend.c
+++ b/common_smp/src/tx_thread_suspend.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_suspend(TX_THREAD *thread_ptr)
{
diff --git a/common_smp/src/tx_thread_system_preempt_check.c b/common_smp/src/tx_thread_system_preempt_check.c
index e9efa2fb..c70072c5 100644
--- a/common_smp/src/tx_thread_system_preempt_check.c
+++ b/common_smp/src/tx_thread_system_preempt_check.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,12 +62,6 @@
/* */
/* Other ThreadX Components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_system_preempt_check(VOID)
{
diff --git a/common_smp/src/tx_thread_system_resume.c b/common_smp/src/tx_thread_system_resume.c
index 77c09219..256c06f2 100644
--- a/common_smp/src/tx_thread_system_resume.c
+++ b/common_smp/src/tx_thread_system_resume.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -90,12 +91,6 @@
/* _tx_thread_wait_abort Thread wait abort */
/* Other ThreadX Components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_system_resume(TX_THREAD *thread_ptr)
{
diff --git a/common_smp/src/tx_thread_system_suspend.c b/common_smp/src/tx_thread_system_suspend.c
index 63398999..d5bf5cc7 100644
--- a/common_smp/src/tx_thread_system_suspend.c
+++ b/common_smp/src/tx_thread_system_suspend.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -82,17 +83,6 @@
/* _tx_thread_terminate Thread terminate */
/* Other ThreadX Components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Scott Larson Modified comments and fixed */
-/* loop to find next thread, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Fixed MISRA2012 rule 10.4_a, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
VOID _tx_thread_system_suspend(TX_THREAD *thread_ptr)
{
diff --git a/common_smp/src/tx_thread_terminate.c b/common_smp/src/tx_thread_terminate.c
index 1e30687f..86e34bae 100644
--- a/common_smp/src/tx_thread_terminate.c
+++ b/common_smp/src/tx_thread_terminate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_terminate(TX_THREAD *thread_ptr)
{
diff --git a/common_smp/src/tx_thread_time_slice.c b/common_smp/src/tx_thread_time_slice.c
index e48f68a6..8a45ab30 100644
--- a/common_smp/src/tx_thread_time_slice.c
+++ b/common_smp/src/tx_thread_time_slice.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,12 +65,6 @@
/* */
/* _tx_timer_interrupt Timer interrupt handling */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_time_slice(VOID)
{
diff --git a/common_smp/src/tx_thread_time_slice_change.c b/common_smp/src/tx_thread_time_slice_change.c
index ba4f523c..b2204857 100644
--- a/common_smp/src/tx_thread_time_slice_change.c
+++ b/common_smp/src/tx_thread_time_slice_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,12 +67,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_time_slice_change(TX_THREAD *thread_ptr, ULONG new_time_slice, ULONG *old_time_slice)
{
diff --git a/common_smp/src/tx_thread_timeout.c b/common_smp/src/tx_thread_timeout.c
index 33ea5352..21b62e34 100644
--- a/common_smp/src/tx_thread_timeout.c
+++ b/common_smp/src/tx_thread_timeout.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,14 +67,6 @@
/* _tx_timer_expiration_process Timer expiration function */
/* _tx_timer_thread_entry Timer thread function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_timeout(ULONG timeout_input)
{
diff --git a/common_smp/src/tx_thread_wait_abort.c b/common_smp/src/tx_thread_wait_abort.c
index 372a72b2..24bce69b 100644
--- a/common_smp/src/tx_thread_wait_abort.c
+++ b/common_smp/src/tx_thread_wait_abort.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,17 +64,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 03-08-2023 Scott Larson Check if thread is coming out */
-/* of suspension elsewhere, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
UINT _tx_thread_wait_abort(TX_THREAD *thread_ptr)
{
diff --git a/common_smp/src/tx_time_get.c b/common_smp/src/tx_time_get.c
index 16361142..6ed7d731 100644
--- a/common_smp/src/tx_time_get.c
+++ b/common_smp/src/tx_time_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,16 +61,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 12-31-2020 Andres Mlinar Modified comment(s), */
-/* resulting in version 6.1.3 */
-/* */
/**************************************************************************/
ULONG _tx_time_get(VOID)
{
diff --git a/common_smp/src/tx_time_set.c b/common_smp/src/tx_time_set.c
index 613274ac..97b42986 100644
--- a/common_smp/src/tx_time_set.c
+++ b/common_smp/src/tx_time_set.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,14 +61,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_time_set(ULONG new_time)
{
diff --git a/common_smp/src/tx_timer_activate.c b/common_smp/src/tx_timer_activate.c
index d8609573..5a59eade 100644
--- a/common_smp/src/tx_timer_activate.c
+++ b/common_smp/src/tx_timer_activate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_activate(TX_TIMER *timer_ptr)
{
diff --git a/common_smp/src/tx_timer_change.c b/common_smp/src/tx_timer_change.c
index 420ff26a..24661d3d 100644
--- a/common_smp/src/tx_timer_change.c
+++ b/common_smp/src/tx_timer_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks)
{
diff --git a/common_smp/src/tx_timer_create.c b/common_smp/src/tx_timer_create.c
index 7666724f..73fa67cd 100644
--- a/common_smp/src/tx_timer_create.c
+++ b/common_smp/src/tx_timer_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,12 +67,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr,
VOID (*expiration_function)(ULONG id), ULONG expiration_input,
diff --git a/common_smp/src/tx_timer_deactivate.c b/common_smp/src/tx_timer_deactivate.c
index 97c786bf..98eacd4b 100644
--- a/common_smp/src/tx_timer_deactivate.c
+++ b/common_smp/src/tx_timer_deactivate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_deactivate(TX_TIMER *timer_ptr)
{
diff --git a/common_smp/src/tx_timer_delete.c b/common_smp/src/tx_timer_delete.c
index 7baef6d4..60d425ec 100644
--- a/common_smp/src/tx_timer_delete.c
+++ b/common_smp/src/tx_timer_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_delete(TX_TIMER *timer_ptr)
{
diff --git a/common_smp/src/tx_timer_expiration_process.c b/common_smp/src/tx_timer_expiration_process.c
index f30c2d52..f54e982d 100644
--- a/common_smp/src/tx_timer_expiration_process.c
+++ b/common_smp/src/tx_timer_expiration_process.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,12 +67,6 @@
/* */
/* _tx_timer_interrupt Timer interrupt handler */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_timer_expiration_process(VOID)
{
diff --git a/common_smp/src/tx_timer_info_get.c b/common_smp/src/tx_timer_info_get.c
index ca04c4ea..31c801f9 100644
--- a/common_smp/src/tx_timer_info_get.c
+++ b/common_smp/src/tx_timer_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,14 +67,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks,
ULONG *reschedule_ticks, TX_TIMER **next_timer)
diff --git a/common_smp/src/tx_timer_initialize.c b/common_smp/src/tx_timer_initialize.c
index 89a15926..327f2a65 100644
--- a/common_smp/src/tx_timer_initialize.c
+++ b/common_smp/src/tx_timer_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -199,12 +200,6 @@ ULONG _tx_timer_time_slice[TX_THREAD_SMP_MAX_CORES];
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_timer_initialize(VOID)
{
diff --git a/common_smp/src/tx_timer_performance_info_get.c b/common_smp/src/tx_timer_performance_info_get.c
index 05e332c1..37cacee4 100644
--- a/common_smp/src/tx_timer_performance_info_get.c
+++ b/common_smp/src/tx_timer_performance_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -73,14 +74,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_performance_info_get(TX_TIMER *timer_ptr, ULONG *activates, ULONG *reactivates,
ULONG *deactivates, ULONG *expirations, ULONG *expiration_adjusts)
diff --git a/common_smp/src/tx_timer_performance_system_info_get.c b/common_smp/src/tx_timer_performance_system_info_get.c
index 367e1149..9b6c3862 100644
--- a/common_smp/src/tx_timer_performance_system_info_get.c
+++ b/common_smp/src/tx_timer_performance_system_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,14 +71,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_performance_system_info_get(ULONG *activates, ULONG *reactivates,
ULONG *deactivates, ULONG *expirations, ULONG *expiration_adjusts)
diff --git a/common_smp/src/tx_timer_smp_core_exclude.c b/common_smp/src/tx_timer_smp_core_exclude.c
index 8600967f..9048c1e5 100644
--- a/common_smp/src/tx_timer_smp_core_exclude.c
+++ b/common_smp/src/tx_timer_smp_core_exclude.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,12 +67,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_smp_core_exclude(TX_TIMER *timer_ptr, ULONG exclusion_map)
{
diff --git a/common_smp/src/tx_timer_smp_core_exclude_get.c b/common_smp/src/tx_timer_smp_core_exclude_get.c
index 52d5022f..0092e773 100644
--- a/common_smp/src/tx_timer_smp_core_exclude_get.c
+++ b/common_smp/src/tx_timer_smp_core_exclude_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_timer_smp_core_exclude_get(TX_TIMER *timer_ptr, ULONG *exclusion_map_ptr)
{
diff --git a/common_smp/src/tx_timer_system_activate.c b/common_smp/src/tx_timer_system_activate.c
index a27e8536..51cd107b 100644
--- a/common_smp/src/tx_timer_system_activate.c
+++ b/common_smp/src/tx_timer_system_activate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* _tx_timer_thread_entry Timer thread processing */
/* _tx_timer_activate Application timer activate */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_timer_system_activate(TX_TIMER_INTERNAL *timer_ptr)
{
diff --git a/common_smp/src/tx_timer_system_deactivate.c b/common_smp/src/tx_timer_system_deactivate.c
index 487ead9d..ae955077 100644
--- a/common_smp/src/tx_timer_system_deactivate.c
+++ b/common_smp/src/tx_timer_system_deactivate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* _tx_thread_system_resume Thread resume function */
/* _tx_timer_thread_entry Timer thread processing */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_timer_system_deactivate(TX_TIMER_INTERNAL *timer_ptr)
{
diff --git a/common_smp/src/tx_timer_thread_entry.c b/common_smp/src/tx_timer_thread_entry.c
index e8709c75..51b165b2 100644
--- a/common_smp/src/tx_timer_thread_entry.c
+++ b/common_smp/src/tx_timer_thread_entry.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,12 +66,6 @@
/* */
/* ThreadX Scheduler */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_TIMER_PROCESS_IN_ISR
VOID _tx_timer_thread_entry(ULONG timer_thread_input)
diff --git a/common_smp/src/tx_trace_buffer_full_notify.c b/common_smp/src/tx_trace_buffer_full_notify.c
index 9e07c0a3..7253e8a4 100644
--- a/common_smp/src/tx_trace_buffer_full_notify.c
+++ b/common_smp/src/tx_trace_buffer_full_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_trace_buffer_full_notify(VOID (*full_buffer_callback)(VOID *buffer))
{
diff --git a/common_smp/src/tx_trace_disable.c b/common_smp/src/tx_trace_disable.c
index 1ef211e0..96c28740 100644
--- a/common_smp/src/tx_trace_disable.c
+++ b/common_smp/src/tx_trace_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_trace_disable(VOID)
{
diff --git a/common_smp/src/tx_trace_enable.c b/common_smp/src/tx_trace_enable.c
index aa372e8d..2fb1252c 100644
--- a/common_smp/src/tx_trace_enable.c
+++ b/common_smp/src/tx_trace_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -73,14 +74,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_trace_enable(VOID *trace_buffer_start, ULONG trace_buffer_size, ULONG registry_entries)
{
diff --git a/common_smp/src/tx_trace_event_filter.c b/common_smp/src/tx_trace_event_filter.c
index 3afb8ed5..9caf18ae 100644
--- a/common_smp/src/tx_trace_event_filter.c
+++ b/common_smp/src/tx_trace_event_filter.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_trace_event_filter(ULONG event_filter_bits)
{
diff --git a/common_smp/src/tx_trace_event_unfilter.c b/common_smp/src/tx_trace_event_unfilter.c
index f9d054d7..652e4143 100644
--- a/common_smp/src/tx_trace_event_unfilter.c
+++ b/common_smp/src/tx_trace_event_unfilter.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_trace_event_unfilter(ULONG event_unfilter_bits)
{
diff --git a/common_smp/src/tx_trace_initialize.c b/common_smp/src/tx_trace_initialize.c
index 14877b9c..5cec8eae 100644
--- a/common_smp/src/tx_trace_initialize.c
+++ b/common_smp/src/tx_trace_initialize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -125,14 +126,6 @@ ULONG _tx_trace_registry_search_start;
/* */
/* _tx_initialize_high_level High level initialization */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_trace_initialize(VOID)
{
diff --git a/common_smp/src/tx_trace_interrupt_control.c b/common_smp/src/tx_trace_interrupt_control.c
index 595dff77..2e35c62d 100644
--- a/common_smp/src/tx_trace_interrupt_control.c
+++ b/common_smp/src/tx_trace_interrupt_control.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,14 +61,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_trace_interrupt_control(UINT new_posture)
{
diff --git a/common_smp/src/tx_trace_isr_enter_insert.c b/common_smp/src/tx_trace_isr_enter_insert.c
index 628cc8ff..f9971cf2 100644
--- a/common_smp/src/tx_trace_isr_enter_insert.c
+++ b/common_smp/src/tx_trace_isr_enter_insert.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_trace_isr_enter_insert(ULONG isr_id)
{
diff --git a/common_smp/src/tx_trace_isr_exit_insert.c b/common_smp/src/tx_trace_isr_exit_insert.c
index 0d743c19..a4a8ade8 100644
--- a/common_smp/src/tx_trace_isr_exit_insert.c
+++ b/common_smp/src/tx_trace_isr_exit_insert.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_trace_isr_exit_insert(ULONG isr_id)
{
diff --git a/common_smp/src/tx_trace_object_register.c b/common_smp/src/tx_trace_object_register.c
index 0805063d..f7cd4a4a 100644
--- a/common_smp/src/tx_trace_object_register.c
+++ b/common_smp/src/tx_trace_object_register.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,17 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* 07-29-2022 Scott Larson Modified comment(s), */
-/* check for null name, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, CHAR *object_name, ULONG parameter_1, ULONG parameter_2)
{
diff --git a/common_smp/src/tx_trace_object_unregister.c b/common_smp/src/tx_trace_object_unregister.c
index a7fef275..2166c973 100644
--- a/common_smp/src/tx_trace_object_unregister.c
+++ b/common_smp/src/tx_trace_object_unregister.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_trace_object_unregister(VOID *object_ptr)
{
diff --git a/common_smp/src/tx_trace_user_event_insert.c b/common_smp/src/tx_trace_user_event_insert.c
index fda09610..787a55f0 100644
--- a/common_smp/src/tx_trace_user_event_insert.c
+++ b/common_smp/src/tx_trace_user_event_insert.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _tx_trace_user_event_insert(ULONG event_id, ULONG info_field_1, ULONG info_field_2, ULONG info_field_3, ULONG info_field_4)
{
diff --git a/common_smp/src/txe_block_allocate.c b/common_smp/src/txe_block_allocate.c
index 5564354b..c9c7a1a8 100644
--- a/common_smp/src/txe_block_allocate.c
+++ b/common_smp/src/txe_block_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_block_allocate(TX_BLOCK_POOL *pool_ptr, VOID **block_ptr, ULONG wait_option)
{
diff --git a/common_smp/src/txe_block_pool_create.c b/common_smp/src/txe_block_pool_create.c
index 8cbeadbd..08ef7e69 100644
--- a/common_smp/src/txe_block_pool_create.c
+++ b/common_smp/src/txe_block_pool_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,14 +73,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_block_pool_create(TX_BLOCK_POOL *pool_ptr, CHAR *name_ptr, ULONG block_size,
VOID *pool_start, ULONG pool_size, UINT pool_control_block_size)
diff --git a/common_smp/src/txe_block_pool_delete.c b/common_smp/src/txe_block_pool_delete.c
index 844ff57a..f9af71cb 100644
--- a/common_smp/src/txe_block_pool_delete.c
+++ b/common_smp/src/txe_block_pool_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_block_pool_delete(TX_BLOCK_POOL *pool_ptr)
{
diff --git a/common_smp/src/txe_block_pool_info_get.c b/common_smp/src/txe_block_pool_info_get.c
index 77d9df4a..f91ca206 100644
--- a/common_smp/src/txe_block_pool_info_get.c
+++ b/common_smp/src/txe_block_pool_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_block_pool_info_get(TX_BLOCK_POOL *pool_ptr, CHAR **name, ULONG *available_blocks,
ULONG *total_blocks, TX_THREAD **first_suspended,
diff --git a/common_smp/src/txe_block_pool_prioritize.c b/common_smp/src/txe_block_pool_prioritize.c
index 593ac6dc..87742011 100644
--- a/common_smp/src/txe_block_pool_prioritize.c
+++ b/common_smp/src/txe_block_pool_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_block_pool_prioritize(TX_BLOCK_POOL *pool_ptr)
{
diff --git a/common_smp/src/txe_block_release.c b/common_smp/src/txe_block_release.c
index e7eaed24..ba63d0b6 100644
--- a/common_smp/src/txe_block_release.c
+++ b/common_smp/src/txe_block_release.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_block_release(VOID *block_ptr)
{
diff --git a/common_smp/src/txe_byte_allocate.c b/common_smp/src/txe_byte_allocate.c
index dbb3937e..dacbede9 100644
--- a/common_smp/src/txe_byte_allocate.c
+++ b/common_smp/src/txe_byte_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,14 +71,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_byte_allocate(TX_BYTE_POOL *pool_ptr, VOID **memory_ptr,
ULONG memory_size, ULONG wait_option)
diff --git a/common_smp/src/txe_byte_pool_create.c b/common_smp/src/txe_byte_pool_create.c
index 2f37d063..99a89698 100644
--- a/common_smp/src/txe_byte_pool_create.c
+++ b/common_smp/src/txe_byte_pool_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,14 +72,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_byte_pool_create(TX_BYTE_POOL *pool_ptr, CHAR *name_ptr, VOID *pool_start, ULONG pool_size, UINT pool_control_block_size)
{
diff --git a/common_smp/src/txe_byte_pool_delete.c b/common_smp/src/txe_byte_pool_delete.c
index 2a6baad2..6bbeb8f0 100644
--- a/common_smp/src/txe_byte_pool_delete.c
+++ b/common_smp/src/txe_byte_pool_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_byte_pool_delete(TX_BYTE_POOL *pool_ptr)
{
diff --git a/common_smp/src/txe_byte_pool_info_get.c b/common_smp/src/txe_byte_pool_info_get.c
index 0a7536ef..85e7a233 100644
--- a/common_smp/src/txe_byte_pool_info_get.c
+++ b/common_smp/src/txe_byte_pool_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_byte_pool_info_get(TX_BYTE_POOL *pool_ptr, CHAR **name, ULONG *available_bytes,
ULONG *fragments, TX_THREAD **first_suspended,
diff --git a/common_smp/src/txe_byte_pool_prioritize.c b/common_smp/src/txe_byte_pool_prioritize.c
index a0f0f1ae..9acec73c 100644
--- a/common_smp/src/txe_byte_pool_prioritize.c
+++ b/common_smp/src/txe_byte_pool_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_byte_pool_prioritize(TX_BYTE_POOL *pool_ptr)
{
diff --git a/common_smp/src/txe_byte_release.c b/common_smp/src/txe_byte_release.c
index 67f91907..89c3a82b 100644
--- a/common_smp/src/txe_byte_release.c
+++ b/common_smp/src/txe_byte_release.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_byte_release(VOID *memory_ptr)
{
diff --git a/common_smp/src/txe_event_flags_create.c b/common_smp/src/txe_event_flags_create.c
index 4c71bd95..4e3fed77 100644
--- a/common_smp/src/txe_event_flags_create.c
+++ b/common_smp/src/txe_event_flags_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_create(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR *name_ptr, UINT event_control_block_size)
{
diff --git a/common_smp/src/txe_event_flags_delete.c b/common_smp/src/txe_event_flags_delete.c
index 66066276..23c04807 100644
--- a/common_smp/src/txe_event_flags_delete.c
+++ b/common_smp/src/txe_event_flags_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_delete(TX_EVENT_FLAGS_GROUP *group_ptr)
{
diff --git a/common_smp/src/txe_event_flags_get.c b/common_smp/src/txe_event_flags_get.c
index 23767630..1e9c6e0c 100644
--- a/common_smp/src/txe_event_flags_get.c
+++ b/common_smp/src/txe_event_flags_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,14 +72,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags,
UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option)
diff --git a/common_smp/src/txe_event_flags_info_get.c b/common_smp/src/txe_event_flags_info_get.c
index 3400c55e..e551d025 100644
--- a/common_smp/src/txe_event_flags_info_get.c
+++ b/common_smp/src/txe_event_flags_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,14 +71,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_info_get(TX_EVENT_FLAGS_GROUP *group_ptr, CHAR **name, ULONG *current_flags,
TX_THREAD **first_suspended, ULONG *suspended_count,
diff --git a/common_smp/src/txe_event_flags_set.c b/common_smp/src/txe_event_flags_set.c
index 03d309ab..4df57fad 100644
--- a/common_smp/src/txe_event_flags_set.c
+++ b/common_smp/src/txe_event_flags_set.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_set(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG flags_to_set, UINT set_option)
{
diff --git a/common_smp/src/txe_event_flags_set_notify.c b/common_smp/src/txe_event_flags_set_notify.c
index f93963d3..51887fd7 100644
--- a/common_smp/src/txe_event_flags_set_notify.c
+++ b/common_smp/src/txe_event_flags_set_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_event_flags_set_notify(TX_EVENT_FLAGS_GROUP *group_ptr, VOID (*events_set_notify)(TX_EVENT_FLAGS_GROUP *notify_group_ptr))
{
diff --git a/common_smp/src/txe_mutex_create.c b/common_smp/src/txe_mutex_create.c
index fb65a5be..392f8b0e 100644
--- a/common_smp/src/txe_mutex_create.c
+++ b/common_smp/src/txe_mutex_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -69,14 +70,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_mutex_create(TX_MUTEX *mutex_ptr, CHAR *name_ptr, UINT inherit, UINT mutex_control_block_size)
{
diff --git a/common_smp/src/txe_mutex_delete.c b/common_smp/src/txe_mutex_delete.c
index b2a3fd2b..3692bf89 100644
--- a/common_smp/src/txe_mutex_delete.c
+++ b/common_smp/src/txe_mutex_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_mutex_delete(TX_MUTEX *mutex_ptr)
{
diff --git a/common_smp/src/txe_mutex_get.c b/common_smp/src/txe_mutex_get.c
index 7ef04eef..2d457c82 100644
--- a/common_smp/src/txe_mutex_get.c
+++ b/common_smp/src/txe_mutex_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,14 +67,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_mutex_get(TX_MUTEX *mutex_ptr, ULONG wait_option)
{
diff --git a/common_smp/src/txe_mutex_info_get.c b/common_smp/src/txe_mutex_info_get.c
index 826fead1..f4ef4168 100644
--- a/common_smp/src/txe_mutex_info_get.c
+++ b/common_smp/src/txe_mutex_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -69,14 +70,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_mutex_info_get(TX_MUTEX *mutex_ptr, CHAR **name, ULONG *count, TX_THREAD **owner,
TX_THREAD **first_suspended, ULONG *suspended_count,
diff --git a/common_smp/src/txe_mutex_prioritize.c b/common_smp/src/txe_mutex_prioritize.c
index 9ae4b868..d3302c1c 100644
--- a/common_smp/src/txe_mutex_prioritize.c
+++ b/common_smp/src/txe_mutex_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_mutex_prioritize(TX_MUTEX *mutex_ptr)
{
diff --git a/common_smp/src/txe_mutex_put.c b/common_smp/src/txe_mutex_put.c
index 85d5929f..8a085b7b 100644
--- a/common_smp/src/txe_mutex_put.c
+++ b/common_smp/src/txe_mutex_put.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_mutex_put(TX_MUTEX *mutex_ptr)
{
diff --git a/common_smp/src/txe_queue_create.c b/common_smp/src/txe_queue_create.c
index 68d3540a..387eacb6 100644
--- a/common_smp/src/txe_queue_create.c
+++ b/common_smp/src/txe_queue_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,14 +71,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_create(TX_QUEUE *queue_ptr, CHAR *name_ptr, UINT message_size,
VOID *queue_start, ULONG queue_size, UINT queue_control_block_size)
@@ -178,8 +171,8 @@ TX_THREAD *thread_ptr;
status = TX_SIZE_ERROR;
}
- /* Check for an invalid message size - greater than 16. */
- else if (message_size > TX_16_ULONG)
+ /* Check for an invalid message sizegreater than TX_QUEUE_MESSAGE_MAX_SIZE 16 by default. */
+ else if (message_size > TX_QUEUE_MESSAGE_MAX_SIZE)
{
/* Invalid message size specified. */
diff --git a/common_smp/src/txe_queue_delete.c b/common_smp/src/txe_queue_delete.c
index 3062edeb..43dc9d6f 100644
--- a/common_smp/src/txe_queue_delete.c
+++ b/common_smp/src/txe_queue_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_delete(TX_QUEUE *queue_ptr)
{
diff --git a/common_smp/src/txe_queue_flush.c b/common_smp/src/txe_queue_flush.c
index 348de23e..b514db95 100644
--- a/common_smp/src/txe_queue_flush.c
+++ b/common_smp/src/txe_queue_flush.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,14 +61,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_flush(TX_QUEUE *queue_ptr)
{
diff --git a/common_smp/src/txe_queue_front_send.c b/common_smp/src/txe_queue_front_send.c
index 21c254ab..798aada6 100644
--- a/common_smp/src/txe_queue_front_send.c
+++ b/common_smp/src/txe_queue_front_send.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_front_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option)
{
diff --git a/common_smp/src/txe_queue_info_get.c b/common_smp/src/txe_queue_info_get.c
index b4507b01..78d98392 100644
--- a/common_smp/src/txe_queue_info_get.c
+++ b/common_smp/src/txe_queue_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_info_get(TX_QUEUE *queue_ptr, CHAR **name, ULONG *enqueued, ULONG *available_storage,
TX_THREAD **first_suspended, ULONG *suspended_count, TX_QUEUE **next_queue)
diff --git a/common_smp/src/txe_queue_prioritize.c b/common_smp/src/txe_queue_prioritize.c
index f74809a1..ba40b02a 100644
--- a/common_smp/src/txe_queue_prioritize.c
+++ b/common_smp/src/txe_queue_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_prioritize(TX_QUEUE *queue_ptr)
{
diff --git a/common_smp/src/txe_queue_receive.c b/common_smp/src/txe_queue_receive.c
index b40e6a56..de6f4dcd 100644
--- a/common_smp/src/txe_queue_receive.c
+++ b/common_smp/src/txe_queue_receive.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_receive(TX_QUEUE *queue_ptr, VOID *destination_ptr, ULONG wait_option)
{
diff --git a/common_smp/src/txe_queue_send.c b/common_smp/src/txe_queue_send.c
index 5873f025..1b752e75 100644
--- a/common_smp/src/txe_queue_send.c
+++ b/common_smp/src/txe_queue_send.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_send(TX_QUEUE *queue_ptr, VOID *source_ptr, ULONG wait_option)
{
diff --git a/common_smp/src/txe_queue_send_notify.c b/common_smp/src/txe_queue_send_notify.c
index 9ffb0a93..dd2beaf2 100644
--- a/common_smp/src/txe_queue_send_notify.c
+++ b/common_smp/src/txe_queue_send_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_queue_send_notify(TX_QUEUE *queue_ptr, VOID (*queue_send_notify)(TX_QUEUE *notify_queue_ptr))
{
diff --git a/common_smp/src/txe_semaphore_ceiling_put.c b/common_smp/src/txe_semaphore_ceiling_put.c
index 51fee9d7..4c8b4603 100644
--- a/common_smp/src/txe_semaphore_ceiling_put.c
+++ b/common_smp/src/txe_semaphore_ceiling_put.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling)
{
diff --git a/common_smp/src/txe_semaphore_create.c b/common_smp/src/txe_semaphore_create.c
index 3390491c..a190b03c 100644
--- a/common_smp/src/txe_semaphore_create.c
+++ b/common_smp/src/txe_semaphore_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_create(TX_SEMAPHORE *semaphore_ptr, CHAR *name_ptr, ULONG initial_count, UINT semaphore_control_block_size)
{
diff --git a/common_smp/src/txe_semaphore_delete.c b/common_smp/src/txe_semaphore_delete.c
index 2083a22a..3d9f366c 100644
--- a/common_smp/src/txe_semaphore_delete.c
+++ b/common_smp/src/txe_semaphore_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_delete(TX_SEMAPHORE *semaphore_ptr)
{
diff --git a/common_smp/src/txe_semaphore_get.c b/common_smp/src/txe_semaphore_get.c
index 403d43b4..7b92d317 100644
--- a/common_smp/src/txe_semaphore_get.c
+++ b/common_smp/src/txe_semaphore_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,14 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_get(TX_SEMAPHORE *semaphore_ptr, ULONG wait_option)
{
diff --git a/common_smp/src/txe_semaphore_info_get.c b/common_smp/src/txe_semaphore_info_get.c
index 142bad37..7695028e 100644
--- a/common_smp/src/txe_semaphore_info_get.c
+++ b/common_smp/src/txe_semaphore_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,14 +69,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_info_get(TX_SEMAPHORE *semaphore_ptr, CHAR **name, ULONG *current_value,
TX_THREAD **first_suspended, ULONG *suspended_count,
diff --git a/common_smp/src/txe_semaphore_prioritize.c b/common_smp/src/txe_semaphore_prioritize.c
index 52525ded..cd873c5a 100644
--- a/common_smp/src/txe_semaphore_prioritize.c
+++ b/common_smp/src/txe_semaphore_prioritize.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_prioritize(TX_SEMAPHORE *semaphore_ptr)
{
diff --git a/common_smp/src/txe_semaphore_put.c b/common_smp/src/txe_semaphore_put.c
index 4a26fbd8..452c39bd 100644
--- a/common_smp/src/txe_semaphore_put.c
+++ b/common_smp/src/txe_semaphore_put.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_put(TX_SEMAPHORE *semaphore_ptr)
{
diff --git a/common_smp/src/txe_semaphore_put_notify.c b/common_smp/src/txe_semaphore_put_notify.c
index 646c293a..33aa8d9a 100644
--- a/common_smp/src/txe_semaphore_put_notify.c
+++ b/common_smp/src/txe_semaphore_put_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_semaphore_put_notify(TX_SEMAPHORE *semaphore_ptr, VOID (*semaphore_put_notify)(TX_SEMAPHORE *notify_semaphore_ptr))
{
diff --git a/common_smp/src/txe_thread_create.c b/common_smp/src/txe_thread_create.c
index c3902cd1..d319bc9e 100644
--- a/common_smp/src/txe_thread_create.c
+++ b/common_smp/src/txe_thread_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,14 +78,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr,
VOID (*entry_function)(ULONG id), ULONG entry_input,
diff --git a/common_smp/src/txe_thread_delete.c b/common_smp/src/txe_thread_delete.c
index 6e2d1d2b..85cf31ca 100644
--- a/common_smp/src/txe_thread_delete.c
+++ b/common_smp/src/txe_thread_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,14 +61,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_delete(TX_THREAD *thread_ptr)
{
diff --git a/common_smp/src/txe_thread_entry_exit_notify.c b/common_smp/src/txe_thread_entry_exit_notify.c
index ab4e835d..33420683 100644
--- a/common_smp/src/txe_thread_entry_exit_notify.c
+++ b/common_smp/src/txe_thread_entry_exit_notify.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_entry_exit_notify(TX_THREAD *thread_ptr, VOID (*thread_entry_exit_notify)(TX_THREAD *notify_thread_ptr, UINT type))
{
diff --git a/common_smp/src/txe_thread_info_get.c b/common_smp/src/txe_thread_info_get.c
index 17f9155d..ad1db3f7 100644
--- a/common_smp/src/txe_thread_info_get.c
+++ b/common_smp/src/txe_thread_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,14 +73,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_info_get(TX_THREAD *thread_ptr, CHAR **name, UINT *state, ULONG *run_count,
UINT *priority, UINT *preemption_threshold, ULONG *time_slice,
diff --git a/common_smp/src/txe_thread_preemption_change.c b/common_smp/src/txe_thread_preemption_change.c
index c0cfa91e..e3de0a85 100644
--- a/common_smp/src/txe_thread_preemption_change.c
+++ b/common_smp/src/txe_thread_preemption_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_preemption_change(TX_THREAD *thread_ptr, UINT new_threshold, UINT *old_threshold)
{
diff --git a/common_smp/src/txe_thread_priority_change.c b/common_smp/src/txe_thread_priority_change.c
index b4a1224b..2bf0058b 100644
--- a/common_smp/src/txe_thread_priority_change.c
+++ b/common_smp/src/txe_thread_priority_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_priority_change(TX_THREAD *thread_ptr, UINT new_priority, UINT *old_priority)
{
diff --git a/common_smp/src/txe_thread_relinquish.c b/common_smp/src/txe_thread_relinquish.c
index 1c5ab21a..080bad47 100644
--- a/common_smp/src/txe_thread_relinquish.c
+++ b/common_smp/src/txe_thread_relinquish.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
VOID _txe_thread_relinquish(VOID)
{
diff --git a/common_smp/src/txe_thread_reset.c b/common_smp/src/txe_thread_reset.c
index 4fed5e7a..1815f5bb 100644
--- a/common_smp/src/txe_thread_reset.c
+++ b/common_smp/src/txe_thread_reset.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_reset(TX_THREAD *thread_ptr)
{
diff --git a/common_smp/src/txe_thread_resume.c b/common_smp/src/txe_thread_resume.c
index e8a341dd..ae356c6c 100644
--- a/common_smp/src/txe_thread_resume.c
+++ b/common_smp/src/txe_thread_resume.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_resume(TX_THREAD *thread_ptr)
{
diff --git a/common_smp/src/txe_thread_suspend.c b/common_smp/src/txe_thread_suspend.c
index 951d35eb..dab42db7 100644
--- a/common_smp/src/txe_thread_suspend.c
+++ b/common_smp/src/txe_thread_suspend.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_suspend(TX_THREAD *thread_ptr)
{
diff --git a/common_smp/src/txe_thread_terminate.c b/common_smp/src/txe_thread_terminate.c
index aa54501c..8e1f18f5 100644
--- a/common_smp/src/txe_thread_terminate.c
+++ b/common_smp/src/txe_thread_terminate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_terminate(TX_THREAD *thread_ptr)
{
diff --git a/common_smp/src/txe_thread_time_slice_change.c b/common_smp/src/txe_thread_time_slice_change.c
index d01137d8..456dbb2a 100644
--- a/common_smp/src/txe_thread_time_slice_change.c
+++ b/common_smp/src/txe_thread_time_slice_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -64,14 +65,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_time_slice_change(TX_THREAD *thread_ptr, ULONG new_time_slice, ULONG *old_time_slice)
{
diff --git a/common_smp/src/txe_thread_wait_abort.c b/common_smp/src/txe_thread_wait_abort.c
index 8132c597..086fb33b 100644
--- a/common_smp/src/txe_thread_wait_abort.c
+++ b/common_smp/src/txe_thread_wait_abort.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* Application code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_wait_abort(TX_THREAD *thread_ptr)
{
diff --git a/common_smp/src/txe_timer_activate.c b/common_smp/src/txe_timer_activate.c
index 9bd62341..094eda85 100644
--- a/common_smp/src/txe_timer_activate.c
+++ b/common_smp/src/txe_timer_activate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_timer_activate(TX_TIMER *timer_ptr)
{
diff --git a/common_smp/src/txe_timer_change.c b/common_smp/src/txe_timer_change.c
index 70a7ed0d..ef503ffa 100644
--- a/common_smp/src/txe_timer_change.c
+++ b/common_smp/src/txe_timer_change.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,14 +67,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_timer_change(TX_TIMER *timer_ptr, ULONG initial_ticks, ULONG reschedule_ticks)
{
diff --git a/common_smp/src/txe_timer_create.c b/common_smp/src/txe_timer_create.c
index 553418bf..02cf7c1a 100644
--- a/common_smp/src/txe_timer_create.c
+++ b/common_smp/src/txe_timer_create.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,14 +73,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_timer_create(TX_TIMER *timer_ptr, CHAR *name_ptr,
VOID (*expiration_function)(ULONG id), ULONG expiration_input,
diff --git a/common_smp/src/txe_timer_deactivate.c b/common_smp/src/txe_timer_deactivate.c
index a5736919..d44ba67b 100644
--- a/common_smp/src/txe_timer_deactivate.c
+++ b/common_smp/src/txe_timer_deactivate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,14 +61,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_timer_deactivate(TX_TIMER *timer_ptr)
{
diff --git a/common_smp/src/txe_timer_delete.c b/common_smp/src/txe_timer_delete.c
index 3a1bf33c..e94ba4d6 100644
--- a/common_smp/src/txe_timer_delete.c
+++ b/common_smp/src/txe_timer_delete.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,14 +63,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_timer_delete(TX_TIMER *timer_ptr)
{
diff --git a/common_smp/src/txe_timer_info_get.c b/common_smp/src/txe_timer_info_get.c
index a227f137..16ac5f64 100644
--- a/common_smp/src/txe_timer_info_get.c
+++ b/common_smp/src/txe_timer_info_get.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,14 +68,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 Yuxin Zhou Modified comment(s), */
-/* resulting in version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_timer_info_get(TX_TIMER *timer_ptr, CHAR **name, UINT *active, ULONG *remaining_ticks,
ULONG *reschedule_ticks, TX_TIMER **next_timer)
diff --git a/ports/arc_em/metaware/example_build/sample_threadx/sample_threadx.c b/ports/arc_em/metaware/example_build/sample_threadx/sample_threadx.c
index 5a03f35c..6ce6e0d4 100644
--- a/ports/arc_em/metaware/example_build/sample_threadx/sample_threadx.c
+++ b/ports/arc_em/metaware/example_build/sample_threadx/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -82,41 +82,41 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -124,23 +124,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -243,11 +243,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -306,7 +306,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -359,7 +359,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/arc_em/metaware/example_build/sample_threadx/sample_threadx.cmd b/ports/arc_em/metaware/example_build/sample_threadx/sample_threadx.cmd
index 78dc1f6e..2f72e865 100644
--- a/ports/arc_em/metaware/example_build/sample_threadx/sample_threadx.cmd
+++ b/ports/arc_em/metaware/example_build/sample_threadx/sample_threadx.cmd
@@ -1,24 +1,24 @@
//
// This is the linker script example (SRV3-style).
// (c) Synopsys, 2013
-//
+//
//
-//number of exceptions and interrupts
+//number of exceptions and interrupts
NUMBER_OF_EXCEPTIONS = 16;//it is fixed (16)
NUMBER_OF_INTERRUPTS = 5;//depends on HW configuration
//define Interrupt Vector Table size
IVT_SIZE_ITEMS = (NUMBER_OF_EXCEPTIONS + NUMBER_OF_INTERRUPTS);//the total IVT size (in "items")
-IVT_SIZE_BYTES = IVT_SIZE_ITEMS * 4;//in bytes
+IVT_SIZE_BYTES = IVT_SIZE_ITEMS * 4;//in bytes
//define ICCM and DCCM locations
MEMORY {
ICCM: ORIGIN = 0x00000000, LENGTH = 128K
DCCM: ORIGIN = 0x80000000, LENGTH = 128K
}
-
-//define sections and groups
+
+//define sections and groups
SECTIONS {
GROUP: {
.ivt (TEXT) : # Interrupt table
@@ -26,18 +26,18 @@ SECTIONS {
___ivt1 = .;
* (.ivt)
___ivt2 = .;
- // Make the IVT at least IVT_SIZE_BYTES
+ // Make the IVT at least IVT_SIZE_BYTES
. += (___ivt2 - ___ivt1 < IVT_SIZE_BYTES) ? (IVT_SIZE_BYTES - (___ivt2 - ___ivt1)) : 0;
}
.ivh (TEXT) : // Interrupt handlers
-
+
//TEXT sections
.text? : { *('.text$crt*') }
* (TEXT): {}
//Literals
* (LIT): {}
} > ICCM
-
+
GROUP: {
//data sections
.sdata?: {}
diff --git a/ports/arc_em/metaware/example_build/sample_threadx/tx_initialize_low_level.s b/ports/arc_em/metaware/example_build/sample_threadx/tx_initialize_low_level.s
index cf55e8db..07da0899 100644
--- a/ports/arc_em/metaware/example_build/sample_threadx/tx_initialize_low_level.s
+++ b/ports/arc_em/metaware/example_build/sample_threadx/tx_initialize_low_level.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
@@ -88,20 +88,6 @@ _tx_system_stack_base_address:
;/* */
;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 Andres Mlinar Modified comment(s), optimized*/
-;/* system stack usage, */
-;/* resulting in version 6.1.9 */
-;/* 01-31-2022 Andres Mlinar Modified comments(s), */
-;/* initialize interrupts right */
-;/* before enabling the task */
-;/* scheduler, */
-;/* resulting in version 6.1.10 */
-;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
;{
diff --git a/ports/arc_em/metaware/example_build/sample_threadx/vectors.s b/ports/arc_em/metaware/example_build/sample_threadx/vectors.s
index c6cbc893..eeb9ba2a 100644
--- a/ports/arc_em/metaware/example_build/sample_threadx/vectors.s
+++ b/ports/arc_em/metaware/example_build/sample_threadx/vectors.s
@@ -1,4 +1,4 @@
-
+
.file "vectors.s"
.section .ivt,text
;; This directive forces this section to stay resident even if stripped out by the -zpurgetext linker option
diff --git a/ports/arc_em/metaware/inc/tx_port.h b/ports/arc_em/metaware/inc/tx_port.h
index 69be9c31..34ca8019 100644
--- a/ports/arc_em/metaware/inc/tx_port.h
+++ b/ports/arc_em/metaware/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,29 +43,15 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s), updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 01-31-2022 Andres Mlinar Modified comments(s), */
-/* initialize interrupts right */
-/* before enabling the task */
-/* scheduler, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
#define TX_PORT_H
-/* Remove volatile for ThreadX source on the ARC. This is because the ARC
- compiler generates different non-cache r/w access when using volatile
- that is different from the assembly language access of the same
+/* Remove volatile for ThreadX source on the ARC. This is because the ARC
+ compiler generates different non-cache r/w access when using volatile
+ that is different from the assembly language access of the same
global variables in ThreadX. */
#ifdef TX_SOURCE_CODE
@@ -89,7 +76,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -102,7 +89,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -138,8 +125,8 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 2048 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
@@ -149,8 +136,8 @@ typedef unsigned short USHORT;
#define TX_INT_DISABLE_MASK 0x00000000 /* Disable all interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -195,7 +182,7 @@ void _tx_initialize_start_interrupts(void);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION _tx_initialize_start_interrupts();
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -209,15 +196,15 @@ void _tx_initialize_start_interrupts(void);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
#define TX_THREAD_EXTENSION_0 VOID *__mw_threadx_tls; \
int __mw_errnum; \
VOID (*__mw_thread_exit)(struct TX_THREAD_STRUCT *);
-#define TX_THREAD_EXTENSION_1
-#define TX_THREAD_EXTENSION_2
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -231,11 +218,11 @@ void _tx_initialize_start_interrupts(void);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -244,16 +231,16 @@ void _tx_initialize_start_interrupts(void);
#if __HIGHC__
-/* The MetaWare thread safe C/C++ runtime library needs space to
+/* The MetaWare thread safe C/C++ runtime library needs space to
store thread specific information. In addition, a function pointer
- is also supplied so that certain thread-specific resources may be
+ is also supplied so that certain thread-specific resources may be
released upon thread termination and/or thread completion. */
#define TX_THREAD_CREATE_EXTENSION(thread_ptr) \
thread_ptr -> __mw_threadx_tls = 0; \
thread_ptr -> __mw_errnum = 0; \
- thread_ptr -> __mw_thread_exit = TX_NULL;
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+ thread_ptr -> __mw_thread_exit = TX_NULL;
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr) \
if (thread_ptr -> __mw_thread_exit) \
(thread_ptr -> __mw_thread_exit) (thread_ptr);
@@ -263,10 +250,10 @@ void _tx_initialize_start_interrupts(void);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
-#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
-#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
+#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
#endif
@@ -293,9 +280,9 @@ void _tx_initialize_start_interrupts(void);
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -320,8 +307,8 @@ void _tx_initialize_start_interrupts(void);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARCv2_EM/MetaWare Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARCv2_EM/MetaWare Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/arc_em/metaware/readme_threadx.txt b/ports/arc_em/metaware/readme_threadx.txt
index d622eeec..d14f7865 100644
--- a/ports/arc_em/metaware/readme_threadx.txt
+++ b/ports/arc_em/metaware/readme_threadx.txt
@@ -2,70 +2,70 @@
Using the MetaWare Tools
-1. Open the Eclipse ThreadX RTOS Workspace
+1. Open the Eclipse ThreadX RTOS Workspace
-In order to build the ThreadX library and the ThreadX demonstration first load
-the Eclipse ThreadX RTOS Workspace, which is located inside the "example_build" directory.
+In order to build the ThreadX library and the ThreadX demonstration first load
+the Eclipse ThreadX RTOS Workspace, which is located inside the "example_build" directory.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply select the ThreadX library project
-file "tx" and then select the build button. You should now observe the compilation
-and assembly of the ThreadX library. This project build produces the ThreadX
+Building the ThreadX library is easy; simply select the ThreadX library project
+file "tx" and then select the build button. You should now observe the compilation
+and assembly of the ThreadX library. This project build produces the ThreadX
library file tx.a.
3. Demonstration System
The ThreadX demonstration is designed to execute under the MetaWare ARCv2 EM
-simulation. The instructions that follow describe how to get the ThreadX
-demonstration running.
+simulation. The instructions that follow describe how to get the ThreadX
+demonstration running.
-Building the demonstration is easy; simply select the demonstration project file
-"sample_threadx." At this point, select the build button and observe the
-compilation, assembly, and linkage of the ThreadX demonstration application.
+Building the demonstration is easy; simply select the demonstration project file
+"sample_threadx." At this point, select the build button and observe the
+compilation, assembly, and linkage of the ThreadX demonstration application.
After the demonstration is built, click on the "Debug" button and it will
automatically launch a pre-configured connection to the ARCv2 EM simulator.
-You are now ready to execute the ThreadX demonstration system. Select
-breakpoints and data watches to observe the execution of the sample_threadx.c
+You are now ready to execute the ThreadX demonstration system. Select
+breakpoints and data watches to observe the execution of the sample_threadx.c
application.
4. System Initialization
-The system entry point using the MetaWare tools is at the label _start.
-This is defined within the crt1.s file supplied by MetaWare. In addition,
+The system entry point using the MetaWare tools is at the label _start.
+This is defined within the crt1.s file supplied by MetaWare. In addition,
this is where all static and global preset C variable initialization
processing is called from.
After the MetaWare startup function completes, ThreadX initialization is
called. The main initialization function is _tx_initialize_low_level and
-is located in the file tx_initialize_low_level.s. This function is
-responsible for setting up various system data structures, and interrupt
+is located in the file tx_initialize_low_level.s. This function is
+responsible for setting up various system data structures, and interrupt
vectors.
-By default free memory is assumed to start at the section .free_memory
-which is referenced in tx_initialize_low_level.s and located in the
-linker control file after all the linker defined RAM addresses. This is
+By default free memory is assumed to start at the section .free_memory
+which is referenced in tx_initialize_low_level.s and located in the
+linker control file after all the linker defined RAM addresses. This is
the address passed to the application definition function, tx_application_define.
5. Register Usage and Stack Frames
-The ARC compiler assumes that registers r0-r12 are scratch registers for
-each function. All other registers used by a C function must be preserved
-by the function. ThreadX takes advantage of this in situations where a
-context switch happens as a result of making a ThreadX service call (which
-is itself a C function). In such cases, the saved context of a thread is
+The ARC compiler assumes that registers r0-r12 are scratch registers for
+each function. All other registers used by a C function must be preserved
+by the function. ThreadX takes advantage of this in situations where a
+context switch happens as a result of making a ThreadX service call (which
+is itself a C function). In such cases, the saved context of a thread is
only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -114,20 +114,20 @@ associated thread control block TX_THREAD.
0x9C bta
0xA0 point of interrupt
0xA4 STATUS32
-
+
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
-performance. To make it run faster, you can change the build_threadx.bat
-file to remove the -g option and enable all compiler optimizations.
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
+performance. To make it run faster, you can change the build_threadx.bat
+file to remove the -g option and enable all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
@@ -142,25 +142,25 @@ _tx_interrupt_x:
st blink, [sp, 16] ; Save blink (blink must be saved before _tx_thread_context_save)
bl _tx_thread_context_save ; Save interrupt context
;
-; /* Application ISR processing goes here! Your ISR can be written in
+; /* Application ISR processing goes here! Your ISR can be written in
; assembly language or in C. If it is written in C, you must allocate
-; 16 bytes of stack space before it is called. This must also be
-; recovered once your C ISR return. An example of this is shown below.
+; 16 bytes of stack space before it is called. This must also be
+; recovered once your C ISR return. An example of this is shown below.
;
; If the ISR is written in assembly language, only the compiler scratch
-; registers are available for use without saving/restoring (r0-r12).
+; registers are available for use without saving/restoring (r0-r12).
; If use of additional registers are required they must be saved and
; restored. */
;
bl.d your_ISR_written_in_C ; Call an ISR written in C
sub sp, sp, 16 ; Allocate stack space (delay slot)
add sp, sp, 16 ; Recover stack space
-
+
;
b _tx_thread_context_restore ; Restore interrupt context
-The application handles interrupts directly, which necessitates all register
+The application handles interrupts directly, which necessitates all register
preservation by the application's ISR. ISRs that do not use the ThreadX
_tx_thread_context_save and _tx_thread_context_restore routines are not
allowed access to the ThreadX API. In addition, custom application ISRs
@@ -169,28 +169,28 @@ should be higher priority than all ThreadX-managed ISRs.
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
-interrupt source, these services are not functional but the remainder of
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
+interrupt source, these services are not functional but the remainder of
ThreadX will still run.
By default, the ThreadX timer interrupt is mapped to the ARCv2 EM auxiliary
timer 0, which generates low priority interrupts on interrupt vector 16.
-It is easy to change the timer interrupt source and priority by changing the
+It is easy to change the timer interrupt source and priority by changing the
setup code in tx_initialize_low_level.s.
9. Hardware Stack Checking
ThreadX optionally supports the ARCv2 EM hardware stack checking feature. When enabled,
-the KSTACK_TOP and KSTACK_BASE registers are loaded with the stack top/bottom before
+the KSTACK_TOP and KSTACK_BASE registers are loaded with the stack top/bottom before
each thread's execution. In addition, the SC bit of STATUS32 is set to enable the stack
checking feature. During initialization, idle, or interrupt processing, the hardware
stack checking on the system stack is performed, when enabled.
To enable ThreadX support for hardware stack checking, simply build the ThreadX library
and application assembly code with TX_ENABLE_HW_STACK_CHECKING defined. This will enable
-the stack checking logic in ThreadX.
+the stack checking logic in ThreadX.
For the system stack checking to function properly, there are two sections that must
be located around the .stack section, which defines the system stack location and size.
@@ -198,8 +198,8 @@ The new sections are .stack_top and .stack_base. The .stack_top section should b
immediately BEFORE the .stack section and .stack_base should be placed immediately AFTER
the .stack section. Please see the sample_threadx.cmd linker control file for an example.
-When/if a stack exception occurs, the hardware will fetch the _tx_ev_protection_viol
-exception defined in tx_initialize_low_level.s. Processing for this exception is
+When/if a stack exception occurs, the hardware will fetch the _tx_ev_protection_viol
+exception defined in tx_initialize_low_level.s. Processing for this exception is
application specific.
@@ -215,12 +215,12 @@ information associated with this specific port of ThreadX:
tx_thread_context_restore.s r25/r30 are caller saved
tx_thread_context_save.s r25/r30 are caller saved
tx_thread_interrupt_control.s Modified comments
- tx_thread_schedule.s fixed interrupt priority overwritting bug,
+ tx_thread_schedule.s fixed interrupt priority overwritting bug,
and fixed hardware stack checker disable and reenable logic
tx_thread_stack_build.s Modified comments
tx_thread_system_return.s Modified comments
tx_timer_interrupt.s remove unneeded load of _tx_thread_preempt_disable
-
+
09-30-2020 Initial ThreadX 6.1 for ARCv2 EM using MetaWare tools.
diff --git a/ports/arc_em/metaware/src/tx_thread_context_restore.s b/ports/arc_em/metaware/src/tx_thread_context_restore.s
index 7e1bb8bb..e39c3e2f 100644
--- a/ports/arc_em/metaware/src/tx_thread_context_restore.s
+++ b/ports/arc_em/metaware/src/tx_thread_context_restore.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
@@ -59,22 +59,6 @@
;/* */
;/* ISRs Interrupt Service Routines */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 04-02-2021 Andres Mlinar Modified comment(s), and */
-;/* r25/r30 are caller saved, */
-;/* resulting in version 6.1.6 */
-;/* 10-15-2021 Andres Mlinar Modified comment(s), added */
-;/* support for disabling the */
-;/* loop control feature, */
-;/* resulting in version 6.1.9 */
-;/* 03-08-2023 Cindy Deng Modified comment(s), added */
-;/* #include tx_user.h, */
-;/* resulting in version 6.2.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
;{
diff --git a/ports/arc_em/metaware/src/tx_thread_context_save.s b/ports/arc_em/metaware/src/tx_thread_context_save.s
index 57013da2..fb2a280c 100644
--- a/ports/arc_em/metaware/src/tx_thread_context_save.s
+++ b/ports/arc_em/metaware/src/tx_thread_context_save.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
@@ -58,18 +58,6 @@
;/* */
;/* ISRs */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 04-02-2021 Andres Mlinar Modified comment(s), and */
-;/* r25/r30 are caller saved, */
-;/* resulting in version 6.1.6 */
-;/* 03-08-2023 Cindy Deng Modified comment(s), added */
-;/* #include tx_user.h, */
-;/* resulting in version 6.2.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
;{
diff --git a/ports/arc_em/metaware/src/tx_thread_interrupt_control.s b/ports/arc_em/metaware/src/tx_thread_interrupt_control.s
index 6cca4ec7..b6d26148 100644
--- a/ports/arc_em/metaware/src/tx_thread_interrupt_control.s
+++ b/ports/arc_em/metaware/src/tx_thread_interrupt_control.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
@@ -52,17 +52,6 @@
;/* */
;/* Application Code */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 04-02-2021 Andres Mlinar Modified comments, */
-;/* resulting in version 6.1.6 */
-;/* 03-08-2023 Cindy Deng Modified comment(s), added */
-;/* #include tx_user.h, */
-;/* resulting in version 6.2.1 */
-;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
;{
diff --git a/ports/arc_em/metaware/src/tx_thread_schedule.s b/ports/arc_em/metaware/src/tx_thread_schedule.s
index 583adae1..0e1a035c 100644
--- a/ports/arc_em/metaware/src/tx_thread_schedule.s
+++ b/ports/arc_em/metaware/src/tx_thread_schedule.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
@@ -60,23 +60,6 @@
;/* _tx_thread_system_return Return to system from thread */
;/* _tx_thread_context_restore Restore thread's context */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 04-02-2021 Andres Mlinar Modified comment(s), and */
-;/* fixed interrupt priority */
-;/* overwritting bug, and */
-;/* fixed hardware stack checker*/
-;/* disable and reenable logic, */
-;/* resulting in version 6.1.6 */
-;/* 10-15-2021 Andres Mlinar Modified comment(s), added */
-;/* support for disabling the */
-;/* loop control feature, */
-;/* improved internal logic, */
-;/* resulting in version 6.1.9 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
;{
diff --git a/ports/arc_em/metaware/src/tx_thread_stack_build.s b/ports/arc_em/metaware/src/tx_thread_stack_build.s
index 9eaf86b5..3fc2e0e5 100644
--- a/ports/arc_em/metaware/src/tx_thread_stack_build.s
+++ b/ports/arc_em/metaware/src/tx_thread_stack_build.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
@@ -57,17 +57,6 @@
;/* */
;/* _tx_thread_create Create thread service */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 04-02-2021 Andres Mlinar Modified comments, */
-;/* resulting in version 6.1.6 */
-;/* 03-08-2023 Cindy Deng Modified comment(s), added */
-;/* #include tx_user.h, */
-;/* resulting in version 6.2.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
;{
diff --git a/ports/arc_em/metaware/src/tx_thread_system_return.s b/ports/arc_em/metaware/src/tx_thread_system_return.s
index b08e87da..83321a45 100644
--- a/ports/arc_em/metaware/src/tx_thread_system_return.s
+++ b/ports/arc_em/metaware/src/tx_thread_system_return.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
@@ -58,20 +58,6 @@
;/* */
;/* ThreadX components */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 04-02-2021 Andres Mlinar Modified comments, */
-;/* resulting in version 6.1.6 */
-;/* 10-15-2021 Andres Mlinar Modified comments, */
-;/* use schedule reenter, */
-;/* resulting in version 6.1.9 */
-;/* 03-08-2023 Cindy Deng Modified comment(s), added */
-;/* #include tx_user.h, */
-;/* resulting in version 6.2.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
;{
diff --git a/ports/arc_em/metaware/src/tx_timer_interrupt.s b/ports/arc_em/metaware/src/tx_timer_interrupt.s
index 003260a8..30941cb0 100644
--- a/ports/arc_em/metaware/src/tx_timer_interrupt.s
+++ b/ports/arc_em/metaware/src/tx_timer_interrupt.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
@@ -58,23 +58,6 @@
;/* */
;/* interrupt vector */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 12-31-2020 Scott Larson Modified comment(s), remove */
-;/* unneeded load of */
-;/* _tx_thread_preempt_disable, */
-;/* resulting in version 6.1.3 */
-;/* 10-15-2021 Andres Mlinar Modified comment(s), and */
-;/* fixed possible race */
-;/* condition on preemption */
-;/* resulting in version 6.1.9 */
-;/* 03-08-2023 Cindy Deng Modified comment(s), added */
-;/* #include tx_user.h, */
-;/* resulting in version 6.2.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
;{
diff --git a/ports/arc_hs/metaware/example_build/sample_threadx/sample_threadx.c b/ports/arc_hs/metaware/example_build/sample_threadx/sample_threadx.c
index 81cca72b..6ce6e0d4 100644
--- a/ports/arc_hs/metaware/example_build/sample_threadx/sample_threadx.c
+++ b/ports/arc_hs/metaware/example_build/sample_threadx/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -83,40 +83,40 @@ CHAR *pointer = TX_NULL;
/* Create the main thread. */
tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -124,23 +124,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -243,11 +243,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -306,7 +306,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -359,7 +359,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/arc_hs/metaware/example_build/sample_threadx/sample_threadx.cmd b/ports/arc_hs/metaware/example_build/sample_threadx/sample_threadx.cmd
index 78dc1f6e..2f72e865 100644
--- a/ports/arc_hs/metaware/example_build/sample_threadx/sample_threadx.cmd
+++ b/ports/arc_hs/metaware/example_build/sample_threadx/sample_threadx.cmd
@@ -1,24 +1,24 @@
//
// This is the linker script example (SRV3-style).
// (c) Synopsys, 2013
-//
+//
//
-//number of exceptions and interrupts
+//number of exceptions and interrupts
NUMBER_OF_EXCEPTIONS = 16;//it is fixed (16)
NUMBER_OF_INTERRUPTS = 5;//depends on HW configuration
//define Interrupt Vector Table size
IVT_SIZE_ITEMS = (NUMBER_OF_EXCEPTIONS + NUMBER_OF_INTERRUPTS);//the total IVT size (in "items")
-IVT_SIZE_BYTES = IVT_SIZE_ITEMS * 4;//in bytes
+IVT_SIZE_BYTES = IVT_SIZE_ITEMS * 4;//in bytes
//define ICCM and DCCM locations
MEMORY {
ICCM: ORIGIN = 0x00000000, LENGTH = 128K
DCCM: ORIGIN = 0x80000000, LENGTH = 128K
}
-
-//define sections and groups
+
+//define sections and groups
SECTIONS {
GROUP: {
.ivt (TEXT) : # Interrupt table
@@ -26,18 +26,18 @@ SECTIONS {
___ivt1 = .;
* (.ivt)
___ivt2 = .;
- // Make the IVT at least IVT_SIZE_BYTES
+ // Make the IVT at least IVT_SIZE_BYTES
. += (___ivt2 - ___ivt1 < IVT_SIZE_BYTES) ? (IVT_SIZE_BYTES - (___ivt2 - ___ivt1)) : 0;
}
.ivh (TEXT) : // Interrupt handlers
-
+
//TEXT sections
.text? : { *('.text$crt*') }
* (TEXT): {}
//Literals
* (LIT): {}
} > ICCM
-
+
GROUP: {
//data sections
.sdata?: {}
diff --git a/ports/arc_hs/metaware/example_build/sample_threadx/tx_initialize_low_level.s b/ports/arc_hs/metaware/example_build/sample_threadx/tx_initialize_low_level.s
index 56ef5840..9d583370 100644
--- a/ports/arc_hs/metaware/example_build/sample_threadx/tx_initialize_low_level.s
+++ b/ports/arc_hs/metaware/example_build/sample_threadx/tx_initialize_low_level.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
@@ -67,20 +67,6 @@ _tx_first_free_address:
;/* */
;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 Andres Mlinar Modified comment(s), optimized*/
-;/* system stack usage, */
-;/* resulting in version 6.1.9 */
-;/* 01-31-2022 Andres Mlinar Modified comments(s), */
-;/* initialize interrupts right */
-;/* before enabling the task */
-;/* scheduler, */
-;/* resulting in version 6.1.10 */
-;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
;{
diff --git a/ports/arc_hs/metaware/example_build/sample_threadx/vectors.s b/ports/arc_hs/metaware/example_build/sample_threadx/vectors.s
index c6cbc893..eeb9ba2a 100644
--- a/ports/arc_hs/metaware/example_build/sample_threadx/vectors.s
+++ b/ports/arc_hs/metaware/example_build/sample_threadx/vectors.s
@@ -1,4 +1,4 @@
-
+
.file "vectors.s"
.section .ivt,text
;; This directive forces this section to stay resident even if stripped out by the -zpurgetext linker option
diff --git a/ports/arc_hs/metaware/inc/tx_port.h b/ports/arc_hs/metaware/inc/tx_port.h
index 19950c03..7c5dc6de 100644
--- a/ports/arc_hs/metaware/inc/tx_port.h
+++ b/ports/arc_hs/metaware/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,29 +43,15 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s), updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 01-31-2022 Andres Mlinar Modified comments(s), */
-/* initialize interrupts right */
-/* before enabling the task */
-/* scheduler, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
#define TX_PORT_H
-/* Remove volatile for ThreadX source on the ARC. This is because the ARC
- compiler generates different non-cache r/w access when using volatile
- that is different from the assembly language access of the same
+/* Remove volatile for ThreadX source on the ARC. This is because the ARC
+ compiler generates different non-cache r/w access when using volatile
+ that is different from the assembly language access of the same
global variables in ThreadX. */
#ifdef TX_SOURCE_CODE
@@ -89,7 +76,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -102,7 +89,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -138,8 +125,8 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 2048 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
@@ -149,8 +136,8 @@ typedef unsigned short USHORT;
#define TX_INT_DISABLE_MASK 0x00000000 /* Disable all interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -195,7 +182,7 @@ void _tx_initialize_start_interrupts(void);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION _tx_initialize_start_interrupts();
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -209,15 +196,15 @@ void _tx_initialize_start_interrupts(void);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
#define TX_THREAD_EXTENSION_0 VOID *__mw_threadx_tls; \
int __mw_errnum; \
VOID (*__mw_thread_exit)(struct TX_THREAD_STRUCT *);
-#define TX_THREAD_EXTENSION_1
-#define TX_THREAD_EXTENSION_2
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -231,11 +218,11 @@ void _tx_initialize_start_interrupts(void);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -244,16 +231,16 @@ void _tx_initialize_start_interrupts(void);
#if __HIGHC__
-/* The MetaWare thread safe C/C++ runtime library needs space to
+/* The MetaWare thread safe C/C++ runtime library needs space to
store thread specific information. In addition, a function pointer
- is also supplied so that certain thread-specific resources may be
+ is also supplied so that certain thread-specific resources may be
released upon thread termination and/or thread completion. */
#define TX_THREAD_CREATE_EXTENSION(thread_ptr) \
thread_ptr -> __mw_threadx_tls = 0; \
thread_ptr -> __mw_errnum = 0; \
- thread_ptr -> __mw_thread_exit = TX_NULL;
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+ thread_ptr -> __mw_thread_exit = TX_NULL;
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr) \
if (thread_ptr -> __mw_thread_exit) \
(thread_ptr -> __mw_thread_exit) (thread_ptr);
@@ -263,10 +250,10 @@ void _tx_initialize_start_interrupts(void);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
-#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
-#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
+#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
#endif
@@ -293,9 +280,9 @@ void _tx_initialize_start_interrupts(void);
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -334,8 +321,8 @@ VOID tx_thread_register_bank_assign(VOID *thread_ptr, UINT register_bank);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARC_HS/MetaWare Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARC_HS/MetaWare Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/arc_hs/metaware/readme_threadx.txt b/ports/arc_hs/metaware/readme_threadx.txt
index c763b850..506d89cc 100644
--- a/ports/arc_hs/metaware/readme_threadx.txt
+++ b/ports/arc_hs/metaware/readme_threadx.txt
@@ -2,70 +2,70 @@
Using the MetaWare Tools
-1. Open the Azure RTOS Workspace
+1. Open the Azure RTOS Workspace
-In order to build the ThreadX library and the ThreadX demonstration first load
-the Azure RTOS Workspace, which is located inside the "example_build" directory.
+In order to build the ThreadX library and the ThreadX demonstration first load
+the Azure RTOS Workspace, which is located inside the "example_build" directory.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply select the ThreadX library project
-file "tx" and then select the build button. You should now observe the compilation
-and assembly of the ThreadX library. This project build produces the ThreadX
+Building the ThreadX library is easy; simply select the ThreadX library project
+file "tx" and then select the build button. You should now observe the compilation
+and assembly of the ThreadX library. This project build produces the ThreadX
library file tx.a.
3. Demonstration System
The ThreadX demonstration is designed to execute under the MetaWare ARC HS
-simulation. The instructions that follow describe how to get the ThreadX
-demonstration running.
+simulation. The instructions that follow describe how to get the ThreadX
+demonstration running.
-Building the demonstration is easy; simply select the demonstration project file
-"sample_threadx." At this point, select the build button and observe the
-compilation, assembly, and linkage of the ThreadX demonstration application.
+Building the demonstration is easy; simply select the demonstration project file
+"sample_threadx." At this point, select the build button and observe the
+compilation, assembly, and linkage of the ThreadX demonstration application.
After the demonstration is built, click on the "Debug" button and it will
automatically launch a pre-configured connection to the ARC HS simulator.
-You are now ready to execute the ThreadX demonstration system. Select
-breakpoints and data watches to observe the execution of the sample_threadx.c
+You are now ready to execute the ThreadX demonstration system. Select
+breakpoints and data watches to observe the execution of the sample_threadx.c
application.
4. System Initialization
-The system entry point using the MetaWare tools is at the label _start.
-This is defined within the crt1.s file supplied by MetaWare. In addition,
+The system entry point using the MetaWare tools is at the label _start.
+This is defined within the crt1.s file supplied by MetaWare. In addition,
this is where all static and global preset C variable initialization
processing is called from.
After the MetaWare startup function completes, ThreadX initialization is
called. The main initialization function is _tx_initialize_low_level and
-is located in the file tx_initialize_low_level.s. This function is
-responsible for setting up various system data structures, and interrupt
+is located in the file tx_initialize_low_level.s. This function is
+responsible for setting up various system data structures, and interrupt
vectors.
-By default free memory is assumed to start at the section .free_memory
-which is referenced in tx_initialize_low_level.s and located in the
-linker control file after all the linker defined RAM addresses. This is
+By default free memory is assumed to start at the section .free_memory
+which is referenced in tx_initialize_low_level.s and located in the
+linker control file after all the linker defined RAM addresses. This is
the address passed to the application definition function, tx_application_define.
5. Register Usage and Stack Frames
-The ARC compiler assumes that registers r0-r12 are scratch registers for
-each function. All other registers used by a C function must be preserved
-by the function. ThreadX takes advantage of this in situations where a
-context switch happens as a result of making a ThreadX service call (which
-is itself a C function). In such cases, the saved context of a thread is
+The ARC compiler assumes that registers r0-r12 are scratch registers for
+each function. All other registers used by a C function must be preserved
+by the function. ThreadX takes advantage of this in situations where a
+context switch happens as a result of making a ThreadX service call (which
+is itself a C function). In such cases, the saved context of a thread is
only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -114,26 +114,26 @@ associated thread control block TX_THREAD.
0x9C bta
0xA0 point of interrupt
0xA4 STATUS32
-
+
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
-performance. To make it run faster, you can change the build_threadx.bat
-file to remove the -g option and enable all compiler optimizations.
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
+performance. To make it run faster, you can change the build_threadx.bat
+file to remove the -g option and enable all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for the
-ARC HS processor, including support for software interrupts and fast
+ARC HS processor, including support for software interrupts and fast
hardware interrupts.
7.1 Software Interrupt Handling
@@ -147,25 +147,25 @@ _tx_interrupt_x:
st blink, [sp, 16] ; Save blink (blink must be saved before _tx_thread_context_save)
bl _tx_thread_context_save ; Save interrupt context
;
-; /* Application ISR processing goes here! Your ISR can be written in
+; /* Application ISR processing goes here! Your ISR can be written in
; assembly language or in C. If it is written in C, you must allocate
-; 16 bytes of stack space before it is called. This must also be
-; recovered once your C ISR return. An example of this is shown below.
+; 16 bytes of stack space before it is called. This must also be
+; recovered once your C ISR return. An example of this is shown below.
;
; If the ISR is written in assembly language, only the compiler scratch
-; registers are available for use without saving/restoring (r0-r12).
+; registers are available for use without saving/restoring (r0-r12).
; If use of additional registers are required they must be saved and
; restored. */
;
bl.d your_ISR_written_in_C ; Call an ISR written in C
sub sp, sp, 16 ; Allocate stack space (delay slot)
add sp, sp, 16 ; Recover stack space
-
+
;
b _tx_thread_context_restore ; Restore interrupt context
-The application handles interrupts directly, which necessitates all register
+The application handles interrupts directly, which necessitates all register
preservation by the application's ISR. ISRs that do not use the ThreadX
_tx_thread_context_save and _tx_thread_context_restore routines are not
allowed access to the ThreadX API. In addition, custom application ISRs
@@ -173,11 +173,11 @@ should be higher priority than all ThreadX-managed ISRs.
7.2 Fast Interrupt Handling
-ThreadX supports the ARC HS fast interrupt processing. It is assumed that
+ThreadX supports the ARC HS fast interrupt processing. It is assumed that
multiple register banks are available and the ARC HS processor automatically
-uses register bank 1 as the fast interrupt register bank.
+uses register bank 1 as the fast interrupt register bank.
-In order to use fast interrupts with register bank 1, the interrupt desired
+In order to use fast interrupts with register bank 1, the interrupt desired
must have priority 0 and the application must call the following ThreadX API
to setup register bank 1:
@@ -190,7 +190,7 @@ look like:
tx_initialize_fast_interrupt_setup(&fast_interrupt_stack[1020]);
-As for the fast interrupt ISR, the following template should be used for
+As for the fast interrupt ISR, the following template should be used for
ARC HS fast interrupts managed by ThreadX:
.global _tx_fast_interrupt_x
@@ -207,28 +207,28 @@ _tx_fast_interrupt_x:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
-interrupt source, these services are not functional but the remainder of
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
+interrupt source, these services are not functional but the remainder of
ThreadX will still run.
By default, the ThreadX timer interrupt is mapped to the ARC HS auxiliary
timer 0, which generates low priority interrupts on interrupt vector 16.
-It is easy to change the timer interrupt source and priority by changing the
+It is easy to change the timer interrupt source and priority by changing the
setup code in tx_initialize_low_level.s.
9. Thread Hardware Register Bank Context
-ThreadX supports the use of hardware register banks on the ARC HS. A hardware
-register bank may be associated with a specific application thread via the
+ThreadX supports the use of hardware register banks on the ARC HS. A hardware
+register bank may be associated with a specific application thread via the
following API:
void tx_thread_register_bank_assign(TX_THREAD *thread_ptr, register_bank);
This API is assumed to be called from initialization (interrupts are locked out
-and execution is from register bank 0) and after the specified thread has been
-created. This API assumes the register bank number is correct, i.e., a valid
+and execution is from register bank 0) and after the specified thread has been
+created. This API assumes the register bank number is correct, i.e., a valid
register bank greater than 0 and one that hasn't been used for another thread.
Note: if fast interrupts are used, register bank 1 must also not be used. In this
diff --git a/ports/arc_hs/metaware/src/tx_initialize_fast_interrupt_setup.s b/ports/arc_hs/metaware/src/tx_initialize_fast_interrupt_setup.s
index c4aa7114..c757508b 100644
--- a/ports/arc_hs/metaware/src/tx_initialize_fast_interrupt_setup.s
+++ b/ports/arc_hs/metaware/src/tx_initialize_fast_interrupt_setup.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -22,10 +22,10 @@
#include "tx_user.h"
#endif
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
;/* _tx_initialize_fast_interrupt_setup ARC_HS/MetaWare */
;/* 6.2.1 */
;/* AUTHOR */
@@ -33,35 +33,26 @@
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function initializes register bank 1 for fast interrupt use. */
-;/* The initialization includes setting the stack pointer to the value */
-;/* supplied by the caller. */
-;/* */
-;/* INPUT */
-;/* */
-;/* stack_ptr Pointer to stack for bank 1 */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 03-08-2023 Cindy Deng Modified comment(s), added */
-;/* #include tx_user.h, */
-;/* resulting in version 6.2.1 */
+;/* This function initializes register bank 1 for fast interrupt use. */
+;/* The initialization includes setting the stack pointer to the value */
+;/* supplied by the caller. */
+;/* */
+;/* INPUT */
+;/* */
+;/* stack_ptr Pointer to stack for bank 1 */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_fast_interrupt_setup(VOID *stack_ptr)
@@ -71,7 +62,7 @@
_tx_initialize_fast_interrupt_setup:
;
; /* Assume this routine is being called from initialization, with interrupts
-; disabled and from register bank 0. Also assume that the stack pointer
+; disabled and from register bank 0. Also assume that the stack pointer
; input is valid, i.e., there is no error checking on the validity of
; register_bank. */
;
diff --git a/ports/arc_hs/metaware/src/tx_thread_context_fast_restore.s b/ports/arc_hs/metaware/src/tx_thread_context_fast_restore.s
index 089f13de..d2f5284c 100644
--- a/ports/arc_hs/metaware/src/tx_thread_context_fast_restore.s
+++ b/ports/arc_hs/metaware/src/tx_thread_context_fast_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -23,11 +23,11 @@
#endif
.equ BTA, 0x412
-
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
+
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
;/* _tx_thread_context_fast_restore ARC_HS/MetaWare */
;/* 6.2.1 */
;/* AUTHOR */
@@ -35,43 +35,34 @@
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the fast interrupt context, which can be a */
-;/* nesting condition on a non-fast ISR, an idle system restore, a */
-;/* restore of an interrupted thread, and a preemption of an interrupted*/
-;/* thread. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 03-08-2023 Cindy Deng Modified comment(s), added */
-;/* #include tx_user.h, */
-;/* resulting in version 6.2.1 */
+;/* This function restores the fast interrupt context, which can be a */
+;/* nesting condition on a non-fast ISR, an idle system restore, a */
+;/* restore of an interrupted thread, and a preemption of an interrupted*/
+;/* thread. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_fast_restore(VOID)
;{
.global _tx_thread_context_fast_restore
- .type _tx_thread_context_fast_restore, @function
+ .type _tx_thread_context_fast_restore, @function
_tx_thread_context_fast_restore:
;
; /* Note: it is assumed that the stack pointer is in the same position now as
@@ -98,7 +89,7 @@ _tx_thread_context_fast_restore:
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
@@ -160,7 +151,7 @@ __tx_thread_preempt_restore:
st r0, [sp, 132] ; Temporarily save r0
mov r0, 3 ; Build hardware interrupt stack type
st r0, [sp, 0] ; Setup interrupt stack type
-
+
.ifndef TX_DISABLE_LP
lr r0, [LP_START] ; Pickup LP_START
st r0, [sp, 4] ; Save LP_START
@@ -186,7 +177,7 @@ __tx_thread_preempt_restore:
kflag ilink ; Move back to register bank 0
b __tx_preempt_save_done ; Done, finished with preemption save
-__tx_software_interrupt_context:
+__tx_software_interrupt_context:
st ilink, [sp, 0] ; Save ilink (point of interrupt)
st r3, [sp, 4] ; Save status32
mov ilink, sp ; Pass the information back to the other register bank via ilink
@@ -223,7 +214,7 @@ __tx_software_interrupt_context:
st r1, [sp, 128] ; Save r1
st r0, [sp, 132] ; Save r0
st r30, [sp, 136] ; Save r30
-
+
.ifndef TX_DISABLE_LP
lr r10, [LP_START] ; Pickup LP_START
lr r9, [LP_END] ; Pickup LP_END
diff --git a/ports/arc_hs/metaware/src/tx_thread_context_fast_save.s b/ports/arc_hs/metaware/src/tx_thread_context_fast_save.s
index d9a80463..f54176d4 100644
--- a/ports/arc_hs/metaware/src/tx_thread_context_fast_save.s
+++ b/ports/arc_hs/metaware/src/tx_thread_context_fast_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -22,10 +22,10 @@
#include "tx_user.h"
#endif
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
;/* _tx_thread_context_fast_save ARC_HS/MetaWare */
;/* 6.2.1 */
;/* AUTHOR */
@@ -33,46 +33,37 @@
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of fast interrupt processing. The function assumes that */
-;/* fast interrupts are enabled (priority 0) and multiple register */
-;/* banks are available. In this case, register bank 1 is reserved by */
-;/* hardware for fast interrupts. Additional assumptions include that */
-;/* there will be no nested fast interrupts and the LP_START, LP_END, */
-;/* and LP_COUNT registers are not used in the application's fast */
-;/* interrupt ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 03-08-2023 Cindy Deng Modified comment(s), added */
-;/* #include tx_user.h, */
-;/* resulting in version 6.2.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of fast interrupt processing. The function assumes that */
+;/* fast interrupts are enabled (priority 0) and multiple register */
+;/* banks are available. In this case, register bank 1 is reserved by */
+;/* hardware for fast interrupts. Additional assumptions include that */
+;/* there will be no nested fast interrupts and the LP_START, LP_END, */
+;/* and LP_COUNT registers are not used in the application's fast */
+;/* interrupt ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_fast_save(VOID)
;{
.global _tx_thread_context_fast_save
- .type _tx_thread_context_fast_save, @function
+ .type _tx_thread_context_fast_save, @function
_tx_thread_context_fast_save:
;
; /* Increment nested interrupt count. */
diff --git a/ports/arc_hs/metaware/src/tx_thread_context_restore.s b/ports/arc_hs/metaware/src/tx_thread_context_restore.s
index 79a786c5..23d675a8 100644
--- a/ports/arc_hs/metaware/src/tx_thread_context_restore.s
+++ b/ports/arc_hs/metaware/src/tx_thread_context_restore.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
@@ -56,19 +56,6 @@
;/* */
;/* ISRs Interrupt Service Routines */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 Andres Mlinar Modified comment(s), and */
-;/* r25/r30 are caller saved, */
-;/* use schedule_reenter, */
-;/* resulting in version 6.1.9 */
-;/* 03-08-2023 Cindy Deng Modified comment(s), added */
-;/* #include tx_user.h, */
-;/* resulting in version 6.2.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
;{
@@ -249,7 +236,7 @@ __tx_thread_preempt_restore:
b __tx_preempt_save_done ; Done, finished with preemption save
nop
-__tx_software_interrupt_context:
+__tx_software_interrupt_context:
mov r6, 1 ; Build interrupt stack type
st r6, [r7, 0] ; Setup interrupt stack type
st fp, [r7, 24] ; Save fp
diff --git a/ports/arc_hs/metaware/src/tx_thread_context_save.s b/ports/arc_hs/metaware/src/tx_thread_context_save.s
index 9fcc82e6..27ee25b5 100644
--- a/ports/arc_hs/metaware/src/tx_thread_context_save.s
+++ b/ports/arc_hs/metaware/src/tx_thread_context_save.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
@@ -55,18 +55,6 @@
;/* */
;/* ISRs */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 Andres Mlinar Modified comment(s), and */
-;/* r25/r30 are caller saved, */
-;/* resulting in version 6.1.9 */
-;/* 03-08-2023 Cindy Deng Modified comment(s), added */
-;/* #include tx_user.h, */
-;/* resulting in version 6.2.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
;{
diff --git a/ports/arc_hs/metaware/src/tx_thread_interrupt_control.s b/ports/arc_hs/metaware/src/tx_thread_interrupt_control.s
index 9d3dacae..3d18b9a1 100644
--- a/ports/arc_hs/metaware/src/tx_thread_interrupt_control.s
+++ b/ports/arc_hs/metaware/src/tx_thread_interrupt_control.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
@@ -52,17 +52,6 @@
;/* */
;/* Application Code */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 04-02-2021 Andres Mlinar Modified comments, */
-;/* resulting in version 6.1.6 */
-;/* 03-08-2023 Cindy Deng Modified comment(s), added */
-;/* #include tx_user.h, */
-;/* resulting in version 6.2.1 */
-;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
;{
diff --git a/ports/arc_hs/metaware/src/tx_thread_register_bank_assign.s b/ports/arc_hs/metaware/src/tx_thread_register_bank_assign.s
index 7b9d1114..f9876c89 100644
--- a/ports/arc_hs/metaware/src/tx_thread_register_bank_assign.s
+++ b/ports/arc_hs/metaware/src/tx_thread_register_bank_assign.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -22,10 +22,10 @@
#include "tx_user.h"
#endif
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
;/* _tx_thread_register_bank_assign ARC_HS/MetaWare */
;/* 6.2.1 */
;/* AUTHOR */
@@ -33,37 +33,28 @@
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function builds a stack frame on the supplied thread's stack. */
;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
;/* thread_ptr Pointer to thread control blk */
;/* register_bank Register bank number */
-;/* (1 through max-1) */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
+;/* (1 through max-1) */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 03-08-2023 Cindy Deng Modified comment(s), added */
-;/* #include tx_user.h, */
-;/* resulting in version 6.2.1 */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application */
;/* */
;/**************************************************************************/
;VOID _tx_thread_register_bank_assign(VOID *thread_ptr, UINT register_bank)
@@ -75,9 +66,9 @@ _tx_thread_register_bank_assign:
; /* Assume this routine is being called from initialization, with interrupts
; disabled and from register bank 0. Also assume that the thread pointer and
; register bank input is valid, i.e., there is no error checking on the validity of
-; the thread pointer or the register_bank.
+; the thread pointer or the register_bank.
;
-; It is worth noting that if fast interrupts are being used, register bank 1
+; It is worth noting that if fast interrupts are being used, register bank 1
; is reserved for the fast interrupt processing, so thread register bank assignments
; should begin at bank 2. */
;
@@ -101,7 +92,7 @@ _tx_thread_register_bank_assign:
bclr r3, r3, 17 ;
bclr r3, r3, 18 ;
kflag r3 ; Move back to register bank 0
- mov r5, 3 ; Build type for hardware interrupt context
+ mov r5, 3 ; Build type for hardware interrupt context
j_s.d [blink] ; Return to caller
st r5, [r4, 0] ; Set stack frame type
;}
diff --git a/ports/arc_hs/metaware/src/tx_thread_schedule.s b/ports/arc_hs/metaware/src/tx_thread_schedule.s
index 954ec371..2651cb48 100644
--- a/ports/arc_hs/metaware/src/tx_thread_schedule.s
+++ b/ports/arc_hs/metaware/src/tx_thread_schedule.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
@@ -57,18 +57,6 @@
;/* _tx_thread_system_return Return to system from thread */
;/* _tx_thread_context_restore Restore thread's context */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 Andres Mlinar Modified comment(s), */
-;/* use schedule reenter, */
-;/* resulting in version 6.1.9 */
-;/* 03-08-2023 Cindy Deng Modified comment(s), added */
-;/* #include tx_user.h, */
-;/* resulting in version 6.2.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
;{
@@ -149,11 +137,11 @@ __tx_thread_schedule_loop:
ld r2, [sp, 4] ; Pickup status32
kflag r2 ; Enter the proper register bank
ld r3, [sp, 8] ; Pickup the saved interrupt posture
- add sp, sp, 12 ; Recover small stack frame
- j_s.d [blink] ; Return to thread and restore flags
+ add sp, sp, 12 ; Recover small stack frame
+ j_s.d [blink] ; Return to thread and restore flags
seti r3 ; Recover STATUS32
-__tx_hw_interrupt_restore:
+__tx_hw_interrupt_restore:
mov r0, 0x2 ; Pretend level 1 interrupt is returning
sr r0, [AUX_IRQ_ACT] ;
@@ -163,10 +151,10 @@ __tx_hw_interrupt_restore:
sr r0, [LP_START] ; Restore LP_START
ld r1, [sp, 8] ; Recover LP_END
sr r1, [LP_END] ; Restore LP_END
- ld r2, [sp, 12] ; Recover LP_COUNT
+ ld r2, [sp, 12] ; Recover LP_COUNT
mov LP_COUNT, r2
.endif
-
+
.ifdef TX_ENABLE_ACC
ld r58, [sp, 140] ; Recover r58
ld r59, [sp, 144] ; Recover r59
@@ -180,7 +168,7 @@ __tx_hw_interrupt_restore:
kflag r0 ; Switch to the proper register bank
add sp, sp, 160 ; Recover the interrupt stack frame
rtie ; Return to point of interrupt
-
+
__tx_restore_non_hw_context:
;
; /* Determine if an interrupt frame or a synchronous task suspension frame
diff --git a/ports/arc_hs/metaware/src/tx_thread_stack_build.s b/ports/arc_hs/metaware/src/tx_thread_stack_build.s
index 8ef5dc98..db4becfc 100644
--- a/ports/arc_hs/metaware/src/tx_thread_stack_build.s
+++ b/ports/arc_hs/metaware/src/tx_thread_stack_build.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
@@ -57,17 +57,6 @@
;/* */
;/* _tx_thread_create Create thread service */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 04-02-2021 Andres Mlinar Modified comments, */
-;/* resulting in version 6.1.6 */
-;/* 03-08-2023 Cindy Deng Modified comment(s), added */
-;/* #include tx_user.h, */
-;/* resulting in version 6.2.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
;{
diff --git a/ports/arc_hs/metaware/src/tx_thread_system_return.s b/ports/arc_hs/metaware/src/tx_thread_system_return.s
index aec09bb4..453682e4 100644
--- a/ports/arc_hs/metaware/src/tx_thread_system_return.s
+++ b/ports/arc_hs/metaware/src/tx_thread_system_return.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
@@ -54,18 +54,6 @@
;/* */
;/* ThreadX components */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 Andres Mlinar Modified comments, */
-;/* use schedule reenter, */
-;/* resulting in version 6.1.9 */
-;/* 03-08-2023 Cindy Deng Modified comment(s), added */
-;/* #include tx_user.h, */
-;/* resulting in version 6.2.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
;{
@@ -87,7 +75,7 @@ _tx_thread_system_return:
mov r4, 2 ; Build solicited hardward stack frame type
st r4, [sp, 0] ; Set stack frame type
st r3, [sp, 4] ; Save status32
- st r2, [sp, 8] ; Save interrupt posture
+ st r2, [sp, 8] ; Save interrupt posture
st sp, [r0, 8] ; Save thread's stack pointer
bclr r3, r3, 16 ; Build register bank 0 value
bclr r3, r3, 17 ;
@@ -120,7 +108,7 @@ __tx_software_context:
st r30, [sp, 72] ; Save r30
st sp, [r0, 8] ; Save thread's stack pointer
__tx_save_done:
-;
+;
.ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
;
; /* Call the thread exit function to indicate the thread is no longer executing. */
diff --git a/ports/arc_hs/metaware/src/tx_timer_interrupt.s b/ports/arc_hs/metaware/src/tx_timer_interrupt.s
index 59410fdc..6f6aa521 100644
--- a/ports/arc_hs/metaware/src/tx_timer_interrupt.s
+++ b/ports/arc_hs/metaware/src/tx_timer_interrupt.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
@@ -58,23 +58,6 @@
;/* */
;/* interrupt vector */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 12-31-2020 Scott Larson Modified comment(s), remove */
-;/* unneeded load of */
-;/* _tx_thread_preempt_disable, */
-;/* resulting in version 6.1.3 */
-;/* 10-15-2021 Yuxin Zhou Modified comment(s), and */
-;/* fixed possible race */
-;/* condition on preemption */
-;/* resulting in version 6.1.9 */
-;/* 03-08-2023 Cindy Deng Modified comment(s), added */
-;/* #include tx_user.h, */
-;/* resulting in version 6.2.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
;{
diff --git a/ports/arm11/ac5/example_build/sample_threadx.c b/ports/arm11/ac5/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/arm11/ac5/example_build/sample_threadx.c
+++ b/ports/arm11/ac5/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/arm11/ac5/example_build/tx_initialize_low_level.s b/ports/arm11/ac5/example_build/tx_initialize_low_level.s
index 541ddb1e..3badfc20 100644
--- a/ports/arm11/ac5/example_build/tx_initialize_low_level.s
+++ b/ports/arm11/ac5/example_build/tx_initialize_low_level.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -41,7 +41,7 @@ SYS_STACK_SIZE EQU 1024 ; SYS stack size (used for neste
IRQ_STACK_SIZE EQU 1024 ; IRQ stack size
;
;
-;/* ARM11 ARMulator Timer and Interrupt controller information. This depends on
+;/* ARM11 ARMulator Timer and Interrupt controller information. This depends on
; the ARMulator's Interrupt Controller and Timer being enabled in the default.ami.
; In addition, the addresses must match those specified in the peripherals.ami file.
; Please refer to section 2.10 and 4.16 of the Debug Target Guide, version 1.2. */
@@ -50,7 +50,7 @@ IRQStatus EQU 0x0a000000 ; IRQ Status Register
IRQRawStatus EQU 0x0a000004 ; IRQ Raw Status Register
IRQEnable EQU 0x0a000008 ; IRQ Enable Set Register
IRQEnableClear EQU 0x0a00000C ; IRQ Enable Clear Register
-IRQSoft EQU 0x0a000010 ; IRQ Soft
+IRQSoft EQU 0x0a000010 ; IRQ Soft
FIQStatus EQU 0x0a000100 ; FIQ Status Register
FIQRawStatus EQU 0x0a000104 ; FIQ Raw Status Register
FIQEnable EQU 0x0a000108 ; FIQ Enable Set Register
@@ -113,45 +113,39 @@ __vectors
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level ARM11/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level ARM11/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -202,7 +196,7 @@ _tx_initialize_low_level
; _tx_thread_system_stack_ptr = (VOID_PTR) (sp);
;
LDR r1, =_tx_thread_system_stack_ptr ; Pickup address of system stack ptr
- LDR r0, [r1, #0] ; Pickup system stack
+ LDR r0, [r1, #0] ; Pickup system stack
ADD r0, r0, #4 ; Increment to next free word
;
; /* Save the first available memory address. */
@@ -238,7 +232,7 @@ _tx_initialize_low_level
;
;
;/* Define initial heap/stack routine for the ARM RealView (and ADS) startup code. This
-; routine will set the initial stack to use the ThreadX IRQ & FIQ &
+; routine will set the initial stack to use the ThreadX IRQ & FIQ &
; (optionally SYS) stack areas. */
;
EXPORT __user_initial_stackheap
@@ -290,7 +284,7 @@ __tx_reserved_handler
;
;
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -298,34 +292,34 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
; /* Check for Timer1 interrupts on the ARMulator. */
LDR r1,=IRQStatus ; Pickup address of IRQStatus register
- LDR r2, [r1] ; Read IRQStatus
+ LDR r2, [r1] ; Read IRQStatus
LDR r0,=TIMER1_BIT ; Pickup Timer1 interrupt present bit
AND r2, r2, r0 ; Is this a timer interrupt?
- CMP r2, r0 ;
+ CMP r2, r0 ;
BNE _tx_not_timer_interrupt ; If 0, not a timer interrupt
LDR r1,=Timer1Clear ; Build address of Timer1 clear register
- MOV r0,#0 ;
+ MOV r0,#0 ;
STR r0, [r1] ; Clear timer 0 interrupt
BL _tx_timer_interrupt ; Timer interrupt handler
_tx_not_timer_interrupt
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -335,7 +329,7 @@ _tx_not_timer_interrupt
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -351,28 +345,28 @@ _tx_not_timer_interrupt
__tx_example_vectored_irq_handler
;
;
-; /* Save initial context and call context save to prepare for
+; /* Save initial context and call context save to prepare for
; vectored ISR execution. */
;
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
; BL _tx_thread_vectored_context_save ; Vectored context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -381,7 +375,7 @@ __tx_example_vectored_irq_handler
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
@@ -403,11 +397,11 @@ __tx_fiq_processing_return
; /* At this point execution is still in the FIQ mode. The CPSR, point of
; interrupt, and all C scratch registers are available for use. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
; from FIQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with FIQ interrupts enabled.
+; system mode and returns with FIQ interrupts enabled.
;
-; NOTE: It is very important to ensure all FIQ interrupts are cleared
+; NOTE: It is very important to ensure all FIQ interrupts are cleared
; prior to enabling nested FIQ interrupts. */
IF :DEF:TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/arm11/ac5/inc/tx_port.h b/ports/arm11/ac5/inc/tx_port.h
index 9b36bf61..b1bf6e36 100644
--- a/ports/arm11/ac5/inc/tx_port.h
+++ b/ports/arm11/ac5/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h ARM11/AC5 */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h ARM11/AC5 */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -75,7 +67,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -111,12 +103,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -126,8 +118,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -174,7 +166,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -186,13 +178,13 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
-#define TX_THREAD_EXTENSION_2
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -206,11 +198,11 @@ typedef unsigned short USHORT;
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -218,8 +210,8 @@ typedef unsigned short USHORT;
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -246,21 +238,21 @@ typedef unsigned short USHORT;
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef __thumb
-
+
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (ULONG) __clz((unsigned int) m); \
- b = 31 - b;
+ b = 31 - b;
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -280,7 +272,7 @@ typedef unsigned short USHORT;
{ \
__enable_irq(); \
__enable_fiq(); \
- }
+ }
#else
@@ -289,7 +281,7 @@ typedef unsigned short USHORT;
#define TX_RESTORE if (!interrupt_save_disabled) \
{ \
__enable_irq(); \
- }
+ }
#endif
#else
@@ -318,8 +310,8 @@ unsigned int _tx_thread_interrupt_restore(UINT old_posture);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARM11/AC5 Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM11/AC5 Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/arm11/ac5/readme_threadx.txt b/ports/arm11/ac5/readme_threadx.txt
index 82a9dfa2..a89d79b5 100644
--- a/ports/arm11/ac5/readme_threadx.txt
+++ b/ports/arm11/ac5/readme_threadx.txt
@@ -6,15 +6,15 @@
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the ARM
-AC5 development environment. At this point you may run the build_threadx.bat
-batch file. This will build the ThreadX run-time environment in the
-"example_build" directory.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the ARM
+AC5 development environment. At this point you may run the build_threadx.bat
+batch file. This will build the ThreadX run-time environment in the
+"example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
@@ -24,39 +24,39 @@ Since there is no ARM11 FVP, there are no instructions here for running
the demonstration; users are expected to run the demonstration on their
platform of choice.
-Building the demonstration is easy; simply execute the build_threadx_sample.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_sample.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.axf
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.axf
is a binary file that can be downloaded and executed on the user's platform of choice.
3. System Initialization
-The entry point in ThreadX for the Cortex-A5 using AC5 tools is at label
+The entry point in ThreadX for the Cortex-A5 using AC5 tools is at label
__main. This is defined within the AC5 compiler's startup code. In addition,
this is where all static and global pre-set C variable initialization processing
takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source. By default, the vector area is defined to be located in the Init area,
-which is defined at the top of tx_initialize_low_level.s. This area is typically
-located at 0. In situations where this is impossible, the vectors at the beginning
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source. By default, the vector area is defined to be located in the Init area,
+which is defined at the top of tx_initialize_low_level.s. This area is typically
+located at 0. In situations where this is impossible, the vectors at the beginning
of the Init area should be copied to address 0.
This is also where initialization of a periodic timer interrupt source
should take place.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
4. Assembler / Compiler Switches
-The following are compiler switches used in building the demonstration
+The following are compiler switches used in building the demonstration
system:
Compiler Switch Meaning
@@ -72,10 +72,10 @@ Linker Switch Meaning
-o demo.axf Specifies demo output file name
--elf Specifies elf output file format
--ro Specifies that Read-Only memory starts at address 0
- --first tx_initialize_low_level.o(Init)
+ --first tx_initialize_low_level.o(Init)
Specifies that the first area loaded is Init
--remove Remove unused areas
- --list Specifies map file name
+ --list Specifies map file name
--symbols Specifies symbols for map file
--map Creates a map file
@@ -86,161 +86,161 @@ Application Defines
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
--PD "TX_ENABLE_IRQ_NESTING SETL {TRUE}" This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s.
--PD "TX_ENABLE_FIQ_NESTING SETL {TRUE}" This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s. In addition,
IRQ nesting should also be enabled.
-DTX_ENABLE_FIQ_SUPPORT This compiler define enables FIQ
interrupt handling in the ThreadX
- generic C source. This define
+ generic C source. This define
should also be used in conjunction
with the corresponding assembler
- define.
+ define.
-DTX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- -DTX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ -DTX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- -DTX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ -DTX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- -DTX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ -DTX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- -DTX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ -DTX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- -DTX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ -DTX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- -DTX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ -DTX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- -DTX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ -DTX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- -DTX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ -DTX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- -DTX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ -DTX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- -DTX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ -DTX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- -DTX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ -DTX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- -DTX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ -DTX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- -DTX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ -DTX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- -DTX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ -DTX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- -DTX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ -DTX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- -DTX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ -DTX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- -DTX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ -DTX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- -DTX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ -DTX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- -DTX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ -DTX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
-DTX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- -DTX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ -DTX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- -DTX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ -DTX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
5. Register Usage and Stack Frames
-The AC5 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The AC5 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -258,39 +258,39 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
-performance. To make it run faster, you can change the build_threadx.bat file to
-remove the -g option and enable all compiler optimizations.
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
+performance. To make it run faster, you can change the build_threadx.bat file to
+remove the -g option and enable all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A5
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A5 vectors start at address zero. The demonstration system startup
-Init area contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+Init area contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -301,12 +301,12 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -314,7 +314,7 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -327,7 +327,7 @@ __tx_irq_processing_return
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.s:
EXPORT __tx_irq_example_handler
@@ -337,12 +337,12 @@ __tx_irq_example_handler
STMDB sp!, {r0-r3} ; Save some scratch registers
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
BL _tx_thread_vectored_context_save ; Call the vectored IRQ context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -359,22 +359,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested IRQ interrupts are no longer required,
calling the _tx_thread_irq_nesting_end service disables nesting by disabling
-IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
+IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -382,10 +382,10 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* Enable nested IRQ interrupts. NOTE: Since this service returns
-; with IRQ interrupts enabled, all IRQ interrupt sources must be
+; with IRQ interrupts enabled, all IRQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-;
+;
; /* Application ISR call(s) go here! */
;
; /* Disable nested IRQ interrupts. The mode is switched back to
@@ -398,12 +398,12 @@ __tx_irq_processing_return
7.3 FIQ Interrupts
-By default, Cortex-A5 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, Cortex-A5 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -412,7 +412,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.s.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.s:
@@ -440,18 +440,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -467,7 +467,7 @@ __tx_fiq_processing_return
; interrupt, and all C scratch registers are available for use. */
;
; /* Enable nested FIQ interrupts. NOTE: Since this service returns
-; with FIQ interrupts enabled, all FIQ interrupt sources must be
+; with FIQ interrupts enabled, all FIQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
;
@@ -483,28 +483,28 @@ __tx_fiq_processing_return
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.s in the Integrator sub-directories.
9. Thumb/Cortex-A5 Mixed Mode
-By default, ThreadX is setup for running in Cortex-A5 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
-ThreadX file and/or the application in Thumb mode. If any Thumb code
-is used the entire ThreadX source- both C and assembly - should be built
+By default, ThreadX is setup for running in Cortex-A5 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
+ThreadX file and/or the application in Thumb mode. If any Thumb code
+is used the entire ThreadX source- both C and assembly - should be built
with the "-apcs /interwork" option.
11. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/arm11/ac5/src/tx_thread_context_restore.s b/ports/arm11/ac5/src/tx_thread_context_restore.s
index e9dbf9e0..d7bce36c 100644
--- a/ports/arm11/ac5/src/tx_thread_context_restore.s
+++ b/ports/arm11/ac5/src/tx_thread_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -37,7 +37,7 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
THUMB_MASK EQU 0x20 ; Thumb bit mask
SVC_MODE_BITS EQU 0x13 ; SVC mode value
;
@@ -55,44 +55,38 @@ SVC_MODE_BITS EQU 0x13 ; SVC mode value
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore ARM11/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore ARM11/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -120,13 +114,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3, #0] ; Store the counter
+ STR r2, [r3, #0] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
diff --git a/ports/arm11/ac5/src/tx_thread_context_save.s b/ports/arm11/ac5/src/tx_thread_context_save.s
index 8c92eeb1..aa99af37 100644
--- a/ports/arm11/ac5/src/tx_thread_context_save.s
+++ b/ports/arm11/ac5/src/tx_thread_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -45,43 +45,37 @@ DISABLE_INTS EQU 0x80 ; IRQ interrupts disabled
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save ARM11/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save ARM11/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
@@ -96,7 +90,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
IF :DEF:TX_ENABLE_FIQ_SUPPORT
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt CPSR
@@ -116,7 +110,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -132,7 +126,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -146,13 +140,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -172,7 +166,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -182,7 +176,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -197,7 +191,7 @@ __tx_thread_idle_system_save
ENDIF
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports/arm11/ac5/src/tx_thread_fiq_context_restore.s b/ports/arm11/ac5/src/tx_thread_fiq_context_restore.s
index af516975..41fc0eac 100644
--- a/ports/arm11/ac5/src/tx_thread_fiq_context_restore.s
+++ b/ports/arm11/ac5/src/tx_thread_fiq_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -37,7 +37,7 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
THUMB_MASK EQU 0x20 ; Thumb bit mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
SVC_MODE_BITS EQU 0x13 ; SVC mode value
@@ -57,44 +57,38 @@ SVC_MODE_BITS EQU 0x13 ; SVC mode value
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_restore ARM11/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_restore ARM11/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the fiq interrupt context when processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* FIQ ISR Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the fiq interrupt context when processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* FIQ ISR Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_context_restore(VOID)
@@ -122,13 +116,13 @@ _tx_thread_fiq_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -172,7 +166,7 @@ __tx_thread_fiq_no_preempt_restore
; /* Restore interrupted thread or ISR. */
;
; /* Pickup the saved stack pointer. */
-; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
+; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
;
; /* Recover the saved context and return to the point of interrupt. */
;
@@ -219,7 +213,7 @@ __tx_thread_fiq_preempt_restore
BEQ __tx_thread_fiq_dont_save_ts ; No, don't save it
;
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-; _tx_timer_time_slice = 0;
+; _tx_timer_time_slice = 0;
;
STR r2, [r0, #24] ; Save thread's time-slice
MOV r2, #0 ; Clear value
diff --git a/ports/arm11/ac5/src/tx_thread_fiq_context_save.s b/ports/arm11/ac5/src/tx_thread_fiq_context_save.s
index 72bebd9d..7aa2c832 100644
--- a/ports/arm11/ac5/src/tx_thread_fiq_context_save.s
+++ b/ports/arm11/ac5/src/tx_thread_fiq_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -39,43 +39,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_save ARM11/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_save ARM11/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
; VOID _tx_thread_fiq_context_save(VOID)
@@ -90,7 +84,7 @@ _tx_thread_fiq_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -105,7 +99,7 @@ _tx_thread_fiq_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -121,38 +115,38 @@ _tx_thread_fiq_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
__tx_thread_fiq_not_nested_save
-; }
+; }
;
; /* Otherwise, not nested, check to see if a thread was running. */
; else if (_tx_thread_current_ptr)
-; {
+; {
;
ADD r2, r2, #1 ; Increment the interrupt counter
STR r2, [r3] ; Store it back in the variable
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
-; ; scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
+; ; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, lr} ; Store other registers, Note that we don't
-; ; need to save sl and ip since FIQ has
-; ; copies of these registers. Nested
+; ; need to save sl and ip since FIQ has
+; ; copies of these registers. Nested
; ; interrupt processing does need to save
; ; these registers.
;
; /* Save the current stack pointer in the thread's control block. */
-; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
;
; /* Switch to the system stack. */
-; sp = _tx_thread_system_stack_ptr;
+; sp = _tx_thread_system_stack_ptr;
;
MOV r10, #0 ; Clear stack limit
@@ -165,7 +159,7 @@ __tx_thread_fiq_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
; else
@@ -185,18 +179,18 @@ __tx_thread_fiq_idle_system_save
ENDIF
;
; /* Not much to do here, save the current SPSR and LR for possible
-; use in IRQ interrupted in idle system conditions, and return to
+; use in IRQ interrupted in idle system conditions, and return to
; FIQ interrupt processing. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, lr} ; Store other registers that will get used
-; ; or stripped off the stack in context
-; ; restore
- B __tx_fiq_processing_return ; Continue FIQ processing
+; ; or stripped off the stack in context
+; ; restore
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
-;}
+;}
;
END
diff --git a/ports/arm11/ac5/src/tx_thread_fiq_nesting_end.s b/ports/arm11/ac5/src/tx_thread_fiq_nesting_end.s
index 66b82422..69faffe0 100644
--- a/ports/arm11/ac5/src/tx_thread_fiq_nesting_end.s
+++ b/ports/arm11/ac5/src/tx_thread_fiq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
FIQ_MODE_BITS EQU 0x11 ; FIQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_end ARM11/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_end ARM11/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-;/* processing from system mode back to FIQ mode prior to the ISR */
-;/* calling _tx_thread_fiq_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+;/* processing from system mode back to FIQ mode prior to the ISR */
+;/* calling _tx_thread_fiq_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_fiq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_cxsf, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #FIQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/arm11/ac5/src/tx_thread_fiq_nesting_start.s b/ports/arm11/ac5/src/tx_thread_fiq_nesting_start.s
index fd36e17f..2bbd33e8 100644
--- a/ports/arm11/ac5/src/tx_thread_fiq_nesting_start.s
+++ b/ports/arm11/ac5/src/tx_thread_fiq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_start ARM11/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_start ARM11/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-;/* processing to the system mode so nested FIQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+;/* processing to the system mode so nested FIQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/arm11/ac5/src/tx_thread_interrupt_control.s b/ports/arm11/ac5/src/tx_thread_interrupt_control.s
index 7d3bddae..e51c993d 100644
--- a/ports/arm11/ac5/src/tx_thread_interrupt_control.s
+++ b/ports/arm11/ac5/src/tx_thread_interrupt_control.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,42 +36,36 @@ INT_MASK EQU 0x80 ; Interrupt bit mask
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control ARM11/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control ARM11/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/arm11/ac5/src/tx_thread_interrupt_disable.s b/ports/arm11/ac5/src/tx_thread_interrupt_disable.s
index e2c50cfd..6224b590 100644
--- a/ports/arm11/ac5/src/tx_thread_interrupt_disable.s
+++ b/ports/arm11/ac5/src/tx_thread_interrupt_disable.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,41 +36,35 @@ DISABLE_INTS EQU 0x80 ; IRQ interrupts disabled
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable ARM11/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable ARM11/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(void)
diff --git a/ports/arm11/ac5/src/tx_thread_interrupt_restore.s b/ports/arm11/ac5/src/tx_thread_interrupt_restore.s
index ad7fb5d2..a35c0621 100644
--- a/ports/arm11/ac5/src/tx_thread_interrupt_restore.s
+++ b/ports/arm11/ac5/src/tx_thread_interrupt_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -29,42 +29,36 @@
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore ARM11/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore ARM11/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function is responsible for restoring interrupts to the state */
;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/arm11/ac5/src/tx_thread_irq_nesting_end.s b/ports/arm11/ac5/src/tx_thread_irq_nesting_end.s
index a8ee12ad..83e93891 100644
--- a/ports/arm11/ac5/src/tx_thread_irq_nesting_end.s
+++ b/ports/arm11/ac5/src/tx_thread_irq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end ARM11/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end ARM11/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_irq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_cxsf, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #IRQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/arm11/ac5/src/tx_thread_irq_nesting_start.s b/ports/arm11/ac5/src/tx_thread_irq_nesting_start.s
index aea8bbf4..d658bf1c 100644
--- a/ports/arm11/ac5/src/tx_thread_irq_nesting_start.s
+++ b/ports/arm11/ac5/src/tx_thread_irq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start ARM11/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start ARM11/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/arm11/ac5/src/tx_thread_schedule.s b/ports/arm11/ac5/src/tx_thread_schedule.s
index 17646482..b8bc01e6 100644
--- a/ports/arm11/ac5/src/tx_thread_schedule.s
+++ b/ports/arm11/ac5/src/tx_thread_schedule.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -47,45 +47,39 @@ ENABLE_INTS EQU 0x80 ; IRQ Interrupts enabled mask
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule ARM11/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule ARM11/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
@@ -112,7 +106,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -121,7 +115,7 @@ __tx_thread_schedule_loop
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
;
- LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
STR r0, [r1, #0] ; Setup current thread pointer
;
; /* Increment the run count for this thread. */
@@ -135,7 +129,7 @@ __tx_thread_schedule_loop
; /* Setup time-slice, if present. */
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
;
- LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
+ LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
; variable
LDR sp, [r0, #8] ; Switch stack pointers
STR r3, [r2, #0] ; Setup time-slice
diff --git a/ports/arm11/ac5/src/tx_thread_stack_build.s b/ports/arm11/ac5/src/tx_thread_stack_build.s
index 83821335..64482069 100644
--- a/ports/arm11/ac5/src/tx_thread_stack_build.s
+++ b/ports/arm11/ac5/src/tx_thread_stack_build.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -38,44 +38,38 @@ CPSR_MASK EQU 0x9F ; Mask initial CPSR, IRQ ints en
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build ARM11/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build ARM11/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function builds a stack frame on the supplied thread's stack. */
;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
;/* thread_ptr Pointer to thread control blk */
;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -83,10 +77,10 @@ CPSR_MASK EQU 0x9F ; Mask initial CPSR, IRQ ints en
EXPORT _tx_thread_stack_build
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the ARM11 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports/arm11/ac5/src/tx_thread_system_return.s b/ports/arm11/ac5/src/tx_thread_system_return.s
index 82a1e0c4..37ce7066 100644
--- a/ports/arm11/ac5/src/tx_thread_system_return.s
+++ b/ports/arm11/ac5/src/tx_thread_system_return.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -40,50 +40,44 @@ DISABLE_INTS EQU 0x80 ; IRQ interrupts disabled
IMPORT _tx_timer_time_slice
IMPORT _tx_thread_schedule
IF :DEF:TX_ENABLE_EXECUTION_CHANGE_NOTIFY
- IMPORT _tx_execution_thread_exit
+ IMPORT _tx_execution_thread_exit
ENDIF
;
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return ARM11/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return ARM11/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
@@ -96,12 +90,12 @@ _tx_thread_system_return
MOV r0, #0 ; Build a solicited stack type
MRS r1, CPSR ; Pickup the CPSR
STMDB sp!, {r0-r1, r4-r11, lr} ; Save minimal context
-;
+;
; /* Lockout interrupts. */
;
ORR r2, r1, #DISABLE_INTS ; Build disable interrupt CPSR
MSR CPSR_cxsf, r2 ; Disable interrupts
-
+
IF :DEF:TX_ENABLE_EXECUTION_CHANGE_NOTIFY
;
; /* Call the thread exit function to indicate the thread is no longer executing. */
diff --git a/ports/arm11/ac5/src/tx_thread_vectored_context_save.s b/ports/arm11/ac5/src/tx_thread_vectored_context_save.s
index e9ae138a..ca013608 100644
--- a/ports/arm11/ac5/src/tx_thread_vectored_context_save.s
+++ b/ports/arm11/ac5/src/tx_thread_vectored_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -45,43 +45,37 @@ DISABLE_INTS EQU 0x80 ; IRQ interrupts disabled
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save ARM11/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save ARM11/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_vectored_context_save(VOID)
@@ -144,7 +138,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -180,7 +174,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports/arm11/ac5/src/tx_timer_interrupt.s b/ports/arm11/ac5/src/tx_timer_interrupt.s
index 9d745e0a..c5b7ee10 100644
--- a/ports/arm11/ac5/src/tx_timer_interrupt.s
+++ b/ports/arm11/ac5/src/tx_timer_interrupt.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Timer */
;/** */
@@ -44,46 +44,40 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt ARM11/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt ARM11/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -107,7 +101,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -225,13 +219,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports/arm11/gnu/example_build/crt0.S b/ports/arm11/gnu/example_build/crt0.S
index aa0f3239..56b6c958 100644
--- a/ports/arm11/gnu/example_build/crt0.S
+++ b/ports/arm11/gnu/example_build/crt0.S
@@ -26,13 +26,13 @@ _mainCRTStartup:
mov a2, #0 /* Second arg: fill value */
mov fp, a2 /* Null frame pointer */
mov r7, a2 /* Null frame pointer for Thumb */
-
- ldr a1, .LC1 /* First arg: start of memory block */
- ldr a3, .LC2
- sub a3, a3, a1 /* Third arg: length of block */
-
-
+ ldr a1, .LC1 /* First arg: start of memory block */
+ ldr a3, .LC2
+ sub a3, a3, a1 /* Third arg: length of block */
+
+
+
bl memset
mov r0, #0 /* no arguments */
mov r1, #0 /* no argv either */
@@ -48,15 +48,15 @@ _mainCRTStartup:
/* bl init */
mov r0, r4
mov r1, r5
-#endif
+#endif
bl main
bl exit /* Should not return. */
-
- /* For Thumb, constants must be after the code since only
+
+ /* For Thumb, constants must be after the code since only
positive offsets are supported for PC relative addresses. */
-
+
.align 0
.LC0:
.LC1:
diff --git a/ports/arm11/gnu/example_build/reset.S b/ports/arm11/gnu/example_build/reset.S
index a11c826a..5d05258b 100644
--- a/ports/arm11/gnu/example_build/reset.S
+++ b/ports/arm11/gnu/example_build/reset.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Initialize */
@/** */
@@ -65,11 +65,11 @@ SWI:
.word __tx_swi_interrupt @ Software interrupt handler
PREFETCH:
.word __tx_prefetch_handler @ Prefetch exception handler
-ABORT:
+ABORT:
.word __tx_abort_handler @ Abort exception handler
-RESERVED:
+RESERVED:
.word __tx_reserved_handler @ Reserved exception handler
-IRQ:
+IRQ:
.word __tx_irq_handler @ IRQ interrupt handler
FIQ:
.word __tx_fiq_handler @ FIQ interrupt handler
diff --git a/ports/arm11/gnu/example_build/sample_threadx.c b/ports/arm11/gnu/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/arm11/gnu/example_build/sample_threadx.c
+++ b/ports/arm11/gnu/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/arm11/gnu/example_build/sample_threadx.ld b/ports/arm11/gnu/example_build/sample_threadx.ld
index 3dea4e1c..e940b2b8 100644
--- a/ports/arm11/gnu/example_build/sample_threadx.ld
+++ b/ports/arm11/gnu/example_build/sample_threadx.ld
@@ -7,7 +7,7 @@ OUTPUT_ARCH(arm)
SECTIONS
{
. = 0x00000000;
-
+
.vectors : {reset.o(.text) }
/* Read-only sections, merged into text segment: */
@@ -94,8 +94,8 @@ SECTIONS
*(.gnu.linkonce.t*)
*(.glue_7t) *(.glue_7)
} =0
- .init :
- {
+ .init :
+ {
KEEP (*(.init))
} =0
_etext = .;
@@ -120,7 +120,7 @@ SECTIONS
.data1 : { *(.data1) }
.eh_frame : { KEEP (*(.eh_frame)) }
.gcc_except_table : { *(.gcc_except_table) }
- .ctors :
+ .ctors :
{
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
@@ -153,9 +153,9 @@ SECTIONS
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata :
+ .sdata :
{
- *(.sdata)
+ *(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
}
@@ -191,7 +191,7 @@ SECTIONS
_stack_bottom = ABSOLUTE(.) ;
- /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
+ /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
SYS stack if nested interrupts are enabled. */
. = ALIGN(8) ;
. += 4096 ;
diff --git a/ports/arm11/gnu/example_build/tx_initialize_low_level.S b/ports/arm11/gnu/example_build/tx_initialize_low_level.S
index f7c4617a..887ae4e0 100644
--- a/ports/arm11/gnu/example_build/tx_initialize_low_level.S
+++ b/ports/arm11/gnu/example_build/tx_initialize_low_level.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Initialize */
@/** */
@@ -62,7 +62,7 @@ SYS_STACK_SIZE = 1024 @ System stack size
.type $_tx_initialize_low_level,function
$_tx_initialize_low_level:
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_initialize_low_level @ Call _tx_initialize_low_level function
@@ -72,45 +72,39 @@ $_tx_initialize_low_level:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_initialize_low_level ARM11/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_initialize_low_level ARM11/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is responsible for any low-level processor */
-@/* initialization, including setting up interrupt vectors, setting */
-@/* up a periodic timer interrupt source, saving the system stack */
-@/* pointer for use in ISR processing later, and finding the first */
-@/* available RAM memory address for tx_application_define. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* _tx_initialize_kernel_enter ThreadX entry function */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is responsible for any low-level processor */
+@/* initialization, including setting up interrupt vectors, setting */
+@/* up a periodic timer interrupt source, saving the system stack */
+@/* pointer for use in ISR processing later, and finding the first */
+@/* available RAM memory address for tx_application_define. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* _tx_initialize_kernel_enter ThreadX entry function */
@/* */
@/**************************************************************************/
@VOID _tx_initialize_low_level(VOID)
@@ -125,7 +119,7 @@ _tx_initialize_low_level:
@
LDR r1, =_sp @ Get pointer to stack area
-#ifdef TX_ENABLE_IRQ_NESTING
+#ifdef TX_ENABLE_IRQ_NESTING
@
@ /* Setup the system mode stack for nested interrupt support */
@
@@ -156,7 +150,7 @@ _tx_initialize_low_level:
MSR CPSR, r0 @ Enter SVC mode
LDR r2, =_stack_bottom @ Pickup stack bottom
CMP r3, r2 @ Compare the current stack end with the bottom
-_stack_error_loop:
+_stack_error_loop:
BLT _stack_error_loop @ If the IRQ stack exceeds the stack bottom, just sit here!
@
@ /* Save the system stack pointer. */
@@ -208,7 +202,7 @@ __tx_reserved_handler:
B __tx_reserved_handler @ Reserved exception handler
@
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -216,17 +210,17 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. In
+@ interrupt, and all C scratch registers are available for use. In
@ addition, IRQ interrupts may be re-enabled - with certain restrictions -
@ if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-@ small code sequences where lr is saved before enabling interrupts and
+@ small code sequences where lr is saved before enabling interrupts and
@ restored after interrupts are again disabled. */
@
-@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
@ from IRQ mode with interrupts disabled. This routine switches to the
-@ system mode and returns with IRQ interrupts enabled.
-@
-@ NOTE: It is very important to ensure all IRQ interrupts are cleared
+@ system mode and returns with IRQ interrupts enabled.
+@
+@ NOTE: It is very important to ensure all IRQ interrupts are cleared
@ prior to enabling nested IRQ interrupts. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -240,7 +234,7 @@ __tx_irq_processing_return:
@
@
@ /* If interrupt nesting was started earlier, the end of interrupt nesting
-@ service must be called before returning to _tx_thread_context_restore.
+@ service must be called before returning to _tx_thread_context_restore.
@ This routine returns in processing in IRQ mode with interrupts disabled. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -256,28 +250,28 @@ __tx_irq_processing_return:
@__tx_example_vectored_irq_handler:
@
@
-@ /* Save initial context and call context save to prepare for
+@ /* Save initial context and call context save to prepare for
@ vectored ISR execution. */
@
@ STMDB sp!, {r0-r3} @ Save some scratch registers
@ MRS r0, SPSR @ Pickup saved SPSR
-@ SUB lr, lr, #4 @ Adjust point of interrupt
+@ SUB lr, lr, #4 @ Adjust point of interrupt
@ STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
@ BL _tx_thread_vectored_context_save @ Vectored context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. In
+@ interrupt, and all C scratch registers are available for use. In
@ addition, IRQ interrupts may be re-enabled - with certain restrictions -
@ if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-@ small code sequences where lr is saved before enabling interrupts and
+@ small code sequences where lr is saved before enabling interrupts and
@ restored after interrupts are again disabled. */
@
@
-@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
@ from IRQ mode with interrupts disabled. This routine switches to the
-@ system mode and returns with IRQ interrupts enabled.
-@
-@ NOTE: It is very important to ensure all IRQ interrupts are cleared
+@ system mode and returns with IRQ interrupts enabled.
+@
+@ NOTE: It is very important to ensure all IRQ interrupts are cleared
@ prior to enabling nested IRQ interrupts. */
@#ifdef TX_ENABLE_IRQ_NESTING
@ BL _tx_thread_irq_nesting_start
@@ -286,7 +280,7 @@ __tx_irq_processing_return:
@ /* Application IRQ handlers can be called here! */
@
@ /* If interrupt nesting was started earlier, the end of interrupt nesting
-@ service must be called before returning to _tx_thread_context_restore.
+@ service must be called before returning to _tx_thread_context_restore.
@ This routine returns in processing in IRQ mode with interrupts disabled. */
@#ifdef TX_ENABLE_IRQ_NESTING
@ BL _tx_thread_irq_nesting_end
@@ -308,11 +302,11 @@ __tx_fiq_processing_return:
@ /* At this point execution is still in the FIQ mode. The CPSR, point of
@ interrupt, and all C scratch registers are available for use. */
@
-@ /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+@ /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
@ from FIQ mode with interrupts disabled. This routine switches to the
-@ system mode and returns with FIQ interrupts enabled.
+@ system mode and returns with FIQ interrupts enabled.
@
-@ NOTE: It is very important to ensure all FIQ interrupts are cleared
+@ NOTE: It is very important to ensure all FIQ interrupts are cleared
@ prior to enabling nested FIQ interrupts. */
#ifdef TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/arm11/gnu/inc/tx_port.h b/ports/arm11/gnu/inc/tx_port.h
index 23c3e66c..259ad092 100644
--- a/ports/arm11/gnu/inc/tx_port.h
+++ b/ports/arm11/gnu/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h ARM11/GNU */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h ARM11/GNU */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -75,7 +67,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -111,12 +103,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -126,8 +118,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -174,7 +166,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -186,13 +178,13 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
-#define TX_THREAD_EXTENSION_2
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -206,11 +198,11 @@ typedef unsigned short USHORT;
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -218,8 +210,8 @@ typedef unsigned short USHORT;
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -246,24 +238,24 @@ typedef unsigned short USHORT;
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
-
+
#if __TARGET_ARCH_ARM > 4
#ifndef __thumb__
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
asm volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) ); \
- b = 31 - b;
+ b = 31 - b;
#endif
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -307,8 +299,8 @@ unsigned int _tx_thread_interrupt_restore(UINT old_posture);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARM11/GNU Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM11/GNU Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/arm11/gnu/readme_threadx.txt b/ports/arm11/gnu/readme_threadx.txt
index d7300854..92a7c16d 100644
--- a/ports/arm11/gnu/readme_threadx.txt
+++ b/ports/arm11/gnu/readme_threadx.txt
@@ -1,55 +1,55 @@
- Microsoft's Azure RTOS ThreadX for ARM11
+ Microsoft's Azure RTOS ThreadX for ARM11
Using the GNU Tools
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the GNU
-development environment.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the GNU
+development environment.
-At this point you may run the build_threadx.bat batch file. This will build the
-ThreadX run-time environment in the "example_build" directory.
+At this point you may run the build_threadx.bat batch file. This will build the
+ThreadX run-time environment in the "example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
2. Demonstration System
-Building the demonstration is easy; simply execute the build_threadx_sample.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_sample.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with TX.A. The resulting file DEMO is a binary file
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with TX.A. The resulting file DEMO is a binary file
that can be downloaded and executed.
3. System Initialization
-The entry point in ThreadX for the ARM11 using GNU tools is at label _start.
+The entry point in ThreadX for the ARM11 using GNU tools is at label _start.
This is defined within the modified version of the GNU startup code - crt0.S.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up various
-system data structures, the interrupt vectors, and a periodic timer interrupt source.
-By default, the vector area is defined to be located at the "__vectors" label,
-which is defined in reset.S. This area is typically located at 0. In situations
-where this is impossible, the vectors at the "__vectors" label should be copied
+The ThreadX tx_initialize_low_level.S file is responsible for setting up various
+system data structures, the interrupt vectors, and a periodic timer interrupt source.
+By default, the vector area is defined to be located at the "__vectors" label,
+which is defined in reset.S. This area is typically located at 0. In situations
+where this is impossible, the vectors at the "__vectors" label should be copied
to address 0.
-This is also where initialization of a periodic timer interrupt source should take
+This is also where initialization of a periodic timer interrupt source should take
place.
-In addition, _tx_initialize_low_level defines the first available address
-for use by the application, which is supplied as the sole input parameter
+In addition, _tx_initialize_low_level defines the first available address
+for use by the application, which is supplied as the sole input parameter
to your application definition function, tx_application_define.
4. Assembler / Compiler Switches
-The following are compiler switches used in building the demonstration
+The following are compiler switches used in building the demonstration
system:
Compiler/Assembler Meaning
@@ -73,164 +73,164 @@ Application Defines ( -D option)
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S.
TX_ENABLE_FIQ_NESTING This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S. In addition,
IRQ nesting should also be enabled.
TX_ENABLE_FIQ_SUPPORT This compiler define enables FIQ
interrupt handling in the ThreadX
- generic C source. This define
+ generic C source. This define
should also be used in conjunction
with the corresponding assembler
- define.
+ define.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
5. Register Usage and Stack Frames
-The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -248,52 +248,52 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for ARM11
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The ARM11 vectors start at address zero. The demonstration system startup
-reset.S file contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+reset.S file contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
-ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
+ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
nested IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.S:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -301,7 +301,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -314,7 +314,7 @@ __tx_irq_processing_return:
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.S:
.global __tx_irq_example_handler
@@ -324,12 +324,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} @ Save some scratch registers
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
BL _tx_thread_vectored_context_save @ Call the vectored IRQ context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -346,22 +346,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -369,10 +369,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* Enable nested IRQ interrupts. NOTE: Since this service returns
-@ with IRQ interrupts enabled, all IRQ interrupt sources must be
+@ with IRQ interrupts enabled, all IRQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-@
+@
@ /* Application ISR call(s) go here! */
@
@ /* Disable nested IRQ interrupts. The mode is switched back to
@@ -385,12 +385,12 @@ __tx_irq_processing_return:
7.3 FIQ Interrupts
-By default, ARM7 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, ARM7 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.S.
@@ -399,7 +399,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.S.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.S:
@@ -427,18 +427,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.S. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -454,7 +454,7 @@ __tx_fiq_processing_return:
@ interrupt, and all C scratch registers are available for use. */
@
@ /* Enable nested FIQ interrupts. NOTE: Since this service returns
-@ with FIQ interrupts enabled, all FIQ interrupt sources must be
+@ with FIQ interrupts enabled, all FIQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@
@@ -470,12 +470,12 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
-interrupt source, these services are not functional but the remainder of
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
+interrupt source, these services are not functional but the remainder of
ThreadX will still run.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.S for the demonstration system.
diff --git a/ports/arm11/gnu/src/tx_thread_context_restore.S b/ports/arm11/gnu/src/tx_thread_context_restore.S
index 6a270b66..74fb495f 100644
--- a/ports/arm11/gnu/src/tx_thread_context_restore.S
+++ b/ports/arm11/gnu/src/tx_thread_context_restore.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -43,51 +43,42 @@ IRQ_MODE = 0x92 @ Disable IRQ, IRQ mode
@
@/* No 16-bit Thumb mode veneer code is needed for _tx_thread_context_restore
@ since it will never be called 16-bit mode. */
-@
+@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_context_restore ARM11/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_context_restore ARM11/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function restores the interrupt context if it is processing a */
-@/* nested interrupt. If not, it returns to the interrupt thread if no */
-@/* preemption is necessary. Otherwise, if preemption is necessary or */
-@/* if no thread was running, the function returns to the scheduler. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_schedule Thread scheduling routine */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs Interrupt Service Routines */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function restores the interrupt context if it is processing a */
+@/* nested interrupt. If not, it returns to the interrupt thread if no */
+@/* preemption is necessary. Otherwise, if preemption is necessary or */
+@/* if no thread was running, the function returns to the scheduler. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_schedule Thread scheduling routine */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs Interrupt Service Routines */
@/* */
@/**************************************************************************/
@VOID _tx_thread_context_restore(VOID)
@@ -115,13 +106,13 @@ _tx_thread_context_restore:
LDR r3, =_tx_thread_system_state @ Pickup address of system state variable
LDR r2, [r3] @ Pickup system state
SUB r2, r2, #1 @ Decrement the counter
- STR r2, [r3] @ Store the counter
+ STR r2, [r3] @ Store the counter
CMP r2, #0 @ Was this the first interrupt?
BEQ __tx_thread_not_nested_restore @ If so, not a nested restore
@
@ /* Interrupts are nested. */
@
-@ /* Just recover the saved registers and return to the point of
+@ /* Just recover the saved registers and return to the point of
@ interrupt. */
@
LDMIA sp!, {r0, r10, r12, lr} @ Recover SPSR, POI, and scratch regs
diff --git a/ports/arm11/gnu/src/tx_thread_context_save.S b/ports/arm11/gnu/src/tx_thread_context_save.S
index 3fe539d2..c8d7e503 100644
--- a/ports/arm11/gnu/src/tx_thread_context_save.S
+++ b/ports/arm11/gnu/src/tx_thread_context_save.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -36,50 +36,41 @@ DISABLE_INTS = 0x80 @ IRQ interrupts disabled
@
@/* No 16-bit Thumb mode veneer code is needed for _tx_thread_context_save
@ since it will never be called 16-bit mode. */
-@
+@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_context_save ARM11/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_context_save ARM11/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function saves the context of an executing thread in the */
-@/* beginning of interrupt processing. The function also ensures that */
-@/* the system stack is used upon return to the calling ISR. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function saves the context of an executing thread in the */
+@/* beginning of interrupt processing. The function also ensures that */
+@/* the system stack is used upon return to the calling ISR. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_context_save(VOID)
@@ -95,7 +86,7 @@ _tx_thread_context_save:
@ if (_tx_thread_system_state++)
@ {
@
- STMDB sp!, {r0-r3} @ Save some working registers
+ STMDB sp!, {r0-r3} @ Save some working registers
#ifdef TX_ENABLE_FIQ_SUPPORT
MRS r0, CPSR @ Pickup the CPSR
ORR r0, r0, #DISABLE_INTS @ Build disable interrupt CPSR
@@ -115,7 +106,7 @@ _tx_thread_context_save:
@ calling ISR. */
@
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other registers
@
@ /* Return to the ISR. */
@@ -131,7 +122,7 @@ _tx_thread_context_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_irq_processing_return @ Continue IRQ processing
+ B __tx_irq_processing_return @ Continue IRQ processing
@
__tx_thread_not_nested_save:
@ }
@@ -145,13 +136,13 @@ __tx_thread_not_nested_save:
LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread ptr
LDR r0, [r1] @ Pickup current thread pointer
CMP r0, #0 @ Is it NULL?
- BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
@ scheduling loop - nothing needs saving!
@
@ /* Save minimal context of interrupted thread. */
@
MRS r2, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} @ Store other registers
@
@ /* Save the current stack pointer in the thread's control block. */
@@ -171,7 +162,7 @@ __tx_thread_not_nested_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_irq_processing_return @ Continue IRQ processing
+ B __tx_irq_processing_return @ Continue IRQ processing
@
@ }
@ else
@@ -181,7 +172,7 @@ __tx_thread_idle_system_save:
@
@ /* Interrupt occurred in the scheduling loop. */
@
-@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
+@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
@ processing. */
@
MOV r10, #0 @ Clear stack limit
@@ -196,7 +187,7 @@ __tx_thread_idle_system_save:
#endif
ADD sp, sp, #16 @ Recover saved registers
- B __tx_irq_processing_return @ Continue IRQ processing
+ B __tx_irq_processing_return @ Continue IRQ processing
@
@ }
@}
diff --git a/ports/arm11/gnu/src/tx_thread_fiq_context_restore.S b/ports/arm11/gnu/src/tx_thread_fiq_context_restore.S
index 3d3dd37a..5d6ed149 100644
--- a/ports/arm11/gnu/src/tx_thread_fiq_context_restore.S
+++ b/ports/arm11/gnu/src/tx_thread_fiq_context_restore.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -25,7 +25,7 @@
SVC_MODE = 0xD3 @ SVC mode
FIQ_MODE = 0xD1 @ FIQ mode
DISABLE_INTS = 0xC0 @ Disable IRQ/FIQ interrupts
-MODE_MASK = 0x1F @ Mode mask
+MODE_MASK = 0x1F @ Mode mask
THUMB_MASK = 0x20 @ Thumb bit mask
IRQ_MODE_BITS = 0x12 @ IRQ mode bits
SVC_MODE_BITS = 0x13 @ SVC mode value
@@ -47,47 +47,38 @@ SVC_MODE_BITS = 0x13 @ SVC mode value
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_context_restore ARM11/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_context_restore ARM11/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function restores the fiq interrupt context when processing a */
-@/* nested interrupt. If not, it returns to the interrupt thread if no */
-@/* preemption is necessary. Otherwise, if preemption is necessary or */
-@/* if no thread was running, the function returns to the scheduler. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_schedule Thread scheduling routine */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* FIQ ISR Interrupt Service Routines */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function restores the fiq interrupt context when processing a */
+@/* nested interrupt. If not, it returns to the interrupt thread if no */
+@/* preemption is necessary. Otherwise, if preemption is necessary or */
+@/* if no thread was running, the function returns to the scheduler. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_schedule Thread scheduling routine */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* FIQ ISR Interrupt Service Routines */
@/* */
@/**************************************************************************/
@VOID _tx_thread_fiq_context_restore(VOID)
@@ -116,13 +107,13 @@ _tx_thread_fiq_context_restore:
LDR r3, =_tx_thread_system_state @ Pickup address of system state variable
LDR r2, [r3] @ Pickup system state
SUB r2, r2, #1 @ Decrement the counter
- STR r2, [r3] @ Store the counter
+ STR r2, [r3] @ Store the counter
CMP r2, #0 @ Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore @ If so, not a nested restore
@
@ /* Interrupts are nested. */
@
-@ /* Just recover the saved registers and return to the point of
+@ /* Just recover the saved registers and return to the point of
@ interrupt. */
@
LDMIA sp!, {r0, r10, r12, lr} @ Recover SPSR, POI, and scratch regs
@@ -213,7 +204,7 @@ __tx_thread_fiq_preempt_restore:
BEQ __tx_thread_fiq_dont_save_ts @ No, don't save it
@
@ _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-@ _tx_timer_time_slice = 0;
+@ _tx_timer_time_slice = 0;
@
STR r2, [r0, #24] @ Save thread's time-slice
MOV r2, #0 @ Clear value
diff --git a/ports/arm11/gnu/src/tx_thread_fiq_context_save.S b/ports/arm11/gnu/src/tx_thread_fiq_context_save.S
index 8dc69191..93b33309 100644
--- a/ports/arm11/gnu/src/tx_thread_fiq_context_save.S
+++ b/ports/arm11/gnu/src/tx_thread_fiq_context_save.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -34,46 +34,37 @@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_context_save ARM11/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_context_save ARM11/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function saves the context of an executing thread in the */
-@/* beginning of interrupt processing. The function also ensures that */
-@/* the system stack is used upon return to the calling ISR. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function saves the context of an executing thread in the */
+@/* beginning of interrupt processing. The function also ensures that */
+@/* the system stack is used upon return to the calling ISR. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@ VOID _tx_thread_fiq_context_save(VOID)
@@ -89,7 +80,7 @@ _tx_thread_fiq_context_save:
@ if (_tx_thread_system_state++)
@ {
@
- STMDB sp!, {r0-r3} @ Save some working registers
+ STMDB sp!, {r0-r3} @ Save some working registers
LDR r3, =_tx_thread_system_state @ Pickup address of system state variable
LDR r2, [r3] @ Pickup system state
CMP r2, #0 @ Is this the first interrupt?
@@ -104,7 +95,7 @@ _tx_thread_fiq_context_save:
@ calling ISR. */
@
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other registers
@
@ /* Return to the ISR. */
@@ -120,38 +111,38 @@ _tx_thread_fiq_context_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_fiq_processing_return @ Continue FIQ processing
+ B __tx_fiq_processing_return @ Continue FIQ processing
@
__tx_thread_fiq_not_nested_save:
-@ }
+@ }
@
@ /* Otherwise, not nested, check to see if a thread was running. */
@ else if (_tx_thread_current_ptr)
-@ {
+@ {
@
ADD r2, r2, #1 @ Increment the interrupt counter
STR r2, [r3] @ Store it back in the variable
LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread ptr
LDR r0, [r1] @ Pickup current thread pointer
CMP r0, #0 @ Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save @ If so, interrupt occurred in
-@ @ scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save @ If so, interrupt occurred in
+@ @ scheduling loop - nothing needs saving!
@
@ /* Save minimal context of interrupted thread. */
@
MRS r2, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r2, lr} @ Store other registers, Note that we don't
-@ @ need to save sl and ip since FIQ has
-@ @ copies of these registers. Nested
+@ @ need to save sl and ip since FIQ has
+@ @ copies of these registers. Nested
@ @ interrupt processing does need to save
@ @ these registers.
@
@ /* Save the current stack pointer in the thread's control block. */
-@ _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+@ _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
@
@ /* Switch to the system stack. */
-@ sp = _tx_thread_system_stack_ptr;
+@ sp = _tx_thread_system_stack_ptr;
@
MOV r10, #0 @ Clear stack limit
@@ -164,7 +155,7 @@ __tx_thread_fiq_not_nested_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_fiq_processing_return @ Continue FIQ processing
+ B __tx_fiq_processing_return @ Continue FIQ processing
@
@ }
@ else
@@ -184,16 +175,16 @@ __tx_thread_fiq_idle_system_save:
#endif
@
@ /* Not much to do here, save the current SPSR and LR for possible
-@ use in IRQ interrupted in idle system conditions, and return to
+@ use in IRQ interrupted in idle system conditions, and return to
@ FIQ interrupt processing. */
@
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, lr} @ Store other registers that will get used
-@ @ or stripped off the stack in context
-@ @ restore
- B __tx_fiq_processing_return @ Continue FIQ processing
+@ @ or stripped off the stack in context
+@ @ restore
+ B __tx_fiq_processing_return @ Continue FIQ processing
@
@ }
-@}
+@}
diff --git a/ports/arm11/gnu/src/tx_thread_fiq_nesting_end.S b/ports/arm11/gnu/src/tx_thread_fiq_nesting_end.S
index 82362bbc..1e9ba513 100644
--- a/ports/arm11/gnu/src/tx_thread_fiq_nesting_end.S
+++ b/ports/arm11/gnu/src/tx_thread_fiq_nesting_end.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -27,7 +27,7 @@ DISABLE_INTS = 0xC0 @ Disable IRQ/FIQ interrupts
#else
DISABLE_INTS = 0x80 @ Disable IRQ interrupts
#endif
-MODE_MASK = 0x1F @ Mode mask
+MODE_MASK = 0x1F @ Mode mask
FIQ_MODE_BITS = 0x11 @ FIQ mode bits
@
@
@@ -37,54 +37,45 @@ FIQ_MODE_BITS = 0x11 @ FIQ mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_nesting_end ARM11/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_nesting_end ARM11/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from FIQ mode after */
-@/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-@/* processing from system mode back to FIQ mode prior to the ISR */
-@/* calling _tx_thread_fiq_context_restore. Note that this function */
-@/* assumes the system stack pointer is in the same position after */
-@/* nesting start function was called. */
-@/* */
-@/* This function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with FIQ interrupts disabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function is called by the application from FIQ mode after */
+@/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+@/* processing from system mode back to FIQ mode prior to the ISR */
+@/* calling _tx_thread_fiq_context_restore. Note that this function */
+@/* assumes the system stack pointer is in the same position after */
+@/* nesting start function was called. */
+@/* */
+@/* This function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with FIQ interrupts disabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_fiq_nesting_end(VOID)
@@ -96,7 +87,7 @@ _tx_thread_fiq_nesting_end:
MRS r0, CPSR @ Pickup the CPSR
ORR r0, r0, #DISABLE_INTS @ Build disable interrupt value
MSR CPSR_cxsf, r0 @ Disable interrupts
- LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
@ 8-byte alignment logic)
BIC r0, r0, #MODE_MASK @ Clear mode bits
ORR r0, r0, #FIQ_MODE_BITS @ Build IRQ mode CPSR
diff --git a/ports/arm11/gnu/src/tx_thread_fiq_nesting_start.S b/ports/arm11/gnu/src/tx_thread_fiq_nesting_start.S
index 5a6b6e1b..2f7f4f52 100644
--- a/ports/arm11/gnu/src/tx_thread_fiq_nesting_start.S
+++ b/ports/arm11/gnu/src/tx_thread_fiq_nesting_start.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -33,51 +33,42 @@ SYS_MODE_BITS = 0x1F @ System mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_nesting_start ARM11/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_nesting_start ARM11/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from FIQ mode after */
-@/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-@/* processing to the system mode so nested FIQ interrupt processing */
-@/* is possible (system mode has its own "lr" register). Note that */
-@/* this function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with FIQ interrupts enabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function is called by the application from FIQ mode after */
+@/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+@/* processing to the system mode so nested FIQ interrupt processing */
+@/* is possible (system mode has its own "lr" register). Note that */
+@/* this function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with FIQ interrupts enabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/arm11/gnu/src/tx_thread_interrupt_control.S b/ports/arm11/gnu/src/tx_thread_interrupt_control.S
index ecc9326d..dd8b127c 100644
--- a/ports/arm11/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/arm11/gnu/src/tx_thread_interrupt_control.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -35,7 +35,7 @@ INT_MASK = 0x03F
$_tx_thread_interrupt_control:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_interrupt_control @ Call _tx_thread_interrupt_control function
@@ -45,45 +45,36 @@ $_tx_thread_interrupt_control:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_interrupt_control ARM11/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_interrupt_control ARM11/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is responsible for changing the interrupt lockout */
-@/* posture of the system. */
-@/* */
-@/* INPUT */
-@/* */
-@/* new_posture New interrupt lockout posture */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* old_posture Old interrupt lockout posture */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* Application Code */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function is responsible for changing the interrupt lockout */
+@/* posture of the system. */
+@/* */
+@/* INPUT */
+@/* */
+@/* new_posture New interrupt lockout posture */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* old_posture Old interrupt lockout posture */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* Application Code */
@/* */
@/**************************************************************************/
@UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/arm11/gnu/src/tx_thread_interrupt_disable.S b/ports/arm11/gnu/src/tx_thread_interrupt_disable.S
index f51c2238..fb369d0b 100644
--- a/ports/arm11/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/arm11/gnu/src/tx_thread_interrupt_disable.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -38,7 +38,7 @@ DISABLE_INTS = 0x80 @ IRQ interrupts disabled
$_tx_thread_interrupt_disable:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_interrupt_disable @ Call _tx_thread_interrupt_disable function
@@ -48,44 +48,35 @@ $_tx_thread_interrupt_disable:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_interrupt_disable ARM11/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_interrupt_disable ARM11/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is responsible for disabling interrupts */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* old_posture Old interrupt lockout posture */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* Application Code */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function is responsible for disabling interrupts */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* old_posture Old interrupt lockout posture */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* Application Code */
@/* */
@/**************************************************************************/
@UINT _tx_thread_interrupt_disable(void)
diff --git a/ports/arm11/gnu/src/tx_thread_interrupt_restore.S b/ports/arm11/gnu/src/tx_thread_interrupt_restore.S
index 8506be1b..78c85f91 100644
--- a/ports/arm11/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/arm11/gnu/src/tx_thread_interrupt_restore.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -31,7 +31,7 @@
$_tx_thread_interrupt_restore:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_interrupt_restore @ Call _tx_thread_interrupt_restore function
@@ -41,45 +41,36 @@ $_tx_thread_interrupt_restore:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_interrupt_restore ARM11/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_interrupt_restore ARM11/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
+@/* */
@/* This function is responsible for restoring interrupts to the state */
@/* returned by a previous _tx_thread_interrupt_disable call. */
-@/* */
-@/* INPUT */
-@/* */
-@/* old_posture Old interrupt lockout posture */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* Application Code */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* INPUT */
+@/* */
+@/* old_posture Old interrupt lockout posture */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* Application Code */
@/* */
@/**************************************************************************/
@UINT _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/arm11/gnu/src/tx_thread_irq_nesting_end.S b/ports/arm11/gnu/src/tx_thread_irq_nesting_end.S
index 649bbbb0..26504a38 100644
--- a/ports/arm11/gnu/src/tx_thread_irq_nesting_end.S
+++ b/ports/arm11/gnu/src/tx_thread_irq_nesting_end.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -27,7 +27,7 @@ DISABLE_INTS = 0xC0 @ Disable IRQ/FIQ interrupts
#else
DISABLE_INTS = 0x80 @ Disable IRQ interrupts
#endif
-MODE_MASK = 0x1F @ Mode mask
+MODE_MASK = 0x1F @ Mode mask
IRQ_MODE_BITS = 0x12 @ IRQ mode bits
@
@
@@ -37,54 +37,45 @@ IRQ_MODE_BITS = 0x12 @ IRQ mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_irq_nesting_end ARM11/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_irq_nesting_end ARM11/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from IRQ mode after */
-@/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-@/* processing from system mode back to IRQ mode prior to the ISR */
-@/* calling _tx_thread_context_restore. Note that this function */
-@/* assumes the system stack pointer is in the same position after */
-@/* nesting start function was called. */
-@/* */
-@/* This function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with IRQ interrupts disabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function is called by the application from IRQ mode after */
+@/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+@/* processing from system mode back to IRQ mode prior to the ISR */
+@/* calling _tx_thread_context_restore. Note that this function */
+@/* assumes the system stack pointer is in the same position after */
+@/* nesting start function was called. */
+@/* */
+@/* This function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with IRQ interrupts disabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_irq_nesting_end(VOID)
@@ -96,7 +87,7 @@ _tx_thread_irq_nesting_end:
MRS r0, CPSR @ Pickup the CPSR
ORR r0, r0, #DISABLE_INTS @ Build disable interrupt value
MSR CPSR_cxsf, r0 @ Disable interrupts
- LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
@ 8-byte alignment logic)
BIC r0, r0, #MODE_MASK @ Clear mode bits
ORR r0, r0, #IRQ_MODE_BITS @ Build IRQ mode CPSR
diff --git a/ports/arm11/gnu/src/tx_thread_irq_nesting_start.S b/ports/arm11/gnu/src/tx_thread_irq_nesting_start.S
index ee949845..12bedd93 100644
--- a/ports/arm11/gnu/src/tx_thread_irq_nesting_start.S
+++ b/ports/arm11/gnu/src/tx_thread_irq_nesting_start.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -33,51 +33,42 @@ SYS_MODE_BITS = 0x1F @ System mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_irq_nesting_start ARM11/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_irq_nesting_start ARM11/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from IRQ mode after */
-@/* _tx_thread_context_save has been called and switches the IRQ */
-@/* processing to the system mode so nested IRQ interrupt processing */
-@/* is possible (system mode has its own "lr" register). Note that */
-@/* this function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with IRQ interrupts enabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function is called by the application from IRQ mode after */
+@/* _tx_thread_context_save has been called and switches the IRQ */
+@/* processing to the system mode so nested IRQ interrupt processing */
+@/* is possible (system mode has its own "lr" register). Note that */
+@/* this function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with IRQ interrupts enabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/arm11/gnu/src/tx_thread_schedule.S b/ports/arm11/gnu/src/tx_thread_schedule.S
index 9350540c..2901fbef 100644
--- a/ports/arm11/gnu/src/tx_thread_schedule.S
+++ b/ports/arm11/gnu/src/tx_thread_schedule.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -45,7 +45,7 @@ ENABLE_INTS = 0x80 @ IRQ Interrupts enabled mask
$_tx_thread_schedule:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_schedule @ Call _tx_thread_schedule function
@@ -55,48 +55,39 @@ $_tx_thread_schedule:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_schedule ARM11/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_schedule ARM11/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function waits for a thread control block pointer to appear in */
-@/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-@/* in the variable, the corresponding thread is resumed. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* _tx_initialize_kernel_enter ThreadX entry function */
-@/* _tx_thread_system_return Return to system from thread */
-@/* _tx_thread_context_restore Restore thread's context */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function waits for a thread control block pointer to appear in */
+@/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+@/* in the variable, the corresponding thread is resumed. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* _tx_initialize_kernel_enter ThreadX entry function */
+@/* _tx_thread_system_return Return to system from thread */
+@/* _tx_thread_context_restore Restore thread's context */
@/* */
@/**************************************************************************/
@VOID _tx_thread_schedule(VOID)
@@ -124,7 +115,7 @@ __tx_thread_schedule_loop:
@
@ }
@ while(_tx_thread_execute_ptr == TX_NULL);
-@
+@
@ /* Yes! We have a thread to execute. Lockout interrupts and
@ transfer control to it. */
@
@@ -133,7 +124,7 @@ __tx_thread_schedule_loop:
@ /* Setup the current thread pointer. */
@ _tx_thread_current_ptr = _tx_thread_execute_ptr;
@
- LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread
STR r0, [r1] @ Setup current thread pointer
@
@ /* Increment the run count for this thread. */
@@ -147,7 +138,7 @@ __tx_thread_schedule_loop:
@ /* Setup time-slice, if present. */
@ _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
@
- LDR r2, =_tx_timer_time_slice @ Pickup address of time-slice
+ LDR r2, =_tx_timer_time_slice @ Pickup address of time-slice
@ variable
LDR sp, [r0, #8] @ Switch stack pointers
STR r3, [r2] @ Setup time-slice
diff --git a/ports/arm11/gnu/src/tx_thread_stack_build.S b/ports/arm11/gnu/src/tx_thread_stack_build.S
index 7f156ee0..989916ca 100644
--- a/ports/arm11/gnu/src/tx_thread_stack_build.S
+++ b/ports/arm11/gnu/src/tx_thread_stack_build.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -42,7 +42,7 @@ CPSR_MASK = 0x9F @ Mask initial CPSR, IRQ interru
.type $_tx_thread_stack_build,function
$_tx_thread_stack_build:
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_stack_build @ Call _tx_thread_stack_build function
@@ -52,47 +52,38 @@ $_tx_thread_stack_build:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_stack_build ARM11/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_stack_build ARM11/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
+@/* */
@/* This function builds a stack frame on the supplied thread's stack. */
@/* The stack frame results in a fake interrupt return to the supplied */
-@/* function pointer. */
-@/* */
-@/* INPUT */
-@/* */
+@/* function pointer. */
+@/* */
+@/* INPUT */
+@/* */
@/* thread_ptr Pointer to thread control blk */
@/* function_ptr Pointer to return function */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* _tx_thread_create Create thread service */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* _tx_thread_create Create thread service */
@/* */
@/**************************************************************************/
@VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -101,10 +92,10 @@ $_tx_thread_stack_build:
.type _tx_thread_stack_build,function
_tx_thread_stack_build:
@
-@
+@
@ /* Build a fake interrupt frame. The form of the fake interrupt stack
@ on theARM11 should look like the following after it is built:
-@
+@
@ Stack Top: 1 Interrupt stack frame type
@ CPSR Initial value for CPSR
@ a1 (r0) Initial value for a1
diff --git a/ports/arm11/gnu/src/tx_thread_system_return.S b/ports/arm11/gnu/src/tx_thread_system_return.S
index 1c26a7a0..c15ae266 100644
--- a/ports/arm11/gnu/src/tx_thread_system_return.S
+++ b/ports/arm11/gnu/src/tx_thread_system_return.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -48,7 +48,7 @@ DISABLE_INTS = 0x80 @ IRQ interrupts disabled
$_tx_thread_system_return:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_system_return @ Call _tx_thread_system_return function
@@ -58,47 +58,38 @@ $_tx_thread_system_return:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_system_return ARM11/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_system_return ARM11/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is target processor specific. It is used to transfer */
-@/* control from a thread back to the ThreadX system. Only a */
-@/* minimal context is saved since the compiler assumes temp registers */
-@/* are going to get slicked by a function call anyway. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_schedule Thread scheduling loop */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ThreadX components */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function is target processor specific. It is used to transfer */
+@/* control from a thread back to the ThreadX system. Only a */
+@/* minimal context is saved since the compiler assumes temp registers */
+@/* are going to get slicked by a function call anyway. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_schedule Thread scheduling loop */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ThreadX components */
@/* */
@/**************************************************************************/
@VOID _tx_thread_system_return(VOID)
@@ -112,12 +103,12 @@ _tx_thread_system_return:
MOV r0, #0 @ Build a solicited stack type
MRS r1, CPSR @ Pickup the CPSR
STMDB sp!, {r0-r1, r4-r11, lr} @ Save minimal context
-@
+@
@ /* Lockout interrupts. */
@
ORR r2, r1, #DISABLE_INTS @ Build disable interrupt CPSR
MSR CPSR_cxsf, r2 @ Disable interrupts
-
+
#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
@
@ /* Call the thread exit function to indicate the thread is no longer executing. */
diff --git a/ports/arm11/gnu/src/tx_thread_vectored_context_save.S b/ports/arm11/gnu/src/tx_thread_vectored_context_save.S
index 23f82007..391cf717 100644
--- a/ports/arm11/gnu/src/tx_thread_vectored_context_save.S
+++ b/ports/arm11/gnu/src/tx_thread_vectored_context_save.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -37,50 +37,41 @@ DISABLE_INTS = 0x80 @ IRQ interrupts disabled
@
@/* No 16-bit Thumb mode veneer code is needed for _tx_thread_vectored_context_save
@ since it will never be called 16-bit mode. */
-@
+@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_vectored_context_save ARM11/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_vectored_context_save ARM11/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function saves the context of an executing thread in the */
-@/* beginning of interrupt processing. The function also ensures that */
-@/* the system stack is used upon return to the calling ISR. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function saves the context of an executing thread in the */
+@/* beginning of interrupt processing. The function also ensures that */
+@/* the system stack is used upon return to the calling ISR. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_vectored_context_save(VOID)
@@ -140,7 +131,7 @@ __tx_thread_not_nested_save:
LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread ptr
LDR r0, [r1, #0] @ Pickup current thread pointer
CMP r0, #0 @ Is it NULL?
- BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
@ scheduling loop - nothing needs saving!
@
@ /* Note: Minimal context of interrupted thread is already saved. */
@@ -172,7 +163,7 @@ __tx_thread_idle_system_save:
@
@ /* Interrupt occurred in the scheduling loop. */
@
-@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
+@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
@ processing. */
@
MOV r10, #0 @ Clear stack limit
diff --git a/ports/arm11/gnu/src/tx_timer_interrupt.S b/ports/arm11/gnu/src/tx_timer_interrupt.S
index 137c5883..1236ec49 100644
--- a/ports/arm11/gnu/src/tx_timer_interrupt.S
+++ b/ports/arm11/gnu/src/tx_timer_interrupt.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Timer */
@/** */
@@ -48,7 +48,7 @@
.type $_tx_timer_interrupt,function
$_tx_timer_interrupt:
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_timer_interrupt @ Call _tx_timer_interrupt function
@@ -58,49 +58,40 @@ $_tx_timer_interrupt:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_timer_interrupt ARM11/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_timer_interrupt ARM11/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function processes the hardware timer interrupt. This */
-@/* processing includes incrementing the system clock and checking for */
-@/* time slice and/or timer expiration. If either is found, the */
-@/* interrupt context save/restore functions are called along with the */
-@/* expiration functions. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_time_slice Time slice interrupted thread */
-@/* _tx_timer_expiration_process Timer expiration processing */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* interrupt vector */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function processes the hardware timer interrupt. This */
+@/* processing includes incrementing the system clock and checking for */
+@/* time slice and/or timer expiration. If either is found, the */
+@/* interrupt context save/restore functions are called along with the */
+@/* expiration functions. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_time_slice Time slice interrupted thread */
+@/* _tx_timer_expiration_process Timer expiration processing */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* interrupt vector */
@/* */
@/**************************************************************************/
@VOID _tx_timer_interrupt(VOID)
@@ -125,7 +116,7 @@ _tx_timer_interrupt:
@ if (_tx_timer_time_slice)
@ {
@
- LDR r3, =_tx_timer_time_slice @ Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice @ Pickup address of time-slice
LDR r2, [r3] @ Pickup time-slice
CMP r2, #0 @ Is it non-active?
BEQ __tx_timer_no_time_slice @ Yes, skip time-slice processing
@@ -243,7 +234,7 @@ __tx_timer_dont_activate:
@ if (_tx_timer_expired_time_slice)
@ {
@
- LDR r3, =_tx_timer_expired_time_slice @ Pickup address of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice @ Pickup address of time-slice expired
LDR r2, [r3] @ Pickup the actual flag
CMP r2, #0 @ See if the flag is set
BEQ __tx_timer_not_ts_expiration @ No, skip time-slice processing
diff --git a/ports/arm11/iar/example_build/cstartup.s b/ports/arm11/iar/example_build/cstartup.s
index b95efc0e..3da2b79d 100644
--- a/ports/arm11/iar/example_build/cstartup.s
+++ b/ports/arm11/iar/example_build/cstartup.s
@@ -1,7 +1,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; Part one of the system initialization code,
+;; Part one of the system initialization code,
;; contains low-level
;; initialization.
;;
@@ -71,13 +71,13 @@ FIQ_Addr: DCD __tx_fiq_handler
SECTION .text:CODE:NOROOT(2)
-; PUBLIC ?cstartup
+; PUBLIC ?cstartup
EXTERN ?main
REQUIRE __vector
- ARM
-
-__iar_program_start:
+ ARM
+
+__iar_program_start:
?cstartup:
;
diff --git a/ports/arm11/iar/example_build/sample_threadx.c b/ports/arm11/iar/example_build/sample_threadx.c
index a57d908d..f9d0e94a 100644
--- a/ports/arm11/iar/example_build/sample_threadx.c
+++ b/ports/arm11/iar/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -85,42 +85,42 @@ CHAR *pointer;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -128,23 +128,23 @@ CHAR *pointer;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -247,11 +247,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -310,7 +310,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -363,7 +363,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/arm11/iar/example_build/tx_initialize_low_level.s b/ports/arm11/iar/example_build/tx_initialize_low_level.s
index 7242cfe4..61d554bc 100644
--- a/ports/arm11/iar/example_build/tx_initialize_low_level.s
+++ b/ports/arm11/iar/example_build/tx_initialize_low_level.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -62,7 +62,7 @@ SYS_MODE DEFINE 0xDF ; Disable irq,fiq SYS mode
;
;
;
-;/* Define the FREE_MEM segment that will specify where free memory is
+;/* Define the FREE_MEM segment that will specify where free memory is
; defined. This must also be located in at the end of other RAM segments
; in the linker control file. The value of this segment is what is passed
; to tx_application_define. */
@@ -75,47 +75,41 @@ __tx_free_memory_start
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level ARM11/IAR */
-;/* 6.1 */
-;/* AUTHOR */
-;/* */
-;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
-;/**************************************************************************/
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level ARM11/IAR */
+;/* 6.1 */
+;/* AUTHOR */
+;/* */
+;/* William E. Lamie, Microsoft Corporation */
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* */
+;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
;{
RSEG .text:CODE:NOROOT(2)
@@ -146,7 +140,7 @@ _tx_initialize_low_level
;
LDR r2, =_tx_initialize_unused_memory ; Pickup unused memory ptr address
STR r0, [r2, #0] ; Save first free memory address
-;
+;
; /* Setup Timer for periodic interrupts. */
;
; /* Done, return to caller. */
@@ -188,7 +182,7 @@ __tx_reserved_handler
RSEG .text:CODE:NOROOT(2)
PUBLIC __tx_irq_handler
RSEG .text:CODE:NOROOT(2)
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -196,17 +190,17 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -221,7 +215,7 @@ __tx_irq_processing_return
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -240,22 +234,22 @@ __tx_irq_processing_return
; /* Jump to context save to save system context. */
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other registers
; BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -264,7 +258,7 @@ __tx_irq_processing_return
; /* Application IRQ handler is called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
@@ -288,11 +282,11 @@ __tx_fiq_processing_return
; /* At this point execution is still in the FIQ mode. The CPSR, point of
; interrupt, and all C scratch registers are available for use. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
; from FIQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with FIQ interrupts enabled.
+; system mode and returns with FIQ interrupts enabled.
;
-; NOTE: It is very important to ensure all FIQ interrupts are cleared
+; NOTE: It is very important to ensure all FIQ interrupts are cleared
; prior to enabling nested FIQ interrupts. */
#ifdef TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/arm11/iar/inc/tx_port.h b/ports/arm11/iar/inc/tx_port.h
index 8bcdaa98..52b43a86 100644
--- a/ports/arm11/iar/inc/tx_port.h
+++ b/ports/arm11/iar/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,38 +21,29 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h ARM11/IAR */
-/* 6.1.6 */
+/**************************************************************************/
/* */
-/* AUTHOR */
-/* */
-/* William E. Lamie, Microsoft Corporation */
-/* */
-/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* */
-/**************************************************************************/
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h ARM11/IAR */
+/* 6.1.6 */
+/* */
+/* AUTHOR */
+/* */
+/* William E. Lamie, Microsoft Corporation */
+/* */
+/* DESCRIPTION */
+/* */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
+/* */
+/**************************************************************************/
#ifndef TX_PORT_H
#define TX_PORT_H
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -79,7 +71,7 @@
#endif
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -115,12 +107,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -130,8 +122,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -188,7 +180,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -202,17 +194,17 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -226,11 +218,11 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -240,23 +232,23 @@ ULONG _tx_misra_time_stamp_get(VOID);
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#if (__VER__ < 8000000)
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {_tx_iar_destroy_per_thread_tls_area(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
-#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
+#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#endif
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -284,8 +276,8 @@ void __iar_Initlocks(void);
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef TX_DISABLE_INLINE
@@ -296,22 +288,22 @@ void __iar_Initlocks(void);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (UINT) __CLZ(m); \
- b = 31 - b;
+ b = 31 - b;
#endif
#endif
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
/* First, check and see what mode the file is being compiled in. The IAR compiler
- defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
+ defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
is present. If ARM 32-bit mode is present, the fast CPSR manipulation macros
are available. Otherwise, if Thumb mode is present, we must use function calls. */
@@ -373,8 +365,8 @@ void _tx_thread_interrupt_restore(UINT old_posture);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARM11/IAR Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM11/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/arm11/iar/readme_threadx.txt b/ports/arm11/iar/readme_threadx.txt
index fbe7deeb..8a4ef703 100644
--- a/ports/arm11/iar/readme_threadx.txt
+++ b/ports/arm11/iar/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for ARM11
+ Microsoft's Azure RTOS ThreadX for ARM11
Thumb & 32-bit Mode
@@ -7,10 +7,10 @@
1. Building the ThreadX run-time Library
Building the ThreadX library is easy. First, open the Azure RTOS workspace
-azure_rtos.eww. Next, make the TX project the "active project" in the
-IAR Embedded Workbench and select the "Make" button. You should observe
-assembly and compilation of a series of ThreadX source files. This
-results in the ThreadX run-time library file tx.a, which is needed by
+azure_rtos.eww. Next, make the TX project the "active project" in the
+IAR Embedded Workbench and select the "Make" button. You should observe
+assembly and compilation of a series of ThreadX source files. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
@@ -20,52 +20,52 @@ The ThreadX demonstration is designed to execute under the IAR
Windows-based ARM11 simulator.
Building the demonstration is easy; simply make the sample_threadx.ewp project
-the "active project" in the IAR Embedded Workbench and select the
+the "active project" in the IAR Embedded Workbench and select the
"Make" button.
-You should observe the compilation of sample_threadx.c (which is the demonstration
+You should observe the compilation of sample_threadx.c (which is the demonstration
application) and linking with tx.a. The resulting file sample_threadx.out is a
binary file that can be downloaded and executed on IAR's ARM11 simulator.
A SPECIAL NOTE: The IAR ARM simulator does simulate interrupts. In order
-for the ThreadX demonstration to run properly, a periodic IRQ interrupt must
+for the ThreadX demonstration to run properly, a periodic IRQ interrupt must
be setup in the IAR debugging environment. We recommend setting an IRQ
interrupt to execute every 9999 cycles.
3. System Initialization
-The entry point in ThreadX for the ARM11 using IAR tools is at label
-?cstartup. This is defined within the IAR compiler's startup code. In
-addition, this is where all static and global preset C variable
+The entry point in ThreadX for the ARM11 using IAR tools is at label
+?cstartup. This is defined within the IAR compiler's startup code. In
+addition, this is where all static and global preset C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, and a periodic timer interrupt source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, and a periodic timer interrupt source.
By default, the vector area is defined at the top of cstartup.s, which is
-a slightly modified from the base IAR file.
+a slightly modified from the base IAR file.
The _tx_initialize_low_level function inside of tx_initialize_low_level.s
-also determines the first available address for use by the application, which
-is supplied as the sole input parameter to your application definition function,
-tx_application_define. To accomplish this, a section is created in
-tx_initialize_low_level.s called FREE_MEM, which must be located after all
+also determines the first available address for use by the application, which
+is supplied as the sole input parameter to your application definition function,
+tx_application_define. To accomplish this, a section is created in
+tx_initialize_low_level.s called FREE_MEM, which must be located after all
other RAM sections in memory.
4. Register Usage and Stack Frames
-The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
-scratch registers for each function. All other registers used by a C function
-must be preserved by the function. ThreadX takes advantage of this in
-situations where a context switch happens as a result of making a ThreadX
-service call (which is itself a C function). In such cases, the saved
+The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
+scratch registers for each function. All other registers used by a C function
+must be preserved by the function. ThreadX takes advantage of this in
+situations where a context switch happens as a result of making a ThreadX
+service call (which is itself a C function). In such cases, the saved
context of a thread is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -83,12 +83,12 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
5. Conditional Compilation Switches
@@ -97,146 +97,146 @@ The following are conditional compilation options for building the ThreadX libra
and application:
- TX_ENABLE_FIQ_SUPPORT This assembler/compiler define enables
+ TX_ENABLE_FIQ_SUPPORT This assembler/compiler define enables
FIQ interrupt handling support in the
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s.
TX_ENABLE_FIQ_NESTING This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s. In addition,
IRQ nesting should also be enabled.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
TX_THUMB Defined, this option enables the BX LR calling return sequence
@@ -250,29 +250,29 @@ and application:
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
-project to enable various compiler optimizations.
+project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for ARM11
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The ARM11 vectors start at address zero. The demonstration system startup
-cstartup.s file contains the vectors and is loaded at address zero.
-On actual hardware platforms, this area might have to be copied to address 0.
+cstartup.s file contains the vectors and is loaded at address zero.
+On actual hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -283,12 +283,12 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
PUBLIC __tx_irq_handler
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -296,7 +296,7 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -309,7 +309,7 @@ __tx_irq_processing_return
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.s:
@@ -320,12 +320,12 @@ __tx_example_vectored_irq_handler
; /* Jump to context save to save system context. */
STMDB sp!, {r0-r3} ; Save some scratch registers
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -342,24 +342,24 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
RSEG .text:CODE:NOROOT(2)
PUBLIC __tx_irq_handler
RSEG .text:CODE:NOROOT(2)
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -367,15 +367,15 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;
BL _tx_thread_irq_nesting_start
@@ -383,7 +383,7 @@ __tx_irq_processing_return
; /* Application ISR dispatch call goes here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;
BL _tx_thread_irq_nesting_end
@@ -394,12 +394,12 @@ __tx_irq_processing_return
7.3 FIQ Interrupts
-By default, ARM11 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, ARM11 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -408,7 +408,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.s.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.s:
@@ -439,18 +439,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.s. When nested FIQ interrupts are no
-longer required, calling the _tx_thread_fiq_nesting_end service disables
-nesting by disabling FIQ interrupts and switching back to FIQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.s. When nested FIQ interrupts are no
+longer required, calling the _tx_thread_fiq_nesting_end service disables
+nesting by disabling FIQ interrupts and switching back to FIQ mode in
preparation for the FIQ context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -468,7 +468,7 @@ __tx_fiq_processing_return:
; interrupt, and all C scratch registers are available for use. */
;
; /* Enable nested FIQ interrupts. NOTE: Since this service returns
-; with FIQ interrupts enabled, all FIQ interrupt sources must be
+; with FIQ interrupts enabled, all FIQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
;
@@ -484,22 +484,22 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
+To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
in the IRQ processing.
9. Thumb/ARM11 Mixed Mode
-By default, ThreadX is setup for running in ARM11 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
+By default, ThreadX is setup for running in ARM11 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
ThreadX file and/or the application in Thumb mode. The only exception
-to this is the file tx_thread_shell_entry.c. This file must always be
-built in 32-bit mode. In addition, if any Thumb code is used the entire
+to this is the file tx_thread_shell_entry.c. This file must always be
+built in 32-bit mode. In addition, if any Thumb code is used the entire
ThreadX assembly source should be built with TX_THUMB defined.
@@ -511,7 +511,7 @@ should have the following line added (if not already in place):
initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
-The project options "General Options -> Library Configuration" should also have the
+The project options "General Options -> Library Configuration" should also have the
"Enable thread support in library" box selected.
diff --git a/ports/arm11/iar/src/tx_iar.c b/ports/arm11/iar/src/tx_iar.c
index a37231c8..238b485e 100644
--- a/ports/arm11/iar/src/tx_iar.c
+++ b/ports/arm11/iar/src/tx_iar.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** IAR Multithreaded Library Support */
/** */
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,24 +423,24 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#include
+#include
void * __aeabi_read_tp();
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports/arm11/iar/src/tx_thread_context_restore.s b/ports/arm11/iar/src/tx_thread_context_restore.s
index 211b81dd..addf7705 100644
--- a/ports/arm11/iar/src/tx_thread_context_restore.s
+++ b/ports/arm11/iar/src/tx_thread_context_restore.s
@@ -1,19 +1,19 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -37,7 +37,7 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
THUMB_MASK DEFINE 0x20 ; Thumb bit mask
SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
@@ -52,46 +52,40 @@ SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore ARM11/IAR */
-;/* 6.1 */
-;/* AUTHOR */
-;/* */
-;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
-;/**************************************************************************/
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore ARM11/IAR */
+;/* 6.1 */
+;/* AUTHOR */
+;/* */
+;/* William E. Lamie, Microsoft Corporation */
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
+;/* */
+;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
;{
RSEG .text:CODE:NOROOT(2)
@@ -119,13 +113,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3, #0] ; Store the counter
+ STR r2, [r3, #0] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
diff --git a/ports/arm11/iar/src/tx_thread_context_save.s b/ports/arm11/iar/src/tx_thread_context_save.s
index c4d5b1b4..26a3b4d2 100644
--- a/ports/arm11/iar/src/tx_thread_context_save.s
+++ b/ports/arm11/iar/src/tx_thread_context_save.s
@@ -1,19 +1,19 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -44,45 +44,39 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save ARM11/IAR */
-;/* 6.1 */
-;/* AUTHOR */
-;/* */
-;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
-;/**************************************************************************/
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save ARM11/IAR */
+;/* 6.1 */
+;/* AUTHOR */
+;/* */
+;/* William E. Lamie, Microsoft Corporation */
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
+;/* */
+;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
;{
RSEG .text:CODE:NOROOT(2)
@@ -97,7 +91,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
#ifdef TX_ENABLE_FIQ_SUPPORT
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt CPSR
@@ -117,7 +111,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -133,7 +127,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -147,13 +141,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -173,7 +167,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -183,7 +177,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -198,7 +192,7 @@ __tx_thread_idle_system_save
#endif
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports/arm11/iar/src/tx_thread_fiq_context_restore.s b/ports/arm11/iar/src/tx_thread_fiq_context_restore.s
index 31824589..d9f8a37a 100644
--- a/ports/arm11/iar/src/tx_thread_fiq_context_restore.s
+++ b/ports/arm11/iar/src/tx_thread_fiq_context_restore.s
@@ -1,19 +1,19 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -38,7 +38,7 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
THUMB_MASK DEFINE 0x20 ; Thumb bit mask
IRQ_MODE_BITS DEFINE 0x12 ; IRQ mode bits
SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
@@ -53,46 +53,40 @@ SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
EXTERN _tx_execution_isr_exit
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_restore ARM11/IAR */
-;/* 6.1 */
-;/* AUTHOR */
-;/* */
-;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function restores the fiq interrupt context when processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* FIQ ISR Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
-;/**************************************************************************/
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_restore ARM11/IAR */
+;/* 6.1 */
+;/* AUTHOR */
+;/* */
+;/* William E. Lamie, Microsoft Corporation */
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function restores the fiq interrupt context when processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* FIQ ISR Interrupt Service Routines */
+;/* */
+;/**************************************************************************/
;VOID _tx_thread_fiq_context_restore(VOID)
;{
RSEG .text:CODE:NOROOT(2)
@@ -120,13 +114,13 @@ _tx_thread_fiq_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -170,7 +164,7 @@ __tx_thread_fiq_no_preempt_restore
; /* Restore interrupted thread or ISR. */
;
; /* Pickup the saved stack pointer. */
-; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
+; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
;
; /* Recover the saved context and return to the point of interrupt. */
;
@@ -217,7 +211,7 @@ __tx_thread_fiq_preempt_restore
BEQ __tx_thread_fiq_dont_save_ts ; No, don't save it
;
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-; _tx_timer_time_slice = 0;
+; _tx_timer_time_slice = 0;
;
STR r2, [r0, #24] ; Save thread's time-slice
MOV r2, #0 ; Clear value
diff --git a/ports/arm11/iar/src/tx_thread_fiq_context_save.s b/ports/arm11/iar/src/tx_thread_fiq_context_save.s
index 17062581..55860011 100644
--- a/ports/arm11/iar/src/tx_thread_fiq_context_save.s
+++ b/ports/arm11/iar/src/tx_thread_fiq_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,45 +36,39 @@
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_save ARM11/IAR */
-;/* 6.1 */
-;/* AUTHOR */
-;/* */
-;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
-;/**************************************************************************/
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_save ARM11/IAR */
+;/* 6.1 */
+;/* AUTHOR */
+;/* */
+;/* William E. Lamie, Microsoft Corporation */
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
+;/* */
+;/**************************************************************************/
; VOID _tx_thread_fiq_context_save(VOID)
;{
RSEG .text:CODE:NOROOT(2)
@@ -89,7 +83,7 @@ _tx_thread_fiq_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -104,7 +98,7 @@ _tx_thread_fiq_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -120,38 +114,38 @@ _tx_thread_fiq_context_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
__tx_thread_fiq_not_nested_save
-; }
+; }
;
; /* Otherwise, not nested, check to see if a thread was running. */
; else if (_tx_thread_current_ptr)
-; {
+; {
;
ADD r2, r2, #1 ; Increment the interrupt counter
STR r2, [r3] ; Store it back in the variable
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
-; ; scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
+; ; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, lr} ; Store other registers, Note that we don't
-; ; need to save sl and ip since FIQ has
-; ; copies of these registers. Nested
+; ; need to save sl and ip since FIQ has
+; ; copies of these registers. Nested
; ; interrupt processing does need to save
; ; these registers.
;
; /* Save the current stack pointer in the thread's control block. */
-; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
;
; /* Switch to the system stack. */
-; sp = _tx_thread_system_stack_ptr;
+; sp = _tx_thread_system_stack_ptr;
;
MOV r10, #0 ; Clear stack limit
@@ -164,7 +158,7 @@ __tx_thread_fiq_not_nested_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
; else
@@ -184,18 +178,18 @@ __tx_thread_fiq_idle_system_save
#endif
;
; /* Not much to do here, save the current SPSR and LR for possible
-; use in IRQ interrupted in idle system conditions, and return to
+; use in IRQ interrupted in idle system conditions, and return to
; FIQ interrupt processing. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, lr} ; Store other registers that will get used
-; ; or stripped off the stack in context
-; ; restore
- B __tx_fiq_processing_return ; Continue FIQ processing
+; ; or stripped off the stack in context
+; ; restore
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
-;}
+;}
;
;
END
diff --git a/ports/arm11/iar/src/tx_thread_fiq_nesting_end.s b/ports/arm11/iar/src/tx_thread_fiq_nesting_end.s
index 0d71933a..2dbab8e5 100644
--- a/ports/arm11/iar/src/tx_thread_fiq_nesting_end.s
+++ b/ports/arm11/iar/src/tx_thread_fiq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,57 +34,51 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
FIQ_MODE_BITS DEFINE 0x11 ; FIQ mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_end ARM11/IAR */
-;/* 6.1 */
-;/* AUTHOR */
-;/* */
-;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-;/* processing from system mode back to FIQ mode prior to the ISR */
-;/* calling _tx_thread_fiq_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with FIQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
-;/**************************************************************************/
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_end ARM11/IAR */
+;/* 6.1 */
+;/* AUTHOR */
+;/* */
+;/* William E. Lamie, Microsoft Corporation */
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+;/* processing from system mode back to FIQ mode prior to the ISR */
+;/* calling _tx_thread_fiq_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with FIQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
+;/* */
+;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_end(VOID)
;{
RSEG .text:CODE:NOROOT(2)
diff --git a/ports/arm11/iar/src/tx_thread_fiq_nesting_start.s b/ports/arm11/iar/src/tx_thread_fiq_nesting_start.s
index 7b2b36cb..2bbbe9b6 100644
--- a/ports/arm11/iar/src/tx_thread_fiq_nesting_start.s
+++ b/ports/arm11/iar/src/tx_thread_fiq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,50 +35,44 @@ MODE_MASK DEFINE 0x1F ; Mode mask
SYS_MODE_BITS DEFINE 0x1F ; System mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_start ARM11/IAR */
-;/* 6.1 */
-;/* AUTHOR */
-;/* */
-;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-;/* processing to the system mode so nested FIQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with FIQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
-;/**************************************************************************/
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_start ARM11/IAR */
+;/* 6.1 */
+;/* AUTHOR */
+;/* */
+;/* William E. Lamie, Microsoft Corporation */
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+;/* processing to the system mode so nested FIQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with FIQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
+;/* */
+;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_start(VOID)
;{
RSEG .text:CODE:NOROOT(2)
diff --git a/ports/arm11/iar/src/tx_thread_interrupt_control.s b/ports/arm11/iar/src/tx_thread_interrupt_control.s
index 4cf6b917..22f39ddf 100644
--- a/ports/arm11/iar/src/tx_thread_interrupt_control.s
+++ b/ports/arm11/iar/src/tx_thread_interrupt_control.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,44 +35,38 @@ INT_MASK DEFINE 0x80 ; Interrupt bit mask
#endif
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control ARM11/IAR */
-;/* 6.1 */
-;/* AUTHOR */
-;/* */
-;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
-;/**************************************************************************/
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control ARM11/IAR */
+;/* 6.1 */
+;/* AUTHOR */
+;/* */
+;/* William E. Lamie, Microsoft Corporation */
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
+;/* */
+;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
;{
RSEG .text:CODE:NOROOT(2)
diff --git a/ports/arm11/iar/src/tx_thread_interrupt_disable.s b/ports/arm11/iar/src/tx_thread_interrupt_disable.s
index e1a61860..d963c895 100644
--- a/ports/arm11/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/arm11/iar/src/tx_thread_interrupt_disable.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,43 +36,37 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable ARM11/IAR */
-;/* 6.1 */
-;/* AUTHOR */
-;/* */
-;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
-;/**************************************************************************/
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable ARM11/IAR */
+;/* 6.1 */
+;/* AUTHOR */
+;/* */
+;/* William E. Lamie, Microsoft Corporation */
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
+;/* */
+;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(VOID)
;{
RSEG .text:CODE:NOROOT(2)
diff --git a/ports/arm11/iar/src/tx_thread_interrupt_restore.s b/ports/arm11/iar/src/tx_thread_interrupt_restore.s
index 28856151..4bc8e9c2 100644
--- a/ports/arm11/iar/src/tx_thread_interrupt_restore.s
+++ b/ports/arm11/iar/src/tx_thread_interrupt_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -28,44 +28,38 @@
;#include "tx_thread.h"
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore ARM11/IAR */
-;/* 6.1 */
-;/* AUTHOR */
-;/* */
-;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore ARM11/IAR */
+;/* 6.1 */
+;/* AUTHOR */
+;/* */
+;/* William E. Lamie, Microsoft Corporation */
+;/* */
+;/* DESCRIPTION */
+;/* */
;/* This function is responsible for restoring interrupts to the state */
;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
-;/**************************************************************************/
+;/* */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
+;/* */
+;/**************************************************************************/
;void _tx_thread_interrupt_restore(UINT old_posture)
;{
RSEG .text:CODE:NOROOT(2)
diff --git a/ports/arm11/iar/src/tx_thread_irq_nesting_end.s b/ports/arm11/iar/src/tx_thread_irq_nesting_end.s
index 7a7a3585..3695a57f 100644
--- a/ports/arm11/iar/src/tx_thread_irq_nesting_end.s
+++ b/ports/arm11/iar/src/tx_thread_irq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,57 +35,51 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
IRQ_MODE_BITS DEFINE 0x12 ; IRQ mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end ARM11/IAR */
-;/* 6.1 */
-;/* AUTHOR */
-;/* */
-;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
-;/**************************************************************************/
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end ARM11/IAR */
+;/* 6.1 */
+;/* AUTHOR */
+;/* */
+;/* William E. Lamie, Microsoft Corporation */
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
+;/* */
+;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
;{
RSEG .text:CODE:NOROOT(2)
diff --git a/ports/arm11/iar/src/tx_thread_irq_nesting_start.s b/ports/arm11/iar/src/tx_thread_irq_nesting_start.s
index b76d1ff6..e538ca1b 100644
--- a/ports/arm11/iar/src/tx_thread_irq_nesting_start.s
+++ b/ports/arm11/iar/src/tx_thread_irq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,50 +35,44 @@ MODE_MASK DEFINE 0x1F ; Mode mask
SYS_MODE_BITS DEFINE 0x1F ; System mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start ARM11/IAR */
-;/* 6.1 */
-;/* AUTHOR */
-;/* */
-;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
-;/**************************************************************************/
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start ARM11/IAR */
+;/* 6.1 */
+;/* AUTHOR */
+;/* */
+;/* William E. Lamie, Microsoft Corporation */
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
+;/* */
+;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
;{
RSEG .text:CODE:NOROOT(2)
diff --git a/ports/arm11/iar/src/tx_thread_schedule.s b/ports/arm11/iar/src/tx_thread_schedule.s
index 761ec21c..e4a4da47 100644
--- a/ports/arm11/iar/src/tx_thread_schedule.s
+++ b/ports/arm11/iar/src/tx_thread_schedule.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -43,47 +43,41 @@ ENABLE_INTS DEFINE 0x80 ; IRQ Interrupts enabled mask
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule ARM11/IAR */
-;/* 6.1 */
-;/* AUTHOR */
-;/* */
-;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule ARM11/IAR */
+;/* 6.1 */
+;/* AUTHOR */
+;/* */
+;/* William E. Lamie, Microsoft Corporation */
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
;/* None */
-;/* */
-;/* CALLS */
-;/* */
+;/* */
+;/* OUTPUT */
+;/* */
;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
-;/**************************************************************************/
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
+;/* */
+;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
;{
RSEG .text:CODE:NOROOT(2)
@@ -111,7 +105,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -120,7 +114,7 @@ __tx_thread_schedule_loop
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
;
- LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
STR r0, [r1, #0] ; Setup current thread pointer
;
; /* Increment the run count for this thread. */
@@ -134,7 +128,7 @@ __tx_thread_schedule_loop
; /* Setup time-slice, if present. */
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
;
- LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
+ LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
; variable
LDR sp, [r0, #8] ; Switch stack pointers
STR r3, [r2, #0] ; Setup time-slice
diff --git a/ports/arm11/iar/src/tx_thread_stack_build.s b/ports/arm11/iar/src/tx_thread_stack_build.s
index 4e32e1fa..13981a6c 100644
--- a/ports/arm11/iar/src/tx_thread_stack_build.s
+++ b/ports/arm11/iar/src/tx_thread_stack_build.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -37,58 +37,52 @@ CPSR_MASK DEFINE 0x9F ; Mask initial CPSR, IRQ ints en
#endif
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build ARM11/IAR */
-;/* 6.1 */
-;/* AUTHOR */
-;/* */
-;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build ARM11/IAR */
+;/* 6.1 */
+;/* AUTHOR */
+;/* */
+;/* William E. Lamie, Microsoft Corporation */
+;/* */
+;/* DESCRIPTION */
+;/* */
;/* This function builds a stack frame on the supplied thread's stack. */
;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
;/* thread_ptr Pointer to thread control blk */
;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
+;/* */
+;/* OUTPUT */
+;/* */
;/* None */
-;/* */
-;/* CALLS */
-;/* */
+;/* */
+;/* CALLS */
+;/* */
;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
+;/* */
+;/* CALLED BY */
+;/* */
;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
-;/**************************************************************************/
+;/* */
+;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
;{
RSEG .text:CODE:NOROOT(2)
PUBLIC _tx_thread_stack_build
-
+
CODE32
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the ARM9 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports/arm11/iar/src/tx_thread_system_return.s b/ports/arm11/iar/src/tx_thread_system_return.s
index c7042dfb..2bc395e0 100644
--- a/ports/arm11/iar/src/tx_thread_system_return.s
+++ b/ports/arm11/iar/src/tx_thread_system_return.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -42,46 +42,40 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return ARM11/IAR */
-;/* 6.1 */
-;/* AUTHOR */
-;/* */
-;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
-;/**************************************************************************/
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return ARM11/IAR */
+;/* 6.1 */
+;/* AUTHOR */
+;/* */
+;/* William E. Lamie, Microsoft Corporation */
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
+;/* */
+;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
;{
RSEG .text:CODE:NOROOT(2)
@@ -95,7 +89,7 @@ _tx_thread_system_return
MOV r0, #0 ; Build a solicited stack type
MRS r1, CPSR ; Pickup the CPSR
STMDB sp!, {r0-r1, r4-r11, lr} ; Save minimal context
-;
+;
; /* Lockout interrupts. */
;
ORR r2, r1, #DISABLE_INTS ; Build disable interrupt CPSR
diff --git a/ports/arm11/iar/src/tx_thread_vectored_context_save.s b/ports/arm11/iar/src/tx_thread_vectored_context_save.s
index e287b8a5..15598036 100644
--- a/ports/arm11/iar/src/tx_thread_vectored_context_save.s
+++ b/ports/arm11/iar/src/tx_thread_vectored_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -41,45 +41,39 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save ARM11/IAR */
-;/* 6.1 */
-;/* AUTHOR */
-;/* */
-;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
-;/**************************************************************************/
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save ARM11/IAR */
+;/* 6.1 */
+;/* AUTHOR */
+;/* */
+;/* William E. Lamie, Microsoft Corporation */
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
+;/* */
+;/**************************************************************************/
;VOID _tx_thread_vectored_context_save(VOID)
;{
RSEG .text:CODE:NOROOT(2)
@@ -139,7 +133,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -171,7 +165,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports/arm11/iar/src/tx_timer_interrupt.s b/ports/arm11/iar/src/tx_timer_interrupt.s
index 550bc007..13c26851 100644
--- a/ports/arm11/iar/src/tx_timer_interrupt.s
+++ b/ports/arm11/iar/src/tx_timer_interrupt.s
@@ -1,20 +1,20 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Timer */
;/** */
@@ -45,48 +45,42 @@
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt ARM11/IAR */
-;/* 6.1 */
-;/* AUTHOR */
-;/* */
-;/* William E. Lamie, Microsoft Corporation */
-;/* */
-;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time-slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
-;/**************************************************************************/
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt ARM11/IAR */
+;/* 6.1 */
+;/* AUTHOR */
+;/* */
+;/* William E. Lamie, Microsoft Corporation */
+;/* */
+;/* DESCRIPTION */
+;/* */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time-slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
+;/* */
+;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
;{
RSEG .text:CODE:NOROOT(2)
@@ -110,7 +104,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -228,13 +222,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports/arm9/ac5/example_build/sample_threadx.c b/ports/arm9/ac5/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/arm9/ac5/example_build/sample_threadx.c
+++ b/ports/arm9/ac5/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/arm9/ac5/example_build/tx_initialize_low_level.s b/ports/arm9/ac5/example_build/tx_initialize_low_level.s
index f2420967..49dd2736 100644
--- a/ports/arm9/ac5/example_build/tx_initialize_low_level.s
+++ b/ports/arm9/ac5/example_build/tx_initialize_low_level.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -41,7 +41,7 @@ SYS_STACK_SIZE EQU 1024 ; SYS stack size (used for neste
IRQ_STACK_SIZE EQU 1024 ; IRQ stack size
;
;
-;/* ARM9 ARMulator Timer and Interrupt controller information. This depends on
+;/* ARM9 ARMulator Timer and Interrupt controller information. This depends on
; the ARMulator's Interrupt Controller and Timer being enabled in the default.ami.
; In addition, the addresses must match those specified in the peripherals.ami file.
; Please refer to section 2.10 and 4.16 of the Debug Target Guide, version 1.2. */
@@ -50,7 +50,7 @@ IRQStatus EQU 0x0a000000 ; IRQ Status Register
IRQRawStatus EQU 0x0a000004 ; IRQ Raw Status Register
IRQEnable EQU 0x0a000008 ; IRQ Enable Set Register
IRQEnableClear EQU 0x0a00000C ; IRQ Enable Clear Register
-IRQSoft EQU 0x0a000010 ; IRQ Soft
+IRQSoft EQU 0x0a000010 ; IRQ Soft
FIQStatus EQU 0x0a000100 ; FIQ Status Register
FIQRawStatus EQU 0x0a000104 ; FIQ Raw Status Register
FIQEnable EQU 0x0a000108 ; FIQ Enable Set Register
@@ -113,45 +113,39 @@ __vectors
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level ARM9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level ARM9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -202,7 +196,7 @@ _tx_initialize_low_level
; _tx_thread_system_stack_ptr = (VOID_PTR) (sp);
;
LDR r1, =_tx_thread_system_stack_ptr ; Pickup address of system stack ptr
- LDR r0, [r1, #0] ; Pickup system stack
+ LDR r0, [r1, #0] ; Pickup system stack
ADD r0, r0, #4 ; Increment to next free word
;
; /* Save the first available memory address. */
@@ -238,7 +232,7 @@ _tx_initialize_low_level
;
;
;/* Define initial heap/stack routine for the ARM RealView (and ADS) startup code. This
-; routine will set the initial stack to use the ThreadX IRQ & FIQ &
+; routine will set the initial stack to use the ThreadX IRQ & FIQ &
; (optionally SYS) stack areas. */
;
EXPORT __user_initial_stackheap
@@ -290,7 +284,7 @@ __tx_reserved_handler
;
;
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -298,34 +292,34 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
; /* Check for Timer1 interrupts on the ARMulator. */
LDR r1,=IRQStatus ; Pickup address of IRQStatus register
- LDR r2, [r1] ; Read IRQStatus
+ LDR r2, [r1] ; Read IRQStatus
LDR r0,=TIMER1_BIT ; Pickup Timer1 interrupt present bit
AND r2, r2, r0 ; Is this a timer interrupt?
- CMP r2, r0 ;
+ CMP r2, r0 ;
BNE _tx_not_timer_interrupt ; If 0, not a timer interrupt
LDR r1,=Timer1Clear ; Build address of Timer1 clear register
- MOV r0,#0 ;
+ MOV r0,#0 ;
STR r0, [r1] ; Clear timer 0 interrupt
BL _tx_timer_interrupt ; Timer interrupt handler
_tx_not_timer_interrupt
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -335,7 +329,7 @@ _tx_not_timer_interrupt
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -351,28 +345,28 @@ _tx_not_timer_interrupt
__tx_example_vectored_irq_handler
;
;
-; /* Save initial context and call context save to prepare for
+; /* Save initial context and call context save to prepare for
; vectored ISR execution. */
;
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
; BL _tx_thread_vectored_context_save ; Vectored context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -381,7 +375,7 @@ __tx_example_vectored_irq_handler
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
@@ -403,11 +397,11 @@ __tx_fiq_processing_return
; /* At this point execution is still in the FIQ mode. The CPSR, point of
; interrupt, and all C scratch registers are available for use. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
; from FIQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with FIQ interrupts enabled.
+; system mode and returns with FIQ interrupts enabled.
;
-; NOTE: It is very important to ensure all FIQ interrupts are cleared
+; NOTE: It is very important to ensure all FIQ interrupts are cleared
; prior to enabling nested FIQ interrupts. */
IF :DEF:TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/arm9/ac5/inc/tx_port.h b/ports/arm9/ac5/inc/tx_port.h
index 02324827..e9dc6430 100644
--- a/ports/arm9/ac5/inc/tx_port.h
+++ b/ports/arm9/ac5/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h ARM9/AC5 */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h ARM9/AC5 */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -75,7 +67,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -111,12 +103,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -126,8 +118,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -174,7 +166,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -186,13 +178,13 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
-#define TX_THREAD_EXTENSION_2
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -206,11 +198,11 @@ typedef unsigned short USHORT;
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -218,8 +210,8 @@ typedef unsigned short USHORT;
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -246,24 +238,24 @@ typedef unsigned short USHORT;
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
-
+
#if __TARGET_ARCH_ARM > 4
#ifndef __thumb
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (ULONG) __clz((unsigned int) m); \
- b = 31 - b;
+ b = 31 - b;
#endif
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -282,7 +274,7 @@ typedef unsigned short USHORT;
{ \
__enable_irq(); \
__enable_fiq(); \
- }
+ }
#else
@@ -291,7 +283,7 @@ typedef unsigned short USHORT;
#define TX_RESTORE if (!interrupt_save_disabled) \
{ \
__enable_irq(); \
- }
+ }
#endif
#else
@@ -320,8 +312,8 @@ unsigned int _tx_thread_interrupt_restore(UINT old_posture);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARM9/AC5 Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM9/AC5 Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/arm9/ac5/readme_threadx.txt b/ports/arm9/ac5/readme_threadx.txt
index f07ea494..4b455fa2 100644
--- a/ports/arm9/ac5/readme_threadx.txt
+++ b/ports/arm9/ac5/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for ARM9
+ Microsoft's Azure RTOS ThreadX for ARM9
Thumb & 32-bit Mode
@@ -6,15 +6,15 @@
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the ARM
-AC5 development environment. At this point you may run the build_threadx.bat
-batch file. This will build the ThreadX run-time environment in the
-"example_build" directory.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the ARM
+AC5 development environment. At this point you may run the build_threadx.bat
+batch file. This will build the ThreadX run-time environment in the
+"example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
@@ -23,39 +23,39 @@ application in order to use ThreadX.
The ThreadX demonstration is designed to execute under the ARM
Windows-based simulator.
-Building the demonstration is easy; simply execute the build_threadx_demo.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_demo.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.axf
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.axf
is a binary file that can be downloaded and executed on the ARM simulator.
3. System Initialization
-The entry point in ThreadX for the ARM9 using AC5 tools is at label
-__main. This is defined within the AC5 compiler's startup code. In
-addition, this is where all static and global pre-set C variable
+The entry point in ThreadX for the ARM9 using AC5 tools is at label
+__main. This is defined within the AC5 compiler's startup code. In
+addition, this is where all static and global pre-set C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source. By default, the vector area is defined to be located in the Init area,
-which is defined at the top of tx_initialize_low_level.s. This area is typically
-located at 0. In situations where this is impossible, the vectors at the beginning
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source. By default, the vector area is defined to be located in the Init area,
+which is defined at the top of tx_initialize_low_level.s. This area is typically
+located at 0. In situations where this is impossible, the vectors at the beginning
of the Init area should be copied to address 0.
This is also where initialization of a periodic timer interrupt source
should take place.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
4. Assembler / Compiler Switches
-The following are compiler switches used in building the demonstration
+The following are compiler switches used in building the demonstration
system:
Compiler Switch Meaning
@@ -71,10 +71,10 @@ Linker Switch Meaning
-o demo.axf Specifies demo output file name
--elf Specifies elf output file format
--ro Specifies that Read-Only memory starts at address 0
- --first tx_initialize_low_level.o(Init)
+ --first tx_initialize_low_level.o(Init)
Specifies that the first area loaded is Init
--remove Remove unused areas
- --list Specifies map file name
+ --list Specifies map file name
--symbols Specifies symbols for map file
--map Creates a map file
@@ -85,161 +85,161 @@ Application Defines
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
--PD "TX_ENABLE_IRQ_NESTING SETL {TRUE}" This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s.
--PD "TX_ENABLE_FIQ_NESTING SETL {TRUE}" This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s. In addition,
IRQ nesting should also be enabled.
-DTX_ENABLE_FIQ_SUPPORT This compiler define enables FIQ
interrupt handling in the ThreadX
- generic C source. This define
+ generic C source. This define
should also be used in conjunction
with the corresponding assembler
- define.
+ define.
-DTX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- -DTX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ -DTX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- -DTX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ -DTX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- -DTX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ -DTX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- -DTX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ -DTX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- -DTX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ -DTX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- -DTX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ -DTX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- -DTX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ -DTX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- -DTX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ -DTX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- -DTX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ -DTX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- -DTX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ -DTX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- -DTX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ -DTX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- -DTX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ -DTX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- -DTX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ -DTX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- -DTX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ -DTX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- -DTX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ -DTX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- -DTX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ -DTX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- -DTX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ -DTX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- -DTX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ -DTX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- -DTX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ -DTX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
-DTX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- -DTX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ -DTX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- -DTX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ -DTX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
5. Register Usage and Stack Frames
-The AC5 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The AC5 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -257,39 +257,39 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
-performance. To make it run faster, you can change the build_threadx.bat file to
-remove the -g option and enable all compiler optimizations.
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
+performance. To make it run faster, you can change the build_threadx.bat file to
+remove the -g option and enable all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for ARM9
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The ARM9 vectors start at address zero. The demonstration system startup
-Init area contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+Init area contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -300,12 +300,12 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -313,7 +313,7 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -326,7 +326,7 @@ __tx_irq_processing_return
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.s:
EXPORT __tx_irq_example_handler
@@ -336,12 +336,12 @@ __tx_irq_example_handler
STMDB sp!, {r0-r3} ; Save some scratch registers
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
BL _tx_thread_vectored_context_save ; Call the vectored IRQ context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -358,22 +358,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested IRQ interrupts are no longer required,
calling the _tx_thread_irq_nesting_end service disables nesting by disabling
-IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
+IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -381,10 +381,10 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* Enable nested IRQ interrupts. NOTE: Since this service returns
-; with IRQ interrupts enabled, all IRQ interrupt sources must be
+; with IRQ interrupts enabled, all IRQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-;
+;
; /* Application ISR call(s) go here! */
;
; /* Disable nested IRQ interrupts. The mode is switched back to
@@ -397,12 +397,12 @@ __tx_irq_processing_return
7.3 FIQ Interrupts
-By default, ARM9 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, ARM9 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -411,7 +411,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.s.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.s:
@@ -439,18 +439,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -466,7 +466,7 @@ __tx_fiq_processing_return
; interrupt, and all C scratch registers are available for use. */
;
; /* Enable nested FIQ interrupts. NOTE: Since this service returns
-; with FIQ interrupts enabled, all FIQ interrupt sources must be
+; with FIQ interrupts enabled, all FIQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
;
@@ -482,22 +482,22 @@ __tx_fiq_processing_return
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.s in the Integrator sub-directories.
9. Thumb/ARM9 Mixed Mode
-By default, ThreadX is setup for running in ARM9 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
+By default, ThreadX is setup for running in ARM9 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
ThreadX file and/or the application in Thumb mode. The only exception
-to this is the file tx_thread_shell_entry.c. This file must always be built
+to this is the file tx_thread_shell_entry.c. This file must always be built
in 32-bit mode. In addition, if any Thumb code is used the entire ThreadX source-
both C and assembly - should be built with the "-apcs /interwork" option.
diff --git a/ports/arm9/ac5/src/tx_thread_context_restore.s b/ports/arm9/ac5/src/tx_thread_context_restore.s
index ff4f3324..a1eaf668 100644
--- a/ports/arm9/ac5/src/tx_thread_context_restore.s
+++ b/ports/arm9/ac5/src/tx_thread_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -37,7 +37,7 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
THUMB_MASK EQU 0x20 ; Thumb bit mask
SVC_MODE_BITS EQU 0x13 ; SVC mode value
;
@@ -55,44 +55,38 @@ SVC_MODE_BITS EQU 0x13 ; SVC mode value
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore ARM9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore ARM9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -120,13 +114,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3, #0] ; Store the counter
+ STR r2, [r3, #0] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
diff --git a/ports/arm9/ac5/src/tx_thread_context_save.s b/ports/arm9/ac5/src/tx_thread_context_save.s
index 6e7963bf..d78110be 100644
--- a/ports/arm9/ac5/src/tx_thread_context_save.s
+++ b/ports/arm9/ac5/src/tx_thread_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -45,43 +45,37 @@ DISABLE_INTS EQU 0x80 ; IRQ interrupts disabled
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save ARM9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save ARM9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
@@ -96,7 +90,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
IF :DEF:TX_ENABLE_FIQ_SUPPORT
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt CPSR
@@ -116,7 +110,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -132,7 +126,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -146,13 +140,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -172,7 +166,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -182,7 +176,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -197,7 +191,7 @@ __tx_thread_idle_system_save
ENDIF
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports/arm9/ac5/src/tx_thread_fiq_context_restore.s b/ports/arm9/ac5/src/tx_thread_fiq_context_restore.s
index 906b9bd1..fc6e01bb 100644
--- a/ports/arm9/ac5/src/tx_thread_fiq_context_restore.s
+++ b/ports/arm9/ac5/src/tx_thread_fiq_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -37,7 +37,7 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
THUMB_MASK EQU 0x20 ; Thumb bit mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
SVC_MODE_BITS EQU 0x13 ; SVC mode value
@@ -57,44 +57,38 @@ SVC_MODE_BITS EQU 0x13 ; SVC mode value
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_restore ARM9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_restore ARM9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the fiq interrupt context when processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* FIQ ISR Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the fiq interrupt context when processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* FIQ ISR Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_context_restore(VOID)
@@ -122,13 +116,13 @@ _tx_thread_fiq_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -172,7 +166,7 @@ __tx_thread_fiq_no_preempt_restore
; /* Restore interrupted thread or ISR. */
;
; /* Pickup the saved stack pointer. */
-; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
+; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
;
; /* Recover the saved context and return to the point of interrupt. */
;
@@ -219,7 +213,7 @@ __tx_thread_fiq_preempt_restore
BEQ __tx_thread_fiq_dont_save_ts ; No, don't save it
;
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-; _tx_timer_time_slice = 0;
+; _tx_timer_time_slice = 0;
;
STR r2, [r0, #24] ; Save thread's time-slice
MOV r2, #0 ; Clear value
diff --git a/ports/arm9/ac5/src/tx_thread_fiq_context_save.s b/ports/arm9/ac5/src/tx_thread_fiq_context_save.s
index 93be71d7..da963065 100644
--- a/ports/arm9/ac5/src/tx_thread_fiq_context_save.s
+++ b/ports/arm9/ac5/src/tx_thread_fiq_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -39,43 +39,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_save ARM9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_save ARM9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
; VOID _tx_thread_fiq_context_save(VOID)
@@ -90,7 +84,7 @@ _tx_thread_fiq_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -105,7 +99,7 @@ _tx_thread_fiq_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -121,38 +115,38 @@ _tx_thread_fiq_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
__tx_thread_fiq_not_nested_save
-; }
+; }
;
; /* Otherwise, not nested, check to see if a thread was running. */
; else if (_tx_thread_current_ptr)
-; {
+; {
;
ADD r2, r2, #1 ; Increment the interrupt counter
STR r2, [r3] ; Store it back in the variable
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
-; ; scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
+; ; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, lr} ; Store other registers, Note that we don't
-; ; need to save sl and ip since FIQ has
-; ; copies of these registers. Nested
+; ; need to save sl and ip since FIQ has
+; ; copies of these registers. Nested
; ; interrupt processing does need to save
; ; these registers.
;
; /* Save the current stack pointer in the thread's control block. */
-; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
;
; /* Switch to the system stack. */
-; sp = _tx_thread_system_stack_ptr;
+; sp = _tx_thread_system_stack_ptr;
;
MOV r10, #0 ; Clear stack limit
@@ -165,7 +159,7 @@ __tx_thread_fiq_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
; else
@@ -185,18 +179,18 @@ __tx_thread_fiq_idle_system_save
ENDIF
;
; /* Not much to do here, save the current SPSR and LR for possible
-; use in IRQ interrupted in idle system conditions, and return to
+; use in IRQ interrupted in idle system conditions, and return to
; FIQ interrupt processing. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, lr} ; Store other registers that will get used
-; ; or stripped off the stack in context
-; ; restore
- B __tx_fiq_processing_return ; Continue FIQ processing
+; ; or stripped off the stack in context
+; ; restore
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
-;}
+;}
;
END
diff --git a/ports/arm9/ac5/src/tx_thread_fiq_nesting_end.s b/ports/arm9/ac5/src/tx_thread_fiq_nesting_end.s
index ee8484ce..e34c5be6 100644
--- a/ports/arm9/ac5/src/tx_thread_fiq_nesting_end.s
+++ b/ports/arm9/ac5/src/tx_thread_fiq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
FIQ_MODE_BITS EQU 0x11 ; FIQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_end ARM9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_end ARM9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-;/* processing from system mode back to FIQ mode prior to the ISR */
-;/* calling _tx_thread_fiq_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+;/* processing from system mode back to FIQ mode prior to the ISR */
+;/* calling _tx_thread_fiq_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_fiq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_cxsf, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #FIQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/arm9/ac5/src/tx_thread_fiq_nesting_start.s b/ports/arm9/ac5/src/tx_thread_fiq_nesting_start.s
index e2e9435b..4b17fee9 100644
--- a/ports/arm9/ac5/src/tx_thread_fiq_nesting_start.s
+++ b/ports/arm9/ac5/src/tx_thread_fiq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_start ARM9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_start ARM9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-;/* processing to the system mode so nested FIQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+;/* processing to the system mode so nested FIQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/arm9/ac5/src/tx_thread_interrupt_control.s b/ports/arm9/ac5/src/tx_thread_interrupt_control.s
index b9a99e0c..14c4e4f7 100644
--- a/ports/arm9/ac5/src/tx_thread_interrupt_control.s
+++ b/ports/arm9/ac5/src/tx_thread_interrupt_control.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,42 +36,36 @@ INT_MASK EQU 0x80 ; Interrupt bit mask
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control ARM9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control ARM9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/arm9/ac5/src/tx_thread_interrupt_disable.s b/ports/arm9/ac5/src/tx_thread_interrupt_disable.s
index 01e85f7f..a5d83435 100644
--- a/ports/arm9/ac5/src/tx_thread_interrupt_disable.s
+++ b/ports/arm9/ac5/src/tx_thread_interrupt_disable.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,41 +36,35 @@ DISABLE_INTS EQU 0x80 ; IRQ interrupts disabled
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable ARM9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable ARM9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(void)
diff --git a/ports/arm9/ac5/src/tx_thread_interrupt_restore.s b/ports/arm9/ac5/src/tx_thread_interrupt_restore.s
index 638d1d0d..d88578a8 100644
--- a/ports/arm9/ac5/src/tx_thread_interrupt_restore.s
+++ b/ports/arm9/ac5/src/tx_thread_interrupt_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -29,42 +29,36 @@
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore ARM9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore ARM9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function is responsible for restoring interrupts to the state */
;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/arm9/ac5/src/tx_thread_irq_nesting_end.s b/ports/arm9/ac5/src/tx_thread_irq_nesting_end.s
index 032d4dcc..622288db 100644
--- a/ports/arm9/ac5/src/tx_thread_irq_nesting_end.s
+++ b/ports/arm9/ac5/src/tx_thread_irq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end ARM9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end ARM9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_irq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_cxsf, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #IRQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/arm9/ac5/src/tx_thread_irq_nesting_start.s b/ports/arm9/ac5/src/tx_thread_irq_nesting_start.s
index 3da96c71..7cd3cd98 100644
--- a/ports/arm9/ac5/src/tx_thread_irq_nesting_start.s
+++ b/ports/arm9/ac5/src/tx_thread_irq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start ARM9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start ARM9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/arm9/ac5/src/tx_thread_schedule.s b/ports/arm9/ac5/src/tx_thread_schedule.s
index 23b678e2..20fa4d41 100644
--- a/ports/arm9/ac5/src/tx_thread_schedule.s
+++ b/ports/arm9/ac5/src/tx_thread_schedule.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -47,45 +47,39 @@ ENABLE_INTS EQU 0x80 ; IRQ Interrupts enabled mask
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule ARM9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule ARM9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
@@ -112,7 +106,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -121,7 +115,7 @@ __tx_thread_schedule_loop
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
;
- LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
STR r0, [r1, #0] ; Setup current thread pointer
;
; /* Increment the run count for this thread. */
@@ -135,7 +129,7 @@ __tx_thread_schedule_loop
; /* Setup time-slice, if present. */
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
;
- LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
+ LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
; variable
LDR sp, [r0, #8] ; Switch stack pointers
STR r3, [r2, #0] ; Setup time-slice
diff --git a/ports/arm9/ac5/src/tx_thread_stack_build.s b/ports/arm9/ac5/src/tx_thread_stack_build.s
index 2ca47eb6..a286e896 100644
--- a/ports/arm9/ac5/src/tx_thread_stack_build.s
+++ b/ports/arm9/ac5/src/tx_thread_stack_build.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -38,44 +38,38 @@ CPSR_MASK EQU 0x9F ; Mask initial CPSR, IRQ ints en
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build ARM9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build ARM9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function builds a stack frame on the supplied thread's stack. */
;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
;/* thread_ptr Pointer to thread control blk */
;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -83,10 +77,10 @@ CPSR_MASK EQU 0x9F ; Mask initial CPSR, IRQ ints en
EXPORT _tx_thread_stack_build
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the ARM9 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports/arm9/ac5/src/tx_thread_system_return.s b/ports/arm9/ac5/src/tx_thread_system_return.s
index bf9f1735..83a54a0f 100644
--- a/ports/arm9/ac5/src/tx_thread_system_return.s
+++ b/ports/arm9/ac5/src/tx_thread_system_return.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -40,50 +40,44 @@ DISABLE_INTS EQU 0x80 ; IRQ interrupts disabled
IMPORT _tx_timer_time_slice
IMPORT _tx_thread_schedule
IF :DEF:TX_ENABLE_EXECUTION_CHANGE_NOTIFY
- IMPORT _tx_execution_thread_exit
+ IMPORT _tx_execution_thread_exit
ENDIF
;
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return ARM9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return ARM9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
@@ -96,7 +90,7 @@ _tx_thread_system_return
MOV r0, #0 ; Build a solicited stack type
MRS r1, CPSR ; Pickup the CPSR
STMDB sp!, {r0-r1, r4-r11, lr} ; Save minimal context
-;
+;
; /* Lockout interrupts. */
;
ORR r2, r1, #DISABLE_INTS ; Build disable interrupt CPSR
diff --git a/ports/arm9/ac5/src/tx_thread_vectored_context_save.s b/ports/arm9/ac5/src/tx_thread_vectored_context_save.s
index ede3ec49..a9283702 100644
--- a/ports/arm9/ac5/src/tx_thread_vectored_context_save.s
+++ b/ports/arm9/ac5/src/tx_thread_vectored_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -45,43 +45,37 @@ DISABLE_INTS EQU 0x80 ; IRQ interrupts disabled
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save ARM9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save ARM9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_vectored_context_save(VOID)
@@ -144,7 +138,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -180,7 +174,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports/arm9/ac5/src/tx_timer_interrupt.s b/ports/arm9/ac5/src/tx_timer_interrupt.s
index 061c5806..86ddba6f 100644
--- a/ports/arm9/ac5/src/tx_timer_interrupt.s
+++ b/ports/arm9/ac5/src/tx_timer_interrupt.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Timer */
;/** */
@@ -44,46 +44,40 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt ARM9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt ARM9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -107,7 +101,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -225,13 +219,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports/arm9/gnu/example_build/crt0.S b/ports/arm9/gnu/example_build/crt0.S
index aa0f3239..56b6c958 100644
--- a/ports/arm9/gnu/example_build/crt0.S
+++ b/ports/arm9/gnu/example_build/crt0.S
@@ -26,13 +26,13 @@ _mainCRTStartup:
mov a2, #0 /* Second arg: fill value */
mov fp, a2 /* Null frame pointer */
mov r7, a2 /* Null frame pointer for Thumb */
-
- ldr a1, .LC1 /* First arg: start of memory block */
- ldr a3, .LC2
- sub a3, a3, a1 /* Third arg: length of block */
-
-
+ ldr a1, .LC1 /* First arg: start of memory block */
+ ldr a3, .LC2
+ sub a3, a3, a1 /* Third arg: length of block */
+
+
+
bl memset
mov r0, #0 /* no arguments */
mov r1, #0 /* no argv either */
@@ -48,15 +48,15 @@ _mainCRTStartup:
/* bl init */
mov r0, r4
mov r1, r5
-#endif
+#endif
bl main
bl exit /* Should not return. */
-
- /* For Thumb, constants must be after the code since only
+
+ /* For Thumb, constants must be after the code since only
positive offsets are supported for PC relative addresses. */
-
+
.align 0
.LC0:
.LC1:
diff --git a/ports/arm9/gnu/example_build/reset.S b/ports/arm9/gnu/example_build/reset.S
index a11c826a..5d05258b 100644
--- a/ports/arm9/gnu/example_build/reset.S
+++ b/ports/arm9/gnu/example_build/reset.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Initialize */
@/** */
@@ -65,11 +65,11 @@ SWI:
.word __tx_swi_interrupt @ Software interrupt handler
PREFETCH:
.word __tx_prefetch_handler @ Prefetch exception handler
-ABORT:
+ABORT:
.word __tx_abort_handler @ Abort exception handler
-RESERVED:
+RESERVED:
.word __tx_reserved_handler @ Reserved exception handler
-IRQ:
+IRQ:
.word __tx_irq_handler @ IRQ interrupt handler
FIQ:
.word __tx_fiq_handler @ FIQ interrupt handler
diff --git a/ports/arm9/gnu/example_build/sample_threadx.c b/ports/arm9/gnu/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/arm9/gnu/example_build/sample_threadx.c
+++ b/ports/arm9/gnu/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/arm9/gnu/example_build/sample_threadx.ld b/ports/arm9/gnu/example_build/sample_threadx.ld
index 3dea4e1c..e940b2b8 100644
--- a/ports/arm9/gnu/example_build/sample_threadx.ld
+++ b/ports/arm9/gnu/example_build/sample_threadx.ld
@@ -7,7 +7,7 @@ OUTPUT_ARCH(arm)
SECTIONS
{
. = 0x00000000;
-
+
.vectors : {reset.o(.text) }
/* Read-only sections, merged into text segment: */
@@ -94,8 +94,8 @@ SECTIONS
*(.gnu.linkonce.t*)
*(.glue_7t) *(.glue_7)
} =0
- .init :
- {
+ .init :
+ {
KEEP (*(.init))
} =0
_etext = .;
@@ -120,7 +120,7 @@ SECTIONS
.data1 : { *(.data1) }
.eh_frame : { KEEP (*(.eh_frame)) }
.gcc_except_table : { *(.gcc_except_table) }
- .ctors :
+ .ctors :
{
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
@@ -153,9 +153,9 @@ SECTIONS
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata :
+ .sdata :
{
- *(.sdata)
+ *(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
}
@@ -191,7 +191,7 @@ SECTIONS
_stack_bottom = ABSOLUTE(.) ;
- /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
+ /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
SYS stack if nested interrupts are enabled. */
. = ALIGN(8) ;
. += 4096 ;
diff --git a/ports/arm9/gnu/example_build/tx_initialize_low_level.S b/ports/arm9/gnu/example_build/tx_initialize_low_level.S
index 1f2207ec..6b6da2ab 100644
--- a/ports/arm9/gnu/example_build/tx_initialize_low_level.S
+++ b/ports/arm9/gnu/example_build/tx_initialize_low_level.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Initialize */
@/** */
@@ -62,7 +62,7 @@ SYS_STACK_SIZE = 1024 @ System stack size
.type $_tx_initialize_low_level,function
$_tx_initialize_low_level:
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_initialize_low_level @ Call _tx_initialize_low_level function
@@ -72,45 +72,39 @@ $_tx_initialize_low_level:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_initialize_low_level ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_initialize_low_level ARM9/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is responsible for any low-level processor */
-@/* initialization, including setting up interrupt vectors, setting */
-@/* up a periodic timer interrupt source, saving the system stack */
-@/* pointer for use in ISR processing later, and finding the first */
-@/* available RAM memory address for tx_application_define. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* _tx_initialize_kernel_enter ThreadX entry function */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is responsible for any low-level processor */
+@/* initialization, including setting up interrupt vectors, setting */
+@/* up a periodic timer interrupt source, saving the system stack */
+@/* pointer for use in ISR processing later, and finding the first */
+@/* available RAM memory address for tx_application_define. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* _tx_initialize_kernel_enter ThreadX entry function */
@/* */
@/**************************************************************************/
@VOID _tx_initialize_low_level(VOID)
@@ -125,7 +119,7 @@ _tx_initialize_low_level:
@
LDR r1, =_sp @ Get pointer to stack area
-#ifdef TX_ENABLE_IRQ_NESTING
+#ifdef TX_ENABLE_IRQ_NESTING
@
@ /* Setup the system mode stack for nested interrupt support */
@
@@ -156,7 +150,7 @@ _tx_initialize_low_level:
MSR CPSR, r0 @ Enter SVC mode
LDR r2, =_stack_bottom @ Pickup stack bottom
CMP r3, r2 @ Compare the current stack end with the bottom
-_stack_error_loop:
+_stack_error_loop:
BLT _stack_error_loop @ If the IRQ stack exceeds the stack bottom, just sit here!
@
@ /* Save the system stack pointer. */
@@ -208,7 +202,7 @@ __tx_reserved_handler:
B __tx_reserved_handler @ Reserved exception handler
@
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -216,17 +210,17 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. In
+@ interrupt, and all C scratch registers are available for use. In
@ addition, IRQ interrupts may be re-enabled - with certain restrictions -
@ if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-@ small code sequences where lr is saved before enabling interrupts and
+@ small code sequences where lr is saved before enabling interrupts and
@ restored after interrupts are again disabled. */
@
-@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
@ from IRQ mode with interrupts disabled. This routine switches to the
-@ system mode and returns with IRQ interrupts enabled.
-@
-@ NOTE: It is very important to ensure all IRQ interrupts are cleared
+@ system mode and returns with IRQ interrupts enabled.
+@
+@ NOTE: It is very important to ensure all IRQ interrupts are cleared
@ prior to enabling nested IRQ interrupts. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -240,7 +234,7 @@ __tx_irq_processing_return:
@
@
@ /* If interrupt nesting was started earlier, the end of interrupt nesting
-@ service must be called before returning to _tx_thread_context_restore.
+@ service must be called before returning to _tx_thread_context_restore.
@ This routine returns in processing in IRQ mode with interrupts disabled. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -256,28 +250,28 @@ __tx_irq_processing_return:
@__tx_example_vectored_irq_handler:
@
@
-@ /* Save initial context and call context save to prepare for
+@ /* Save initial context and call context save to prepare for
@ vectored ISR execution. */
@
@ STMDB sp!, {r0-r3} @ Save some scratch registers
@ MRS r0, SPSR @ Pickup saved SPSR
-@ SUB lr, lr, #4 @ Adjust point of interrupt
+@ SUB lr, lr, #4 @ Adjust point of interrupt
@ STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
@ BL _tx_thread_vectored_context_save @ Vectored context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. In
+@ interrupt, and all C scratch registers are available for use. In
@ addition, IRQ interrupts may be re-enabled - with certain restrictions -
@ if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-@ small code sequences where lr is saved before enabling interrupts and
+@ small code sequences where lr is saved before enabling interrupts and
@ restored after interrupts are again disabled. */
@
@
-@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
@ from IRQ mode with interrupts disabled. This routine switches to the
-@ system mode and returns with IRQ interrupts enabled.
-@
-@ NOTE: It is very important to ensure all IRQ interrupts are cleared
+@ system mode and returns with IRQ interrupts enabled.
+@
+@ NOTE: It is very important to ensure all IRQ interrupts are cleared
@ prior to enabling nested IRQ interrupts. */
@#ifdef TX_ENABLE_IRQ_NESTING
@ BL _tx_thread_irq_nesting_start
@@ -286,7 +280,7 @@ __tx_irq_processing_return:
@ /* Application IRQ handlers can be called here! */
@
@ /* If interrupt nesting was started earlier, the end of interrupt nesting
-@ service must be called before returning to _tx_thread_context_restore.
+@ service must be called before returning to _tx_thread_context_restore.
@ This routine returns in processing in IRQ mode with interrupts disabled. */
@#ifdef TX_ENABLE_IRQ_NESTING
@ BL _tx_thread_irq_nesting_end
@@ -308,11 +302,11 @@ __tx_fiq_processing_return:
@ /* At this point execution is still in the FIQ mode. The CPSR, point of
@ interrupt, and all C scratch registers are available for use. */
@
-@ /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+@ /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
@ from FIQ mode with interrupts disabled. This routine switches to the
-@ system mode and returns with FIQ interrupts enabled.
+@ system mode and returns with FIQ interrupts enabled.
@
-@ NOTE: It is very important to ensure all FIQ interrupts are cleared
+@ NOTE: It is very important to ensure all FIQ interrupts are cleared
@ prior to enabling nested FIQ interrupts. */
#ifdef TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/arm9/gnu/inc/tx_port.h b/ports/arm9/gnu/inc/tx_port.h
index bc52ebe7..4597b252 100644
--- a/ports/arm9/gnu/inc/tx_port.h
+++ b/ports/arm9/gnu/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h ARM9/GNU */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h ARM9/GNU */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -75,7 +67,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -111,12 +103,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -126,8 +118,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -174,7 +166,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -186,13 +178,13 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
-#define TX_THREAD_EXTENSION_2
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -206,11 +198,11 @@ typedef unsigned short USHORT;
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -218,8 +210,8 @@ typedef unsigned short USHORT;
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -246,24 +238,24 @@ typedef unsigned short USHORT;
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
-
+
#if __TARGET_ARCH_ARM > 4
#ifndef __thumb__
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
asm volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) ); \
- b = 31 - b;
+ b = 31 - b;
#endif
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -307,8 +299,8 @@ unsigned int _tx_thread_interrupt_restore(UINT old_posture);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARM9/GNU Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM9/GNU Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/arm9/gnu/readme_threadx.txt b/ports/arm9/gnu/readme_threadx.txt
index 54046146..6f90b254 100644
--- a/ports/arm9/gnu/readme_threadx.txt
+++ b/ports/arm9/gnu/readme_threadx.txt
@@ -1,55 +1,55 @@
- Microsoft's Azure RTOS ThreadX for ARM9
+ Microsoft's Azure RTOS ThreadX for ARM9
Using the GNU Tools
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the GNU
-development environment.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the GNU
+development environment.
-At this point you may run the build_threadx.bat batch file. This will build the
-ThreadX run-time environment in the "example_build" directory.
+At this point you may run the build_threadx.bat batch file. This will build the
+ThreadX run-time environment in the "example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: TX.A. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: TX.A. This file must be linked with your
application in order to use ThreadX.
2. Demonstration System
-Building the demonstration is easy; simply execute the build_threadx_sample.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_sample.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with TX.A. The resulting file DEMO is a binary file
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with TX.A. The resulting file DEMO is a binary file
that can be downloaded and executed.
3. System Initialization
-The entry point in ThreadX for the ARM9 using GNU tools is at label _start.
+The entry point in ThreadX for the ARM9 using GNU tools is at label _start.
This is defined within the modified version of the GNU startup code - crt0.S.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up various
-system data structures, the interrupt vectors, and a periodic timer interrupt source.
-By default, the vector area is defined to be located at the "__vectors" label,
-which is defined in reset.S. This area is typically located at 0. In situations
-where this is impossible, the vectors at the "__vectors" label should be copied
+The ThreadX tx_initialize_low_level.S file is responsible for setting up various
+system data structures, the interrupt vectors, and a periodic timer interrupt source.
+By default, the vector area is defined to be located at the "__vectors" label,
+which is defined in reset.S. This area is typically located at 0. In situations
+where this is impossible, the vectors at the "__vectors" label should be copied
to address 0.
-This is also where initialization of a periodic timer interrupt source should take
+This is also where initialization of a periodic timer interrupt source should take
place.
-In addition, _tx_initialize_low_level defines the first available address
-for use by the application, which is supplied as the sole input parameter
+In addition, _tx_initialize_low_level defines the first available address
+for use by the application, which is supplied as the sole input parameter
to your application definition function, tx_application_define.
4. Assembler / Compiler Switches
-The following are compiler switches used in building the demonstration
+The following are compiler switches used in building the demonstration
system:
Compiler/Assembler Meaning
@@ -73,164 +73,164 @@ Application Defines ( -D option)
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S.
TX_ENABLE_FIQ_NESTING This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S. In addition,
IRQ nesting should also be enabled.
TX_ENABLE_FIQ_SUPPORT This compiler define enables FIQ
interrupt handling in the ThreadX
- generic C source. This define
+ generic C source. This define
should also be used in conjunction
with the corresponding assembler
- define.
+ define.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
5. Register Usage and Stack Frames
-The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -248,52 +248,52 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for ARM9
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The ARM9 vectors start at address zero. The demonstration system startup
-reset.S file contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+reset.S file contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
-ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
+ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
nested IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.S:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -301,7 +301,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -314,7 +314,7 @@ __tx_irq_processing_return:
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.S:
.global __tx_irq_example_handler
@@ -324,12 +324,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} @ Save some scratch registers
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
BL _tx_thread_vectored_context_save @ Call the vectored IRQ context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -346,22 +346,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -369,10 +369,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* Enable nested IRQ interrupts. NOTE: Since this service returns
-@ with IRQ interrupts enabled, all IRQ interrupt sources must be
+@ with IRQ interrupts enabled, all IRQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-@
+@
@ /* Application ISR call(s) go here! */
@
@ /* Disable nested IRQ interrupts. The mode is switched back to
@@ -385,12 +385,12 @@ __tx_irq_processing_return:
7.3 FIQ Interrupts
-By default, ARM7 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, ARM7 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.S.
@@ -399,7 +399,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.S.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.S:
@@ -427,18 +427,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.S. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -454,7 +454,7 @@ __tx_fiq_processing_return:
@ interrupt, and all C scratch registers are available for use. */
@
@ /* Enable nested FIQ interrupts. NOTE: Since this service returns
-@ with FIQ interrupts enabled, all FIQ interrupt sources must be
+@ with FIQ interrupts enabled, all FIQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@
@@ -470,12 +470,12 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
-interrupt source, these services are not functional but the remainder of
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
+interrupt source, these services are not functional but the remainder of
ThreadX will still run.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.S for the demonstration system.
diff --git a/ports/arm9/gnu/src/tx_thread_context_restore.S b/ports/arm9/gnu/src/tx_thread_context_restore.S
index 61087c84..3dcf8f82 100644
--- a/ports/arm9/gnu/src/tx_thread_context_restore.S
+++ b/ports/arm9/gnu/src/tx_thread_context_restore.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -43,51 +43,42 @@ IRQ_MODE = 0x92 @ Disable IRQ, IRQ mode
@
@/* No 16-bit Thumb mode veneer code is needed for _tx_thread_context_restore
@ since it will never be called 16-bit mode. */
-@
+@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_context_restore ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_context_restore ARM9/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function restores the interrupt context if it is processing a */
-@/* nested interrupt. If not, it returns to the interrupt thread if no */
-@/* preemption is necessary. Otherwise, if preemption is necessary or */
-@/* if no thread was running, the function returns to the scheduler. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_schedule Thread scheduling routine */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs Interrupt Service Routines */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function restores the interrupt context if it is processing a */
+@/* nested interrupt. If not, it returns to the interrupt thread if no */
+@/* preemption is necessary. Otherwise, if preemption is necessary or */
+@/* if no thread was running, the function returns to the scheduler. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_schedule Thread scheduling routine */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs Interrupt Service Routines */
@/* */
@/**************************************************************************/
@VOID _tx_thread_context_restore(VOID)
@@ -115,13 +106,13 @@ _tx_thread_context_restore:
LDR r3, =_tx_thread_system_state @ Pickup address of system state variable
LDR r2, [r3] @ Pickup system state
SUB r2, r2, #1 @ Decrement the counter
- STR r2, [r3] @ Store the counter
+ STR r2, [r3] @ Store the counter
CMP r2, #0 @ Was this the first interrupt?
BEQ __tx_thread_not_nested_restore @ If so, not a nested restore
@
@ /* Interrupts are nested. */
@
-@ /* Just recover the saved registers and return to the point of
+@ /* Just recover the saved registers and return to the point of
@ interrupt. */
@
LDMIA sp!, {r0, r10, r12, lr} @ Recover SPSR, POI, and scratch regs
diff --git a/ports/arm9/gnu/src/tx_thread_context_save.S b/ports/arm9/gnu/src/tx_thread_context_save.S
index f2ef9712..712dc133 100644
--- a/ports/arm9/gnu/src/tx_thread_context_save.S
+++ b/ports/arm9/gnu/src/tx_thread_context_save.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -36,50 +36,41 @@ DISABLE_INTS = 0x80 @ IRQ interrupts disabled
@
@/* No 16-bit Thumb mode veneer code is needed for _tx_thread_context_save
@ since it will never be called 16-bit mode. */
-@
+@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_context_save ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_context_save ARM9/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function saves the context of an executing thread in the */
-@/* beginning of interrupt processing. The function also ensures that */
-@/* the system stack is used upon return to the calling ISR. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function saves the context of an executing thread in the */
+@/* beginning of interrupt processing. The function also ensures that */
+@/* the system stack is used upon return to the calling ISR. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_context_save(VOID)
@@ -95,7 +86,7 @@ _tx_thread_context_save:
@ if (_tx_thread_system_state++)
@ {
@
- STMDB sp!, {r0-r3} @ Save some working registers
+ STMDB sp!, {r0-r3} @ Save some working registers
#ifdef TX_ENABLE_FIQ_SUPPORT
MRS r0, CPSR @ Pickup the CPSR
ORR r0, r0, #DISABLE_INTS @ Build disable interrupt CPSR
@@ -115,7 +106,7 @@ _tx_thread_context_save:
@ calling ISR. */
@
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other registers
@
@ /* Return to the ISR. */
@@ -131,7 +122,7 @@ _tx_thread_context_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_irq_processing_return @ Continue IRQ processing
+ B __tx_irq_processing_return @ Continue IRQ processing
@
__tx_thread_not_nested_save:
@ }
@@ -145,13 +136,13 @@ __tx_thread_not_nested_save:
LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread ptr
LDR r0, [r1] @ Pickup current thread pointer
CMP r0, #0 @ Is it NULL?
- BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
@ scheduling loop - nothing needs saving!
@
@ /* Save minimal context of interrupted thread. */
@
MRS r2, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} @ Store other registers
@
@ /* Save the current stack pointer in the thread's control block. */
@@ -171,7 +162,7 @@ __tx_thread_not_nested_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_irq_processing_return @ Continue IRQ processing
+ B __tx_irq_processing_return @ Continue IRQ processing
@
@ }
@ else
@@ -181,7 +172,7 @@ __tx_thread_idle_system_save:
@
@ /* Interrupt occurred in the scheduling loop. */
@
-@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
+@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
@ processing. */
@
MOV r10, #0 @ Clear stack limit
@@ -196,7 +187,7 @@ __tx_thread_idle_system_save:
#endif
ADD sp, sp, #16 @ Recover saved registers
- B __tx_irq_processing_return @ Continue IRQ processing
+ B __tx_irq_processing_return @ Continue IRQ processing
@
@ }
@}
diff --git a/ports/arm9/gnu/src/tx_thread_fiq_context_restore.S b/ports/arm9/gnu/src/tx_thread_fiq_context_restore.S
index 5ac52543..c8dec5dc 100644
--- a/ports/arm9/gnu/src/tx_thread_fiq_context_restore.S
+++ b/ports/arm9/gnu/src/tx_thread_fiq_context_restore.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -25,7 +25,7 @@
SVC_MODE = 0xD3 @ SVC mode
FIQ_MODE = 0xD1 @ FIQ mode
DISABLE_INTS = 0xC0 @ Disable IRQ/FIQ interrupts
-MODE_MASK = 0x1F @ Mode mask
+MODE_MASK = 0x1F @ Mode mask
THUMB_MASK = 0x20 @ Thumb bit mask
IRQ_MODE_BITS = 0x12 @ IRQ mode bits
SVC_MODE_BITS = 0x13 @ SVC mode value
@@ -47,47 +47,38 @@ SVC_MODE_BITS = 0x13 @ SVC mode value
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_context_restore ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_context_restore ARM9/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function restores the fiq interrupt context when processing a */
-@/* nested interrupt. If not, it returns to the interrupt thread if no */
-@/* preemption is necessary. Otherwise, if preemption is necessary or */
-@/* if no thread was running, the function returns to the scheduler. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_schedule Thread scheduling routine */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* FIQ ISR Interrupt Service Routines */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function restores the fiq interrupt context when processing a */
+@/* nested interrupt. If not, it returns to the interrupt thread if no */
+@/* preemption is necessary. Otherwise, if preemption is necessary or */
+@/* if no thread was running, the function returns to the scheduler. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_schedule Thread scheduling routine */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* FIQ ISR Interrupt Service Routines */
@/* */
@/**************************************************************************/
@VOID _tx_thread_fiq_context_restore(VOID)
@@ -116,13 +107,13 @@ _tx_thread_fiq_context_restore:
LDR r3, =_tx_thread_system_state @ Pickup address of system state variable
LDR r2, [r3] @ Pickup system state
SUB r2, r2, #1 @ Decrement the counter
- STR r2, [r3] @ Store the counter
+ STR r2, [r3] @ Store the counter
CMP r2, #0 @ Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore @ If so, not a nested restore
@
@ /* Interrupts are nested. */
@
-@ /* Just recover the saved registers and return to the point of
+@ /* Just recover the saved registers and return to the point of
@ interrupt. */
@
LDMIA sp!, {r0, r10, r12, lr} @ Recover SPSR, POI, and scratch regs
@@ -213,7 +204,7 @@ __tx_thread_fiq_preempt_restore:
BEQ __tx_thread_fiq_dont_save_ts @ No, don't save it
@
@ _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-@ _tx_timer_time_slice = 0;
+@ _tx_timer_time_slice = 0;
@
STR r2, [r0, #24] @ Save thread's time-slice
MOV r2, #0 @ Clear value
diff --git a/ports/arm9/gnu/src/tx_thread_fiq_context_save.S b/ports/arm9/gnu/src/tx_thread_fiq_context_save.S
index 121dee2a..b7cc9ef8 100644
--- a/ports/arm9/gnu/src/tx_thread_fiq_context_save.S
+++ b/ports/arm9/gnu/src/tx_thread_fiq_context_save.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -34,46 +34,37 @@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_context_save ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_context_save ARM9/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function saves the context of an executing thread in the */
-@/* beginning of interrupt processing. The function also ensures that */
-@/* the system stack is used upon return to the calling ISR. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function saves the context of an executing thread in the */
+@/* beginning of interrupt processing. The function also ensures that */
+@/* the system stack is used upon return to the calling ISR. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@ VOID _tx_thread_fiq_context_save(VOID)
@@ -89,7 +80,7 @@ _tx_thread_fiq_context_save:
@ if (_tx_thread_system_state++)
@ {
@
- STMDB sp!, {r0-r3} @ Save some working registers
+ STMDB sp!, {r0-r3} @ Save some working registers
LDR r3, =_tx_thread_system_state @ Pickup address of system state variable
LDR r2, [r3] @ Pickup system state
CMP r2, #0 @ Is this the first interrupt?
@@ -104,7 +95,7 @@ _tx_thread_fiq_context_save:
@ calling ISR. */
@
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other registers
@
@ /* Return to the ISR. */
@@ -120,38 +111,38 @@ _tx_thread_fiq_context_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_fiq_processing_return @ Continue FIQ processing
+ B __tx_fiq_processing_return @ Continue FIQ processing
@
__tx_thread_fiq_not_nested_save:
-@ }
+@ }
@
@ /* Otherwise, not nested, check to see if a thread was running. */
@ else if (_tx_thread_current_ptr)
-@ {
+@ {
@
ADD r2, r2, #1 @ Increment the interrupt counter
STR r2, [r3] @ Store it back in the variable
LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread ptr
LDR r0, [r1] @ Pickup current thread pointer
CMP r0, #0 @ Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save @ If so, interrupt occurred in
-@ @ scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save @ If so, interrupt occurred in
+@ @ scheduling loop - nothing needs saving!
@
@ /* Save minimal context of interrupted thread. */
@
MRS r2, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r2, lr} @ Store other registers, Note that we don't
-@ @ need to save sl and ip since FIQ has
-@ @ copies of these registers. Nested
+@ @ need to save sl and ip since FIQ has
+@ @ copies of these registers. Nested
@ @ interrupt processing does need to save
@ @ these registers.
@
@ /* Save the current stack pointer in the thread's control block. */
-@ _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+@ _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
@
@ /* Switch to the system stack. */
-@ sp = _tx_thread_system_stack_ptr;
+@ sp = _tx_thread_system_stack_ptr;
@
MOV r10, #0 @ Clear stack limit
@@ -164,7 +155,7 @@ __tx_thread_fiq_not_nested_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_fiq_processing_return @ Continue FIQ processing
+ B __tx_fiq_processing_return @ Continue FIQ processing
@
@ }
@ else
@@ -184,16 +175,16 @@ __tx_thread_fiq_idle_system_save:
#endif
@
@ /* Not much to do here, save the current SPSR and LR for possible
-@ use in IRQ interrupted in idle system conditions, and return to
+@ use in IRQ interrupted in idle system conditions, and return to
@ FIQ interrupt processing. */
@
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, lr} @ Store other registers that will get used
-@ @ or stripped off the stack in context
-@ @ restore
- B __tx_fiq_processing_return @ Continue FIQ processing
+@ @ or stripped off the stack in context
+@ @ restore
+ B __tx_fiq_processing_return @ Continue FIQ processing
@
@ }
-@}
+@}
diff --git a/ports/arm9/gnu/src/tx_thread_fiq_nesting_end.S b/ports/arm9/gnu/src/tx_thread_fiq_nesting_end.S
index ded353be..1d7ebb34 100644
--- a/ports/arm9/gnu/src/tx_thread_fiq_nesting_end.S
+++ b/ports/arm9/gnu/src/tx_thread_fiq_nesting_end.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -27,7 +27,7 @@ DISABLE_INTS = 0xC0 @ Disable IRQ/FIQ interrupts
#else
DISABLE_INTS = 0x80 @ Disable IRQ interrupts
#endif
-MODE_MASK = 0x1F @ Mode mask
+MODE_MASK = 0x1F @ Mode mask
FIQ_MODE_BITS = 0x11 @ FIQ mode bits
@
@
@@ -37,54 +37,45 @@ FIQ_MODE_BITS = 0x11 @ FIQ mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_nesting_end ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_nesting_end ARM9/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from FIQ mode after */
-@/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-@/* processing from system mode back to FIQ mode prior to the ISR */
-@/* calling _tx_thread_fiq_context_restore. Note that this function */
-@/* assumes the system stack pointer is in the same position after */
-@/* nesting start function was called. */
-@/* */
-@/* This function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with FIQ interrupts disabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function is called by the application from FIQ mode after */
+@/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+@/* processing from system mode back to FIQ mode prior to the ISR */
+@/* calling _tx_thread_fiq_context_restore. Note that this function */
+@/* assumes the system stack pointer is in the same position after */
+@/* nesting start function was called. */
+@/* */
+@/* This function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with FIQ interrupts disabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_fiq_nesting_end(VOID)
@@ -96,7 +87,7 @@ _tx_thread_fiq_nesting_end:
MRS r0, CPSR @ Pickup the CPSR
ORR r0, r0, #DISABLE_INTS @ Build disable interrupt value
MSR CPSR_cxsf, r0 @ Disable interrupts
- LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
@ 8-byte alignment logic)
BIC r0, r0, #MODE_MASK @ Clear mode bits
ORR r0, r0, #FIQ_MODE_BITS @ Build IRQ mode CPSR
diff --git a/ports/arm9/gnu/src/tx_thread_fiq_nesting_start.S b/ports/arm9/gnu/src/tx_thread_fiq_nesting_start.S
index be12db77..d23b9fc0 100644
--- a/ports/arm9/gnu/src/tx_thread_fiq_nesting_start.S
+++ b/ports/arm9/gnu/src/tx_thread_fiq_nesting_start.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -33,51 +33,42 @@ SYS_MODE_BITS = 0x1F @ System mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_nesting_start ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_nesting_start ARM9/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from FIQ mode after */
-@/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-@/* processing to the system mode so nested FIQ interrupt processing */
-@/* is possible (system mode has its own "lr" register). Note that */
-@/* this function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with FIQ interrupts enabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function is called by the application from FIQ mode after */
+@/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+@/* processing to the system mode so nested FIQ interrupt processing */
+@/* is possible (system mode has its own "lr" register). Note that */
+@/* this function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with FIQ interrupts enabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/arm9/gnu/src/tx_thread_interrupt_control.S b/ports/arm9/gnu/src/tx_thread_interrupt_control.S
index 2c72a853..9b0a2a0a 100644
--- a/ports/arm9/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/arm9/gnu/src/tx_thread_interrupt_control.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -35,7 +35,7 @@ INT_MASK = 0x03F
$_tx_thread_interrupt_control:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_interrupt_control @ Call _tx_thread_interrupt_control function
@@ -45,45 +45,36 @@ $_tx_thread_interrupt_control:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_interrupt_control ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_interrupt_control ARM9/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is responsible for changing the interrupt lockout */
-@/* posture of the system. */
-@/* */
-@/* INPUT */
-@/* */
-@/* new_posture New interrupt lockout posture */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* old_posture Old interrupt lockout posture */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* Application Code */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function is responsible for changing the interrupt lockout */
+@/* posture of the system. */
+@/* */
+@/* INPUT */
+@/* */
+@/* new_posture New interrupt lockout posture */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* old_posture Old interrupt lockout posture */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* Application Code */
@/* */
@/**************************************************************************/
@UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/arm9/gnu/src/tx_thread_interrupt_disable.S b/ports/arm9/gnu/src/tx_thread_interrupt_disable.S
index dbd7a6db..cd4cf204 100644
--- a/ports/arm9/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/arm9/gnu/src/tx_thread_interrupt_disable.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -38,7 +38,7 @@ DISABLE_INTS = 0x80 @ IRQ interrupts disabled
$_tx_thread_interrupt_disable:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_interrupt_disable @ Call _tx_thread_interrupt_disable function
@@ -48,44 +48,35 @@ $_tx_thread_interrupt_disable:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_interrupt_disable ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_interrupt_disable ARM9/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is responsible for disabling interrupts */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* old_posture Old interrupt lockout posture */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* Application Code */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function is responsible for disabling interrupts */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* old_posture Old interrupt lockout posture */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* Application Code */
@/* */
@/**************************************************************************/
@UINT _tx_thread_interrupt_disable(void)
diff --git a/ports/arm9/gnu/src/tx_thread_interrupt_restore.S b/ports/arm9/gnu/src/tx_thread_interrupt_restore.S
index e30d3577..4ae750f1 100644
--- a/ports/arm9/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/arm9/gnu/src/tx_thread_interrupt_restore.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -31,7 +31,7 @@
$_tx_thread_interrupt_restore:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_interrupt_restore @ Call _tx_thread_interrupt_restore function
@@ -41,45 +41,36 @@ $_tx_thread_interrupt_restore:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_interrupt_restore ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_interrupt_restore ARM9/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
+@/* */
@/* This function is responsible for restoring interrupts to the state */
@/* returned by a previous _tx_thread_interrupt_disable call. */
-@/* */
-@/* INPUT */
-@/* */
-@/* old_posture Old interrupt lockout posture */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* Application Code */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* INPUT */
+@/* */
+@/* old_posture Old interrupt lockout posture */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* Application Code */
@/* */
@/**************************************************************************/
@UINT _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/arm9/gnu/src/tx_thread_irq_nesting_end.S b/ports/arm9/gnu/src/tx_thread_irq_nesting_end.S
index afbca2cf..d26c93ff 100644
--- a/ports/arm9/gnu/src/tx_thread_irq_nesting_end.S
+++ b/ports/arm9/gnu/src/tx_thread_irq_nesting_end.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -27,7 +27,7 @@ DISABLE_INTS = 0xC0 @ Disable IRQ/FIQ interrupts
#else
DISABLE_INTS = 0x80 @ Disable IRQ interrupts
#endif
-MODE_MASK = 0x1F @ Mode mask
+MODE_MASK = 0x1F @ Mode mask
IRQ_MODE_BITS = 0x12 @ IRQ mode bits
@
@
@@ -37,54 +37,45 @@ IRQ_MODE_BITS = 0x12 @ IRQ mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_irq_nesting_end ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_irq_nesting_end ARM9/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from IRQ mode after */
-@/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-@/* processing from system mode back to IRQ mode prior to the ISR */
-@/* calling _tx_thread_context_restore. Note that this function */
-@/* assumes the system stack pointer is in the same position after */
-@/* nesting start function was called. */
-@/* */
-@/* This function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with IRQ interrupts disabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function is called by the application from IRQ mode after */
+@/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+@/* processing from system mode back to IRQ mode prior to the ISR */
+@/* calling _tx_thread_context_restore. Note that this function */
+@/* assumes the system stack pointer is in the same position after */
+@/* nesting start function was called. */
+@/* */
+@/* This function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with IRQ interrupts disabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_irq_nesting_end(VOID)
@@ -96,7 +87,7 @@ _tx_thread_irq_nesting_end:
MRS r0, CPSR @ Pickup the CPSR
ORR r0, r0, #DISABLE_INTS @ Build disable interrupt value
MSR CPSR_cxsf, r0 @ Disable interrupts
- LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
@ 8-byte alignment logic)
BIC r0, r0, #MODE_MASK @ Clear mode bits
ORR r0, r0, #IRQ_MODE_BITS @ Build IRQ mode CPSR
diff --git a/ports/arm9/gnu/src/tx_thread_irq_nesting_start.S b/ports/arm9/gnu/src/tx_thread_irq_nesting_start.S
index 060a471c..8c5d8642 100644
--- a/ports/arm9/gnu/src/tx_thread_irq_nesting_start.S
+++ b/ports/arm9/gnu/src/tx_thread_irq_nesting_start.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -33,51 +33,42 @@ SYS_MODE_BITS = 0x1F @ System mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_irq_nesting_start ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_irq_nesting_start ARM9/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from IRQ mode after */
-@/* _tx_thread_context_save has been called and switches the IRQ */
-@/* processing to the system mode so nested IRQ interrupt processing */
-@/* is possible (system mode has its own "lr" register). Note that */
-@/* this function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with IRQ interrupts enabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function is called by the application from IRQ mode after */
+@/* _tx_thread_context_save has been called and switches the IRQ */
+@/* processing to the system mode so nested IRQ interrupt processing */
+@/* is possible (system mode has its own "lr" register). Note that */
+@/* this function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with IRQ interrupts enabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/arm9/gnu/src/tx_thread_schedule.S b/ports/arm9/gnu/src/tx_thread_schedule.S
index 50affb8c..2cd8d04f 100644
--- a/ports/arm9/gnu/src/tx_thread_schedule.S
+++ b/ports/arm9/gnu/src/tx_thread_schedule.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -45,7 +45,7 @@ ENABLE_INTS = 0x80 @ IRQ Interrupts enabled mask
$_tx_thread_schedule:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_schedule @ Call _tx_thread_schedule function
@@ -55,48 +55,39 @@ $_tx_thread_schedule:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_schedule ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_schedule ARM9/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function waits for a thread control block pointer to appear in */
-@/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-@/* in the variable, the corresponding thread is resumed. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* _tx_initialize_kernel_enter ThreadX entry function */
-@/* _tx_thread_system_return Return to system from thread */
-@/* _tx_thread_context_restore Restore thread's context */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function waits for a thread control block pointer to appear in */
+@/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+@/* in the variable, the corresponding thread is resumed. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* _tx_initialize_kernel_enter ThreadX entry function */
+@/* _tx_thread_system_return Return to system from thread */
+@/* _tx_thread_context_restore Restore thread's context */
@/* */
@/**************************************************************************/
@VOID _tx_thread_schedule(VOID)
@@ -124,7 +115,7 @@ __tx_thread_schedule_loop:
@
@ }
@ while(_tx_thread_execute_ptr == TX_NULL);
-@
+@
@ /* Yes! We have a thread to execute. Lockout interrupts and
@ transfer control to it. */
@
@@ -133,7 +124,7 @@ __tx_thread_schedule_loop:
@ /* Setup the current thread pointer. */
@ _tx_thread_current_ptr = _tx_thread_execute_ptr;
@
- LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread
STR r0, [r1] @ Setup current thread pointer
@
@ /* Increment the run count for this thread. */
@@ -147,7 +138,7 @@ __tx_thread_schedule_loop:
@ /* Setup time-slice, if present. */
@ _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
@
- LDR r2, =_tx_timer_time_slice @ Pickup address of time-slice
+ LDR r2, =_tx_timer_time_slice @ Pickup address of time-slice
@ variable
LDR sp, [r0, #8] @ Switch stack pointers
STR r3, [r2] @ Setup time-slice
diff --git a/ports/arm9/gnu/src/tx_thread_stack_build.S b/ports/arm9/gnu/src/tx_thread_stack_build.S
index 675c1f4f..14ff4181 100644
--- a/ports/arm9/gnu/src/tx_thread_stack_build.S
+++ b/ports/arm9/gnu/src/tx_thread_stack_build.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -42,7 +42,7 @@ CPSR_MASK = 0x9F @ Mask initial CPSR, IRQ interru
.type $_tx_thread_stack_build,function
$_tx_thread_stack_build:
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_stack_build @ Call _tx_thread_stack_build function
@@ -52,47 +52,38 @@ $_tx_thread_stack_build:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_stack_build ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_stack_build ARM9/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
+@/* */
@/* This function builds a stack frame on the supplied thread's stack. */
@/* The stack frame results in a fake interrupt return to the supplied */
-@/* function pointer. */
-@/* */
-@/* INPUT */
-@/* */
+@/* function pointer. */
+@/* */
+@/* INPUT */
+@/* */
@/* thread_ptr Pointer to thread control blk */
@/* function_ptr Pointer to return function */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* _tx_thread_create Create thread service */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* _tx_thread_create Create thread service */
@/* */
@/**************************************************************************/
@VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -101,10 +92,10 @@ $_tx_thread_stack_build:
.type _tx_thread_stack_build,function
_tx_thread_stack_build:
@
-@
+@
@ /* Build a fake interrupt frame. The form of the fake interrupt stack
@ on the ARM9 should look like the following after it is built:
-@
+@
@ Stack Top: 1 Interrupt stack frame type
@ CPSR Initial value for CPSR
@ a1 (r0) Initial value for a1
diff --git a/ports/arm9/gnu/src/tx_thread_system_return.S b/ports/arm9/gnu/src/tx_thread_system_return.S
index ba0ed9bb..e551a18b 100644
--- a/ports/arm9/gnu/src/tx_thread_system_return.S
+++ b/ports/arm9/gnu/src/tx_thread_system_return.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -48,7 +48,7 @@ DISABLE_INTS = 0x80 @ IRQ interrupts disabled
$_tx_thread_system_return:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_system_return @ Call _tx_thread_system_return function
@@ -58,47 +58,38 @@ $_tx_thread_system_return:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_system_return ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_system_return ARM9/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is target processor specific. It is used to transfer */
-@/* control from a thread back to the ThreadX system. Only a */
-@/* minimal context is saved since the compiler assumes temp registers */
-@/* are going to get slicked by a function call anyway. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_schedule Thread scheduling loop */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ThreadX components */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function is target processor specific. It is used to transfer */
+@/* control from a thread back to the ThreadX system. Only a */
+@/* minimal context is saved since the compiler assumes temp registers */
+@/* are going to get slicked by a function call anyway. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_schedule Thread scheduling loop */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ThreadX components */
@/* */
@/**************************************************************************/
@VOID _tx_thread_system_return(VOID)
@@ -112,12 +103,12 @@ _tx_thread_system_return:
MOV r0, #0 @ Build a solicited stack type
MRS r1, CPSR @ Pickup the CPSR
STMDB sp!, {r0-r1, r4-r11, lr} @ Save minimal context
-@
+@
@ /* Lockout interrupts. */
@
ORR r2, r1, #DISABLE_INTS @ Build disable interrupt CPSR
MSR CPSR_cxsf, r2 @ Disable interrupts
-
+
#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
@
@ /* Call the thread exit function to indicate the thread is no longer executing. */
diff --git a/ports/arm9/gnu/src/tx_thread_vectored_context_save.S b/ports/arm9/gnu/src/tx_thread_vectored_context_save.S
index d123e054..3f56304d 100644
--- a/ports/arm9/gnu/src/tx_thread_vectored_context_save.S
+++ b/ports/arm9/gnu/src/tx_thread_vectored_context_save.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -37,50 +37,41 @@ DISABLE_INTS = 0x80 @ IRQ interrupts disabled
@
@/* No 16-bit Thumb mode veneer code is needed for _tx_thread_vectored_context_save
@ since it will never be called 16-bit mode. */
-@
+@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_vectored_context_save ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_vectored_context_save ARM9/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function saves the context of an executing thread in the */
-@/* beginning of interrupt processing. The function also ensures that */
-@/* the system stack is used upon return to the calling ISR. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function saves the context of an executing thread in the */
+@/* beginning of interrupt processing. The function also ensures that */
+@/* the system stack is used upon return to the calling ISR. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_vectored_context_save(VOID)
@@ -140,7 +131,7 @@ __tx_thread_not_nested_save:
LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread ptr
LDR r0, [r1, #0] @ Pickup current thread pointer
CMP r0, #0 @ Is it NULL?
- BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
@ scheduling loop - nothing needs saving!
@
@ /* Note: Minimal context of interrupted thread is already saved. */
@@ -172,7 +163,7 @@ __tx_thread_idle_system_save:
@
@ /* Interrupt occurred in the scheduling loop. */
@
-@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
+@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
@ processing. */
@
MOV r10, #0 @ Clear stack limit
diff --git a/ports/arm9/gnu/src/tx_timer_interrupt.S b/ports/arm9/gnu/src/tx_timer_interrupt.S
index 48bee7f7..9ae148bf 100644
--- a/ports/arm9/gnu/src/tx_timer_interrupt.S
+++ b/ports/arm9/gnu/src/tx_timer_interrupt.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Timer */
@/** */
@@ -48,7 +48,7 @@
.type $_tx_timer_interrupt,function
$_tx_timer_interrupt:
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_timer_interrupt @ Call _tx_timer_interrupt function
@@ -58,49 +58,40 @@ $_tx_timer_interrupt:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_timer_interrupt ARM9/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_timer_interrupt ARM9/GNU */
@/* 6.2.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function processes the hardware timer interrupt. This */
-@/* processing includes incrementing the system clock and checking for */
-@/* time slice and/or timer expiration. If either is found, the */
-@/* interrupt context save/restore functions are called along with the */
-@/* expiration functions. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_time_slice Time slice interrupted thread */
-@/* _tx_timer_expiration_process Timer expiration processing */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* interrupt vector */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Cindy Deng Modified comment(s), added */
-@/* #include tx_user.h, */
-@/* resulting in version 6.2.1 */
+@/* This function processes the hardware timer interrupt. This */
+@/* processing includes incrementing the system clock and checking for */
+@/* time slice and/or timer expiration. If either is found, the */
+@/* interrupt context save/restore functions are called along with the */
+@/* expiration functions. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_time_slice Time slice interrupted thread */
+@/* _tx_timer_expiration_process Timer expiration processing */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* interrupt vector */
@/* */
@/**************************************************************************/
@VOID _tx_timer_interrupt(VOID)
@@ -125,7 +116,7 @@ _tx_timer_interrupt:
@ if (_tx_timer_time_slice)
@ {
@
- LDR r3, =_tx_timer_time_slice @ Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice @ Pickup address of time-slice
LDR r2, [r3] @ Pickup time-slice
CMP r2, #0 @ Is it non-active?
BEQ __tx_timer_no_time_slice @ Yes, skip time-slice processing
@@ -243,7 +234,7 @@ __tx_timer_dont_activate:
@ if (_tx_timer_expired_time_slice)
@ {
@
- LDR r3, =_tx_timer_expired_time_slice @ Pickup address of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice @ Pickup address of time-slice expired
LDR r2, [r3] @ Pickup the actual flag
CMP r2, #0 @ See if the flag is set
BEQ __tx_timer_not_ts_expiration @ No, skip time-slice processing
diff --git a/ports/arm9/iar/example_build/cstartup.s b/ports/arm9/iar/example_build/cstartup.s
index b95efc0e..3da2b79d 100644
--- a/ports/arm9/iar/example_build/cstartup.s
+++ b/ports/arm9/iar/example_build/cstartup.s
@@ -1,7 +1,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; Part one of the system initialization code,
+;; Part one of the system initialization code,
;; contains low-level
;; initialization.
;;
@@ -71,13 +71,13 @@ FIQ_Addr: DCD __tx_fiq_handler
SECTION .text:CODE:NOROOT(2)
-; PUBLIC ?cstartup
+; PUBLIC ?cstartup
EXTERN ?main
REQUIRE __vector
- ARM
-
-__iar_program_start:
+ ARM
+
+__iar_program_start:
?cstartup:
;
diff --git a/ports/arm9/iar/example_build/sample_threadx.c b/ports/arm9/iar/example_build/sample_threadx.c
index 68cd97fe..56f7cd55 100644
--- a/ports/arm9/iar/example_build/sample_threadx.c
+++ b/ports/arm9/iar/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -85,42 +85,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -128,23 +128,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -247,11 +247,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -310,7 +310,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -363,7 +363,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/arm9/iar/example_build/tx_initialize_low_level.s b/ports/arm9/iar/example_build/tx_initialize_low_level.s
index 89024b8e..103d72d6 100644
--- a/ports/arm9/iar/example_build/tx_initialize_low_level.s
+++ b/ports/arm9/iar/example_build/tx_initialize_low_level.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -62,7 +62,7 @@ SYS_MODE DEFINE 0xDF ; Disable irq,fiq SYS mode
;
;
;
-;/* Define the FREE_MEM segment that will specify where free memory is
+;/* Define the FREE_MEM segment that will specify where free memory is
; defined. This must also be located in at the end of other RAM segments
; in the linker control file. The value of this segment is what is passed
; to tx_application_define. */
@@ -75,45 +75,39 @@ __tx_free_memory_start
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level ARM9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level ARM9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -146,7 +140,7 @@ _tx_initialize_low_level
;
LDR r2, =_tx_initialize_unused_memory ; Pickup unused memory ptr address
STR r0, [r2, #0] ; Save first free memory address
-;
+;
; /* Setup Timer for periodic interrupts. */
;
; /* Done, return to caller. */
@@ -188,7 +182,7 @@ __tx_reserved_handler
RSEG .text:CODE:NOROOT(2)
PUBLIC __tx_irq_handler
RSEG .text:CODE:NOROOT(2)
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -196,17 +190,17 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -221,7 +215,7 @@ __tx_irq_processing_return
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -240,22 +234,22 @@ __tx_irq_processing_return
; /* Jump to context save to save system context. */
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other registers
; BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -264,7 +258,7 @@ __tx_irq_processing_return
; /* Application IRQ handler is called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
@@ -288,11 +282,11 @@ __tx_fiq_processing_return
; /* At this point execution is still in the FIQ mode. The CPSR, point of
; interrupt, and all C scratch registers are available for use. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
; from FIQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with FIQ interrupts enabled.
+; system mode and returns with FIQ interrupts enabled.
;
-; NOTE: It is very important to ensure all FIQ interrupts are cleared
+; NOTE: It is very important to ensure all FIQ interrupts are cleared
; prior to enabling nested FIQ interrupts. */
#ifdef TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/arm9/iar/inc/tx_port.h b/ports/arm9/iar/inc/tx_port.h
index 33c50835..e4411ae6 100644
--- a/ports/arm9/iar/inc/tx_port.h
+++ b/ports/arm9/iar/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h ARM9/IAR */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h ARM9/IAR */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -79,7 +71,7 @@
#endif
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -115,12 +107,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -130,8 +122,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -188,7 +180,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -202,17 +194,17 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -226,11 +218,11 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -240,23 +232,23 @@ ULONG _tx_misra_time_stamp_get(VOID);
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#if (__VER__ < 8000000)
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {_tx_iar_destroy_per_thread_tls_area(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
-#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
+#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#endif
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -284,8 +276,8 @@ void __iar_Initlocks(void);
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef TX_DISABLE_INLINE
@@ -296,22 +288,22 @@ void __iar_Initlocks(void);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (UINT) __CLZ(m); \
- b = 31 - b;
+ b = 31 - b;
#endif
#endif
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
/* First, check and see what mode the file is being compiled in. The IAR compiler
- defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
+ defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
is present. If ARM 32-bit mode is present, the fast CPSR manipulation macros
are available. Otherwise, if Thumb mode is present, we must use function calls. */
@@ -373,8 +365,8 @@ void _tx_thread_interrupt_restore(UINT old_posture);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARM9/IAR Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARM9/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/arm9/iar/readme_threadx.txt b/ports/arm9/iar/readme_threadx.txt
index 3f394604..7ce5c317 100644
--- a/ports/arm9/iar/readme_threadx.txt
+++ b/ports/arm9/iar/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for ARM9
+ Microsoft's Azure RTOS ThreadX for ARM9
Thumb & 32-bit Mode
@@ -7,10 +7,10 @@
1. Building the ThreadX run-time Library
Building the ThreadX library is easy. First, open the Azure RTOS workspace
-azure_rtos.eww. Next, make the TX project the "active project" in the
-IAR Embedded Workbench and select the "Make" button. You should observe
-assembly and compilation of a series of ThreadX source files. This
-results in the ThreadX run-time library file tx.a, which is needed by
+azure_rtos.eww. Next, make the TX project the "active project" in the
+IAR Embedded Workbench and select the "Make" button. You should observe
+assembly and compilation of a series of ThreadX source files. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
@@ -20,52 +20,52 @@ The ThreadX demonstration is designed to execute under the IAR
Windows-based ARM9 simulator.
Building the demonstration is easy; simply make the sample_threadx.ewp project
-the "active project" in the IAR Embedded Workbench and select the
+the "active project" in the IAR Embedded Workbench and select the
"Make" button.
-You should observe the compilation of sample_threadx.c (which is the demonstration
+You should observe the compilation of sample_threadx.c (which is the demonstration
application) and linking with tx.a. The resulting file sample_threadx.out is a
binary file that can be downloaded and executed on IAR's ARM9 simulator.
A SPECIAL NOTE: The IAR ARM simulator does simulate interrupts. In order
-for the ThreadX demonstration to run properly, a periodic IRQ interrupt must
+for the ThreadX demonstration to run properly, a periodic IRQ interrupt must
be setup in the IAR debugging environment. We recommend setting an IRQ
interrupt to execute every 9999 cycles.
3. System Initialization
-The entry point in ThreadX for the ARM9 using IAR tools is at label
-?cstartup. This is defined within the IAR compiler's startup code. In
-addition, this is where all static and global preset C variable
+The entry point in ThreadX for the ARM9 using IAR tools is at label
+?cstartup. This is defined within the IAR compiler's startup code. In
+addition, this is where all static and global preset C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, and a periodic timer interrupt source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, and a periodic timer interrupt source.
By default, the vector area is defined at the top of cstartup.s, which is
-a slightly modified from the base IAR file.
+a slightly modified from the base IAR file.
The _tx_initialize_low_level function inside of tx_initialize_low_level.s
-also determines the first available address for use by the application, which
-is supplied as the sole input parameter to your application definition function,
-tx_application_define. To accomplish this, a section is created in
-tx_initialize_low_level.s called FREE_MEM, which must be located after all
+also determines the first available address for use by the application, which
+is supplied as the sole input parameter to your application definition function,
+tx_application_define. To accomplish this, a section is created in
+tx_initialize_low_level.s called FREE_MEM, which must be located after all
other RAM sections in memory.
4. Register Usage and Stack Frames
-The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
-scratch registers for each function. All other registers used by a C function
-must be preserved by the function. ThreadX takes advantage of this in
-situations where a context switch happens as a result of making a ThreadX
-service call (which is itself a C function). In such cases, the saved
+The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
+scratch registers for each function. All other registers used by a C function
+must be preserved by the function. ThreadX takes advantage of this in
+situations where a context switch happens as a result of making a ThreadX
+service call (which is itself a C function). In such cases, the saved
context of a thread is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -83,12 +83,12 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
5. Conditional Compilation Switches
@@ -97,146 +97,146 @@ The following are conditional compilation options for building the ThreadX libra
and application:
- TX_ENABLE_FIQ_SUPPORT This assembler/compiler define enables
+ TX_ENABLE_FIQ_SUPPORT This assembler/compiler define enables
FIQ interrupt handling support in the
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s.
TX_ENABLE_FIQ_NESTING This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s. In addition,
IRQ nesting should also be enabled.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
TX_THUMB Defined, this option enables the BX LR calling return sequence
@@ -250,29 +250,29 @@ and application:
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
-project to enable various compiler optimizations.
+project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for ARM9
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The ARM9 vectors start at address zero. The demonstration system startup
-cstartup.s file contains the vectors and is loaded at address zero.
-On actual hardware platforms, this area might have to be copied to address 0.
+cstartup.s file contains the vectors and is loaded at address zero.
+On actual hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -283,12 +283,12 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
PUBLIC __tx_irq_handler
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -296,7 +296,7 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -309,7 +309,7 @@ __tx_irq_processing_return
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.s:
@@ -320,12 +320,12 @@ __tx_example_vectored_irq_handler
; /* Jump to context save to save system context. */
STMDB sp!, {r0-r3} ; Save some scratch registers
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -342,24 +342,24 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
RSEG .text:CODE:NOROOT(2)
PUBLIC __tx_irq_handler
RSEG .text:CODE:NOROOT(2)
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -367,15 +367,15 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;
BL _tx_thread_irq_nesting_start
@@ -383,7 +383,7 @@ __tx_irq_processing_return
; /* Application ISR dispatch call goes here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;
BL _tx_thread_irq_nesting_end
@@ -394,12 +394,12 @@ __tx_irq_processing_return
7.3 FIQ Interrupts
-By default, ARM9 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, ARM9 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -408,7 +408,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.s.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.s:
@@ -439,18 +439,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.s. When nested FIQ interrupts are no
-longer required, calling the _tx_thread_fiq_nesting_end service disables
-nesting by disabling FIQ interrupts and switching back to FIQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.s. When nested FIQ interrupts are no
+longer required, calling the _tx_thread_fiq_nesting_end service disables
+nesting by disabling FIQ interrupts and switching back to FIQ mode in
preparation for the FIQ context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -468,7 +468,7 @@ __tx_fiq_processing_return:
; interrupt, and all C scratch registers are available for use. */
;
; /* Enable nested FIQ interrupts. NOTE: Since this service returns
-; with FIQ interrupts enabled, all FIQ interrupt sources must be
+; with FIQ interrupts enabled, all FIQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
;
@@ -484,22 +484,22 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
+To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
in the IRQ processing.
9. Thumb/ARM9 Mixed Mode
-By default, ThreadX is setup for running in ARM9 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
+By default, ThreadX is setup for running in ARM9 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
ThreadX file and/or the application in Thumb mode. The only exception
-to this is the file tx_thread_shell_entry.c. This file must always be
-built in 32-bit mode. In addition, if any Thumb code is used the entire
+to this is the file tx_thread_shell_entry.c. This file must always be
+built in 32-bit mode. In addition, if any Thumb code is used the entire
ThreadX assembly source should be built with TX_THUMB defined.
diff --git a/ports/arm9/iar/src/tx_iar.c b/ports/arm9/iar/src/tx_iar.c
index a37231c8..238b485e 100644
--- a/ports/arm9/iar/src/tx_iar.c
+++ b/ports/arm9/iar/src/tx_iar.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** IAR Multithreaded Library Support */
/** */
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,24 +423,24 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#include
+#include
void * __aeabi_read_tp();
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports/arm9/iar/src/tx_thread_context_restore.s b/ports/arm9/iar/src/tx_thread_context_restore.s
index ac57cd96..51450dd5 100644
--- a/ports/arm9/iar/src/tx_thread_context_restore.s
+++ b/ports/arm9/iar/src/tx_thread_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,7 +36,7 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
THUMB_MASK DEFINE 0x20 ; Thumb bit mask
SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
@@ -50,44 +50,38 @@ SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
EXTERN _tx_execution_isr_exit
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore ARM9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore ARM9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -117,13 +111,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3, #0] ; Store the counter
+ STR r2, [r3, #0] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
diff --git a/ports/arm9/iar/src/tx_thread_context_save.s b/ports/arm9/iar/src/tx_thread_context_save.s
index db77a17b..eeadaa24 100644
--- a/ports/arm9/iar/src/tx_thread_context_save.s
+++ b/ports/arm9/iar/src/tx_thread_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -44,43 +44,37 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save ARM9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save ARM9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
@@ -97,7 +91,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
#ifdef TX_ENABLE_FIQ_SUPPORT
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt CPSR
@@ -117,7 +111,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -133,7 +127,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -147,13 +141,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -173,7 +167,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -183,7 +177,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -198,7 +192,7 @@ __tx_thread_idle_system_save
#endif
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports/arm9/iar/src/tx_thread_fiq_context_restore.s b/ports/arm9/iar/src/tx_thread_fiq_context_restore.s
index 137714b6..1fd57ad0 100644
--- a/ports/arm9/iar/src/tx_thread_fiq_context_restore.s
+++ b/ports/arm9/iar/src/tx_thread_fiq_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -37,7 +37,7 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
THUMB_MASK DEFINE 0x20 ; Thumb bit mask
IRQ_MODE_BITS DEFINE 0x12 ; IRQ mode bits
SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
@@ -52,44 +52,38 @@ SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
EXTERN _tx_execution_isr_exit
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_restore ARM9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_restore ARM9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the fiq interrupt context when processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* FIQ ISR Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the fiq interrupt context when processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* FIQ ISR Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_context_restore(VOID)
@@ -119,13 +113,13 @@ _tx_thread_fiq_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -169,7 +163,7 @@ __tx_thread_fiq_no_preempt_restore
; /* Restore interrupted thread or ISR. */
;
; /* Pickup the saved stack pointer. */
-; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
+; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
;
; /* Recover the saved context and return to the point of interrupt. */
;
@@ -216,7 +210,7 @@ __tx_thread_fiq_preempt_restore
BEQ __tx_thread_fiq_dont_save_ts ; No, don't save it
;
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-; _tx_timer_time_slice = 0;
+; _tx_timer_time_slice = 0;
;
STR r2, [r0, #24] ; Save thread's time-slice
MOV r2, #0 ; Clear value
diff --git a/ports/arm9/iar/src/tx_thread_fiq_context_save.s b/ports/arm9/iar/src/tx_thread_fiq_context_save.s
index 562d5132..38e7e568 100644
--- a/ports/arm9/iar/src/tx_thread_fiq_context_save.s
+++ b/ports/arm9/iar/src/tx_thread_fiq_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,43 +36,37 @@
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_save ARM9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_save ARM9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
; VOID _tx_thread_fiq_context_save(VOID)
@@ -89,7 +83,7 @@ _tx_thread_fiq_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -104,7 +98,7 @@ _tx_thread_fiq_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -120,38 +114,38 @@ _tx_thread_fiq_context_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
__tx_thread_fiq_not_nested_save
-; }
+; }
;
; /* Otherwise, not nested, check to see if a thread was running. */
; else if (_tx_thread_current_ptr)
-; {
+; {
;
ADD r2, r2, #1 ; Increment the interrupt counter
STR r2, [r3] ; Store it back in the variable
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
-; ; scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
+; ; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, lr} ; Store other registers, Note that we don't
-; ; need to save sl and ip since FIQ has
-; ; copies of these registers. Nested
+; ; need to save sl and ip since FIQ has
+; ; copies of these registers. Nested
; ; interrupt processing does need to save
; ; these registers.
;
; /* Save the current stack pointer in the thread's control block. */
-; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
;
; /* Switch to the system stack. */
-; sp = _tx_thread_system_stack_ptr;
+; sp = _tx_thread_system_stack_ptr;
;
MOV r10, #0 ; Clear stack limit
@@ -164,7 +158,7 @@ __tx_thread_fiq_not_nested_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
; else
@@ -184,18 +178,18 @@ __tx_thread_fiq_idle_system_save
#endif
;
; /* Not much to do here, save the current SPSR and LR for possible
-; use in IRQ interrupted in idle system conditions, and return to
+; use in IRQ interrupted in idle system conditions, and return to
; FIQ interrupt processing. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, lr} ; Store other registers that will get used
-; ; or stripped off the stack in context
-; ; restore
- B __tx_fiq_processing_return ; Continue FIQ processing
+; ; or stripped off the stack in context
+; ; restore
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
-;}
+;}
;
;
END
diff --git a/ports/arm9/iar/src/tx_thread_fiq_nesting_end.s b/ports/arm9/iar/src/tx_thread_fiq_nesting_end.s
index e3897977..e71cea18 100644
--- a/ports/arm9/iar/src/tx_thread_fiq_nesting_end.s
+++ b/ports/arm9/iar/src/tx_thread_fiq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,55 +34,49 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
FIQ_MODE_BITS DEFINE 0x11 ; FIQ mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_end ARM9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_end ARM9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-;/* processing from system mode back to FIQ mode prior to the ISR */
-;/* calling _tx_thread_fiq_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with FIQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+;/* processing from system mode back to FIQ mode prior to the ISR */
+;/* calling _tx_thread_fiq_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with FIQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_end(VOID)
diff --git a/ports/arm9/iar/src/tx_thread_fiq_nesting_start.s b/ports/arm9/iar/src/tx_thread_fiq_nesting_start.s
index 41867e49..d9d0fb14 100644
--- a/ports/arm9/iar/src/tx_thread_fiq_nesting_start.s
+++ b/ports/arm9/iar/src/tx_thread_fiq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ MODE_MASK DEFINE 0x1F ; Mode mask
SYS_MODE_BITS DEFINE 0x1F ; System mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_start ARM9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_start ARM9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-;/* processing to the system mode so nested FIQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with FIQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+;/* processing to the system mode so nested FIQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with FIQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/arm9/iar/src/tx_thread_interrupt_control.s b/ports/arm9/iar/src/tx_thread_interrupt_control.s
index a6d540a7..82ccae6e 100644
--- a/ports/arm9/iar/src/tx_thread_interrupt_control.s
+++ b/ports/arm9/iar/src/tx_thread_interrupt_control.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,42 +35,36 @@ INT_MASK DEFINE 0x80 ; Interrupt bit mask
#endif
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control ARM9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control ARM9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/arm9/iar/src/tx_thread_interrupt_disable.s b/ports/arm9/iar/src/tx_thread_interrupt_disable.s
index 64c7508a..5a5cd20c 100644
--- a/ports/arm9/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/arm9/iar/src/tx_thread_interrupt_disable.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,41 +36,35 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable ARM9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable ARM9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(VOID)
diff --git a/ports/arm9/iar/src/tx_thread_interrupt_restore.s b/ports/arm9/iar/src/tx_thread_interrupt_restore.s
index deace508..945993e0 100644
--- a/ports/arm9/iar/src/tx_thread_interrupt_restore.s
+++ b/ports/arm9/iar/src/tx_thread_interrupt_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -28,42 +28,36 @@
;#include "tx_thread.h"
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore ARM9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore ARM9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function is responsible for restoring interrupts to the state */
;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;void _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/arm9/iar/src/tx_thread_irq_nesting_end.s b/ports/arm9/iar/src/tx_thread_irq_nesting_end.s
index ff38c1ca..54003548 100644
--- a/ports/arm9/iar/src/tx_thread_irq_nesting_end.s
+++ b/ports/arm9/iar/src/tx_thread_irq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,55 +35,49 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
IRQ_MODE_BITS DEFINE 0x12 ; IRQ mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end ARM9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end ARM9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
diff --git a/ports/arm9/iar/src/tx_thread_irq_nesting_start.s b/ports/arm9/iar/src/tx_thread_irq_nesting_start.s
index 5e08187c..5b13d528 100644
--- a/ports/arm9/iar/src/tx_thread_irq_nesting_start.s
+++ b/ports/arm9/iar/src/tx_thread_irq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ MODE_MASK DEFINE 0x1F ; Mode mask
SYS_MODE_BITS DEFINE 0x1F ; System mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start ARM9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start ARM9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/arm9/iar/src/tx_thread_schedule.s b/ports/arm9/iar/src/tx_thread_schedule.s
index 86a70a4f..89c875c9 100644
--- a/ports/arm9/iar/src/tx_thread_schedule.s
+++ b/ports/arm9/iar/src/tx_thread_schedule.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -43,45 +43,39 @@ ENABLE_INTS DEFINE 0x80 ; IRQ Interrupts enabled mask
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule ARM9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule ARM9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
@@ -111,7 +105,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -120,7 +114,7 @@ __tx_thread_schedule_loop
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
;
- LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
STR r0, [r1, #0] ; Setup current thread pointer
;
; /* Increment the run count for this thread. */
@@ -134,7 +128,7 @@ __tx_thread_schedule_loop
; /* Setup time-slice, if present. */
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
;
- LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
+ LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
; variable
LDR sp, [r0, #8] ; Switch stack pointers
STR r3, [r2, #0] ; Setup time-slice
diff --git a/ports/arm9/iar/src/tx_thread_stack_build.s b/ports/arm9/iar/src/tx_thread_stack_build.s
index c59c61f4..cd10adb1 100644
--- a/ports/arm9/iar/src/tx_thread_stack_build.s
+++ b/ports/arm9/iar/src/tx_thread_stack_build.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -37,58 +37,52 @@ CPSR_MASK DEFINE 0x9F ; Mask initial CPSR, IRQ ints en
#endif
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build ARM9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build ARM9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function builds a stack frame on the supplied thread's stack. */
;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
;/* thread_ptr Pointer to thread control blk */
;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
;{
RSEG .text:CODE:NOROOT(2)
PUBLIC _tx_thread_stack_build
-
+
CODE32
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the ARM9 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports/arm9/iar/src/tx_thread_system_return.s b/ports/arm9/iar/src/tx_thread_system_return.s
index e8660d9b..d428d4a6 100644
--- a/ports/arm9/iar/src/tx_thread_system_return.s
+++ b/ports/arm9/iar/src/tx_thread_system_return.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -42,44 +42,38 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return ARM9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return ARM9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
@@ -95,7 +89,7 @@ _tx_thread_system_return
MOV r0, #0 ; Build a solicited stack type
MRS r1, CPSR ; Pickup the CPSR
STMDB sp!, {r0-r1, r4-r11, lr} ; Save minimal context
-;
+;
; /* Lockout interrupts. */
;
ORR r2, r1, #DISABLE_INTS ; Build disable interrupt CPSR
diff --git a/ports/arm9/iar/src/tx_thread_vectored_context_save.s b/ports/arm9/iar/src/tx_thread_vectored_context_save.s
index 1aa26ae1..ce1b9d5b 100644
--- a/ports/arm9/iar/src/tx_thread_vectored_context_save.s
+++ b/ports/arm9/iar/src/tx_thread_vectored_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -41,43 +41,37 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save ARM9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save ARM9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_vectored_context_save(VOID)
@@ -139,7 +133,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -171,7 +165,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports/arm9/iar/src/tx_timer_interrupt.s b/ports/arm9/iar/src/tx_timer_interrupt.s
index 28bac145..367e629f 100644
--- a/ports/arm9/iar/src/tx_timer_interrupt.s
+++ b/ports/arm9/iar/src/tx_timer_interrupt.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Timer */
;/** */
@@ -43,46 +43,40 @@
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt ARM9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt ARM9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time-slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time-slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -108,7 +102,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -226,13 +220,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports/c667x/ccs/example_build/include/C66XX.h b/ports/c667x/ccs/example_build/include/C66XX.h
index 581b563e..80507ca2 100644
--- a/ports/c667x/ccs/example_build/include/C66XX.h
+++ b/ports/c667x/ccs/example_build/include/C66XX.h
@@ -52,7 +52,7 @@
3. This file is best viewed with the TAB setting set to '4'.
- 4. This header file is externally controlled from user C-code by run-time
+ 4. This header file is externally controlled from user C-code by run-time
compiler keys definitions in order to apply DSP-type specific
definitions to refer to particular definitions included for different
DSP type:
diff --git a/ports/c667x/ccs/example_build/include/C66XX_DEF.hxx b/ports/c667x/ccs/example_build/include/C66XX_DEF.hxx
index 9764a47f..0eb6a1d3 100644
--- a/ports/c667x/ccs/example_build/include/C66XX_DEF.hxx
+++ b/ports/c667x/ccs/example_build/include/C66XX_DEF.hxx
@@ -791,53 +791,53 @@
//=============================================================================
//============ PLL controller registers =======================================
//=============================================================================
-// PLL control register - r/w
+// PLL control register - r/w
#define C66XX_PLL_PLLCTL_RG_OFFSET 0x100
-// PLL secondary control register - r/w
+// PLL secondary control register - r/w
#define C66XX_PLL_SECCTL_RG_OFFSET 0x108
-// PLL multiplier control register - r/w
+// PLL multiplier control register - r/w
#define C66XX_PLL_PLLM_RG_OFFSET 0x110
-// PLL controller divider 1 register - r/w
+// PLL controller divider 1 register - r/w
#define C66XX_PLL_PLLDIV1_RG_OFFSET 0x118
-// PLL controller divider 2 register - r/w
+// PLL controller divider 2 register - r/w
#define C66XX_PLL_PLLDIV2_RG_OFFSET 0x11c
-// PLL controller divider 3 register - r/w
+// PLL controller divider 3 register - r/w
#define C66XX_PLL_PLLDIV3_RG_OFFSET 0x120
-// PLL controller command register - r/w
+// PLL controller command register - r/w
#define C66XX_PLL_PLLCMD_RG_OFFSET 0x138
-// PLL controller status register - r/w
+// PLL controller status register - r/w
#define C66XX_PLL_PLLSTAT_RG_OFFSET 0x13c
-// PLL controller clock align control register - r/w
+// PLL controller clock align control register - r/w
#define C66XX_PLL_ALNCTL_RG_OFFSET 0x140
-// PLL controller divider ratio change status register - r/w
+// PLL controller divider ratio change status register - r/w
#define C66XX_PLL_DCHANGE_RG_OFFSET 0x144
// SYSCLK status register - r-only
#define C66XX_PLL_SYSTAT_RG_OFFSET 0x150
-// PLL controller divider 4 register - r/w
+// PLL controller divider 4 register - r/w
#define C66XX_PLL_PLLDIV4_RG_OFFSET 0x160
-// PLL controller divider 5 register - r/w
+// PLL controller divider 5 register - r/w
#define C66XX_PLL_PLLDIV5_RG_OFFSET 0x164
-// PLL controller divider 6 register - r/w
+// PLL controller divider 6 register - r/w
#define C66XX_PLL_PLLDIV6_RG_OFFSET 0x168
-// PLL controller divider 7 register - r/w
+// PLL controller divider 7 register - r/w
#define C66XX_PLL_PLLDIV7_RG_OFFSET 0x16c
-// PLL controller divider 8 register - r/w
+// PLL controller divider 8 register - r/w
#define C66XX_PLL_PLLDIV8_RG_OFFSET 0x170
-// PLL controller divider 9 register - r/w
+// PLL controller divider 9 register - r/w
#define C66XX_PLL_PLLDIV9_RG_OFFSET 0x174
-// PLL controller divider 10 register - r/w
+// PLL controller divider 10 register - r/w
#define C66XX_PLL_PLLDIV10_RG_OFFSET 0x178
-// PLL controller divider 11 register - r/w
+// PLL controller divider 11 register - r/w
#define C66XX_PLL_PLLDIV11_RG_OFFSET 0x17c
-// PLL controller divider 12 register - r/w
+// PLL controller divider 12 register - r/w
#define C66XX_PLL_PLLDIV12_RG_OFFSET 0x180
-// PLL controller divider 13 register - r/w
+// PLL controller divider 13 register - r/w
#define C66XX_PLL_PLLDIV13_RG_OFFSET 0x184
-// PLL controller divider 14 register - r/w
+// PLL controller divider 14 register - r/w
#define C66XX_PLL_PLLDIV14_RG_OFFSET 0x188
-// PLL controller divider 15 register - r/w
+// PLL controller divider 15 register - r/w
#define C66XX_PLL_PLLDIV15_RG_OFFSET 0x18c
-// PLL controller divider 16 register - r/w
+// PLL controller divider 16 register - r/w
#define C66XX_PLL_PLLDIV16_RG_OFFSET 0x190
#define C66XX_PLL_PLLCTL_RG_ADDR (C66XX_PLL_RG_AREA_SADDR + C66XX_PLL_PLLCTL_RG_OFFSET)
diff --git a/ports/c667x/ccs/example_build/include/C66XX_FUNCTIONS.hxx b/ports/c667x/ccs/example_build/include/C66XX_FUNCTIONS.hxx
index 8564e44d..8011bcac 100644
--- a/ports/c667x/ccs/example_build/include/C66XX_FUNCTIONS.hxx
+++ b/ports/c667x/ccs/example_build/include/C66XX_FUNCTIONS.hxx
@@ -775,7 +775,7 @@ uint32_t C66XX_INT_init_chip(uint32_t cpintc_id);
*
* System events are those events generated by a hardware module in the system.
* These events are inputs into CPINTC.
- * Host events are the output events of CPINTC, which act as event inputs to
+ * Host events are the output events of CPINTC, which act as event inputs to
* C66x CorePac interrupt controllers (INTC).
*
* @param[in] cpintc_handle - chip interrupt controller handle returned by
@@ -1372,7 +1372,7 @@ void C66XX_UART_transmit_string(char *s);
* @brief Function receives a line ended with CR character, and stores
* received characters into string with '\0' symbol.
*
- * Note that maximum received line length should not exceed
+ * Note that maximum received line length should not exceed
* C66XX_UART_LINE_LEN_MAX value!
*
* @param[in] s - Pointer to a string to store received characters
@@ -1626,7 +1626,7 @@ typedef struct
* packets) and data streaming (Type11 packets) operations.
* 2. Max MTU length is set to 256 bytes.
* 3. SRIO 8-bit and 16-bit base device IDs are set to supplied parameters.
- * 4. Available destination SRIO 8-bit and 16-bit device IDs are set
+ * 4. Available destination SRIO 8-bit and 16-bit device IDs are set
* according to supplied parameters.
* 5. Operation mode is set according to supplied parameter.
* 6. Link rate and ports configuration (4 ports are available) are set
diff --git a/ports/c667x/ccs/example_build/include/C66XX_MACROS.hxx b/ports/c667x/ccs/example_build/include/C66XX_MACROS.hxx
index 54e7ef57..32b1e4ff 100644
--- a/ports/c667x/ccs/example_build/include/C66XX_MACROS.hxx
+++ b/ports/c667x/ccs/example_build/include/C66XX_MACROS.hxx
@@ -40,7 +40,7 @@
typedef volatile uint32_t __C66XX_IO_DATA_TYPE__;
-// read-back data bitmask for DSP memory-mapped registers (32-bit wide)
+// read-back data bitmask for DSP memory-mapped registers (32-bit wide)
#define C66XX_RG_DATA_BITMASK 0xffffffff
//=============================================================================
diff --git a/ports/c667x/ccs/example_build/include/TA66XX_DSP.h b/ports/c667x/ccs/example_build/include/TA66XX_DSP.h
index 04dfc4b7..ba3fa341 100644
--- a/ports/c667x/ccs/example_build/include/TA66XX_DSP.h
+++ b/ports/c667x/ccs/example_build/include/TA66XX_DSP.h
@@ -11,7 +11,7 @@
Description:
------------
- This file contains general definitions and API functions for TORNADO AMC
+ This file contains general definitions and API functions for TORNADO AMC
modules SDK and must be included in the user C-application for
TORNADO AMC modules.
diff --git a/ports/c667x/ccs/example_build/include/TA66XX_DSP_BC.h b/ports/c667x/ccs/example_build/include/TA66XX_DSP_BC.h
index dbc748e0..028ce336 100644
--- a/ports/c667x/ccs/example_build/include/TA66XX_DSP_BC.h
+++ b/ports/c667x/ccs/example_build/include/TA66XX_DSP_BC.h
@@ -11,7 +11,7 @@
Description:
------------
- This file contains definitions, macros and API functions for TORNADO AMC
+ This file contains definitions, macros and API functions for TORNADO AMC
modules on-board DSP environment and must be included in the user
C-application for TORNADO AMC modules.
diff --git a/ports/c667x/ccs/example_build/include/TA66XX_DSP_BC_FUNCTIONS.hxx b/ports/c667x/ccs/example_build/include/TA66XX_DSP_BC_FUNCTIONS.hxx
index 338a01ee..fcec18ce 100644
--- a/ports/c667x/ccs/example_build/include/TA66XX_DSP_BC_FUNCTIONS.hxx
+++ b/ports/c667x/ccs/example_build/include/TA66XX_DSP_BC_FUNCTIONS.hxx
@@ -7,7 +7,7 @@
Notes:
------
- 1. This C-header file contains TORNADO AMC modules SDK functions
+ 1. This C-header file contains TORNADO AMC modules SDK functions
for DSP environment declarations and is an include file for
TI C6xxx C/C++ Code Generation Tools, which must be invoked to compile
for TORNADO AMC platform.
@@ -1008,7 +1008,7 @@ int32_t TA66XX_BC_get_hw_cfg_info(TA66XX_BC_HW_CFG_INFO_DATA_DD *info_dd);
/*------------ TA66XX_BC_get_fmc_info() function -------------------------*//**
- * @brief Function returns FMC module device info: installed status, device
+ * @brief Function returns FMC module device info: installed status, device
* name, serial number, manufacturing date, firmware revisions, etc.
*
* @param[out] info_dd - pointer to a buffer that receives FMC info data
@@ -1081,7 +1081,7 @@ int32_t TA66XX_BC_set_mmc_power_down_notification(void);
* @brief Function returns identification info about installed SFP
* transceiver: 256-byte array read from address 0x50 (identification info
* according to SFF-8472) and 256-byte array read from address 0x51 (digital
- * diagnostic monitoring interface (DDMI) data)
+ * diagnostic monitoring interface (DDMI) data)
*
* @param[out] id_data - pointer to a buffer that receives 256-byte array read
* from address 0x50 (identification info according to SFF-8472).
@@ -1356,7 +1356,7 @@ uint32_t TA66XX_BC_get_flash_length(void);
/*------------ TA66XX_BC_get_flash_hw_wp_enable_status() function --------*//**
- * @brief Function returns enable status of on-board FLASH memory hardware
+ * @brief Function returns enable status of on-board FLASH memory hardware
* (via on-board switch) write-protection
*
* @return On-board FLASH memory hardware write-protection enable state:
@@ -1367,7 +1367,7 @@ uint32_t TA66XX_BC_get_flash_hw_wp_enable_status(void);
/*------------ TA66XX_BC_get_flash_sw_wp_enable_status() function --------*//**
- * @brief Function returns enable status of on-board FLASH memory software
+ * @brief Function returns enable status of on-board FLASH memory software
* write-protection
*
* @return On-board FLASH memory software write-protection enable state:
@@ -1507,7 +1507,7 @@ uint32_t TA66XX_BC_get_mram_length(void);
/*------------ TA66XX_BC_get_mram_sw_wp_enable_status() function ---------*//**
- * @brief Function returns enable status of on-board MRAM memory software
+ * @brief Function returns enable status of on-board MRAM memory software
* write-protection
*
* @return On-board MRAM memory software write-protection enable state:
diff --git a/ports/c667x/ccs/example_build/include/TA66XX_OSAL.h b/ports/c667x/ccs/example_build/include/TA66XX_OSAL.h
index d61af0e9..360e9f3b 100644
--- a/ports/c667x/ccs/example_build/include/TA66XX_OSAL.h
+++ b/ports/c667x/ccs/example_build/include/TA66XX_OSAL.h
@@ -412,7 +412,7 @@ void *Osal_srioDataBufferMalloc(uint32_t numBytes);
/*------------ Osal_srioDataBufferFree() function ------------------------*//**
- * @brief Function is used to clean up a previously allocated data buffer
+ * @brief Function is used to clean up a previously allocated data buffer
* block. All data buffers are in the global address space.
*
* @param[in] ptr - pointer to the memory block to be cleaned up
diff --git a/ports/c667x/ccs/example_build/sample_threadx_c6678evm/sample_threadx.c b/ports/c667x/ccs/example_build/sample_threadx_c6678evm/sample_threadx.c
index 18bad8de..a97ce125 100644
--- a/ports/c667x/ccs/example_build/sample_threadx_c6678evm/sample_threadx.c
+++ b/ports/c667x/ccs/example_build/sample_threadx_c6678evm/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -121,7 +121,7 @@ UINT status;
/* Create the main thread. */
status = tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
if (status != TX_SUCCESS)
{
@@ -135,11 +135,11 @@ UINT status;
while (1);
}
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
status = tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
if (status != TX_SUCCESS)
{
@@ -154,7 +154,7 @@ UINT status;
}
status = tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
if (status != TX_SUCCESS)
{
@@ -168,10 +168,10 @@ UINT status;
while (1);
}
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
status = tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
if (status != TX_SUCCESS)
{
@@ -186,7 +186,7 @@ UINT status;
}
status = tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
if (status != TX_SUCCESS)
{
@@ -203,7 +203,7 @@ UINT status;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
status = tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
if (status != TX_SUCCESS)
{
@@ -219,7 +219,7 @@ UINT status;
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
status = tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
if (status != TX_SUCCESS)
{
@@ -234,7 +234,7 @@ UINT status;
}
status = tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
if (status != TX_SUCCESS)
{
@@ -328,7 +328,7 @@ UINT status;
/* Increment the thread counter. */
thread_0_counter++;
-
+
/* Sleep for 10 ticks. */
tx_thread_sleep(10);
@@ -384,11 +384,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -447,7 +447,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -500,7 +500,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/c667x/ccs/example_build/sample_threadx_c6678evm/sample_threadx.cmd b/ports/c667x/ccs/example_build/sample_threadx_c6678evm/sample_threadx.cmd
index a2267231..590da9dc 100644
--- a/ports/c667x/ccs/example_build/sample_threadx_c6678evm/sample_threadx.cmd
+++ b/ports/c667x/ccs/example_build/sample_threadx_c6678evm/sample_threadx.cmd
@@ -4,18 +4,18 @@
-l C:\ti\pdk_C6678_1_1_2_6\packages\ti\csl\lib\ti.csl.ae66
-l C:\ti\pdk_C6678_1_1_2_6\packages\ti\csl\lib\ti.csl.intc.ae66
-l c:\ti\pdk_C6678_1_1_2_6\packages\ti\platform\evmc6678l\platform_lib\lib\release\ti.platform.evm6678l.ae66
-
+
/* Memory Map */
MEMORY
{
L1PSRAM (RWX) : org = 0x00E00000, len = 0x00008000
- L1DSRAM (RWX) : org = 0x00F00000, len = 0x00008000
+ L1DSRAM (RWX) : org = 0x00F00000, len = 0x00008000
CODE_RAM (RWX) : org = 0x00800000, len = 0x00020000
DATA_RAM (RWX) : org = 0x00820000, len = 0x00060000
MSMCSRAM (RWX) : org = 0x0c000000, len = 0x00400000
DDR3 (RWX) : org = 0x80000000, len = 0x80000000
}
-
+
SECTIONS
{
.text > CODE_RAM
@@ -30,7 +30,7 @@ SECTIONS
.ppinfo > CODE_RAM
.ppdata > CODE_RAM
.csl_vect > CODE_RAM
- platform_lib > CODE_RAM
+ platform_lib > CODE_RAM
GROUP
{
@@ -42,7 +42,7 @@ SECTIONS
/* COFF sections */
.pinit > CODE_RAM
.cinit > CODE_RAM
-
+
/* EABI sections */
.binit > CODE_RAM
.init_array > CODE_RAM
diff --git a/ports/c667x/ccs/example_build/sample_threadx_c6678evm/targetConfigs/TMS320C6678.ccxml b/ports/c667x/ccs/example_build/sample_threadx_c6678evm/targetConfigs/TMS320C6678.ccxml
index b7147d7f..d10a283a 100644
--- a/ports/c667x/ccs/example_build/sample_threadx_c6678evm/targetConfigs/TMS320C6678.ccxml
+++ b/ports/c667x/ccs/example_build/sample_threadx_c6678evm/targetConfigs/TMS320C6678.ccxml
@@ -1,6 +1,6 @@
-
+
diff --git a/ports/c667x/ccs/example_build/sample_threadx_c6678evm/tx_initialize_low_level.asm b/ports/c667x/ccs/example_build/sample_threadx_c6678evm/tx_initialize_low_level.asm
index 686220c5..1339dbf5 100644
--- a/ports/c667x/ccs/example_build/sample_threadx_c6678evm/tx_initialize_low_level.asm
+++ b/ports/c667x/ccs/example_build/sample_threadx_c6678evm/tx_initialize_low_level.asm
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -82,7 +82,7 @@ INTMUX1_TMR8_VAL .set 0x43 ; Tie in Event 67 (TINT8H) t
.global _tx_first_free_memory
.align 16
_tx_first_free_memory:
- .space 4
+ .space 4
; Useful macro definitions
; Load 32-bit integer into register
@@ -111,42 +111,42 @@ TX_INTERRUPT_EXIT .macro
.sect ".text"
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level C667x/TI */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level C667x/TI */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
+;/* */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* */
+;/* RELEASE HISTORY */
+;/* */
;/* DATE NAME DESCRIPTION */
;/* */
;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -219,7 +219,7 @@ _tx_int4_vector:
STW A4,*+SP(36) ; Save A4
NOP
-;_tx_timer_interrupt_preamble:
+;_tx_timer_interrupt_preamble:
MVK_LH TMR8_INTCTLSTAT_ADDR,A0 ; Build address of Timer Interrupt Control Register
MVK_LH INTCTLSTAT_VAL,A1 ; Build value of Timer Interrupt Control Register
@@ -234,7 +234,7 @@ _tx_int4_vector:
B A0 ; Branch ThreadX timer ISR routine
NOP 5 ; Delay slots
NOP
-
+
.global _tx_int5_vector
diff --git a/ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/sample_threadx.c b/ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/sample_threadx.c
index 18bad8de..a97ce125 100644
--- a/ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/sample_threadx.c
+++ b/ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -121,7 +121,7 @@ UINT status;
/* Create the main thread. */
status = tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
if (status != TX_SUCCESS)
{
@@ -135,11 +135,11 @@ UINT status;
while (1);
}
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
status = tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
if (status != TX_SUCCESS)
{
@@ -154,7 +154,7 @@ UINT status;
}
status = tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
if (status != TX_SUCCESS)
{
@@ -168,10 +168,10 @@ UINT status;
while (1);
}
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
status = tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
if (status != TX_SUCCESS)
{
@@ -186,7 +186,7 @@ UINT status;
}
status = tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
if (status != TX_SUCCESS)
{
@@ -203,7 +203,7 @@ UINT status;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
status = tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
if (status != TX_SUCCESS)
{
@@ -219,7 +219,7 @@ UINT status;
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
status = tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
if (status != TX_SUCCESS)
{
@@ -234,7 +234,7 @@ UINT status;
}
status = tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
if (status != TX_SUCCESS)
{
@@ -328,7 +328,7 @@ UINT status;
/* Increment the thread counter. */
thread_0_counter++;
-
+
/* Sleep for 10 ticks. */
tx_thread_sleep(10);
@@ -384,11 +384,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -447,7 +447,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -500,7 +500,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/sample_threadx.cmd b/ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/sample_threadx.cmd
index b03e87b5..f84bffc6 100644
--- a/ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/sample_threadx.cmd
+++ b/ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/sample_threadx.cmd
@@ -3,18 +3,18 @@
-stack 0x1000
-l C:\ti\pdk_C6678_1_1_2_6\packages\ti\csl\lib\ti.csl.ae66
-l C:\ti\pdk_C6678_1_1_2_6\packages\ti\csl\lib\ti.csl.intc.ae66
-
+
/* Memory Map */
MEMORY
{
L1PSRAM (RWX) : org = 0x00E00000, len = 0x00008000
- L1DSRAM (RWX) : org = 0x00F00000, len = 0x00008000
+ L1DSRAM (RWX) : org = 0x00F00000, len = 0x00008000
CODE_RAM (RWX) : org = 0x00800000, len = 0x00020000
DATA_RAM (RWX) : org = 0x00820000, len = 0x00060000
MSMCSRAM (RWX) : org = 0x0c000000, len = 0x00400000
DDR3 (RWX) : org = 0x80000000, len = 0x80000000
}
-
+
SECTIONS
{
.text > CODE_RAM
@@ -40,7 +40,7 @@ SECTIONS
/* COFF sections */
.pinit > CODE_RAM
.cinit > CODE_RAM
-
+
/* EABI sections */
.binit > CODE_RAM
.init_array > CODE_RAM
diff --git a/ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/targetConfigs/TMS320C6678.ccxml b/ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/targetConfigs/TMS320C6678.ccxml
index b7147d7f..d10a283a 100644
--- a/ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/targetConfigs/TMS320C6678.ccxml
+++ b/ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/targetConfigs/TMS320C6678.ccxml
@@ -1,6 +1,6 @@
-
+
diff --git a/ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/tx_initialize_low_level.asm b/ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/tx_initialize_low_level.asm
index 14591f59..ca59cb5d 100644
--- a/ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/tx_initialize_low_level.asm
+++ b/ports/c667x/ccs/example_build/sample_threadx_ta6678fmc/tx_initialize_low_level.asm
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -82,7 +82,7 @@ INTMUX1_TMR8_VAL .set 0x43 ; Tie in Event 67 (TINT8H) t
.global _tx_first_free_memory
.align 16
_tx_first_free_memory:
- .space 4
+ .space 4
; Useful macro definitions
; Load 32-bit integer into register
@@ -111,42 +111,42 @@ TX_INTERRUPT_EXIT .macro
.sect ".text"
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level C667x+/TI */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level C667x+/TI */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
+;/* */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* */
+;/* RELEASE HISTORY */
+;/* */
;/* DATE NAME DESCRIPTION */
;/* */
;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -219,7 +219,7 @@ _tx_int4_vector:
STW A4,*+SP(36) ; Save A4
NOP
-;_tx_timer_interrupt_preamble:
+;_tx_timer_interrupt_preamble:
MVK_LH TMR8_INTCTLSTAT_ADDR,A0 ; Build address of Timer Interrupt Control Register
MVK_LH INTCTLSTAT_VAL,A1 ; Build value of Timer Interrupt Control Register
@@ -235,7 +235,7 @@ _tx_int4_vector:
B A0 ; Branch ThreadX timer ISR routine
NOP 5 ; Delay slots
NOP
-
+
.global _tx_int5_vector
diff --git a/ports/c667x/ccs/example_build/tx/Release/ccsObjs.opt b/ports/c667x/ccs/example_build/tx/Release/ccsObjs.opt
index e954d96e..98982c10 100644
--- a/ports/c667x/ccs/example_build/tx/Release/ccsObjs.opt
+++ b/ports/c667x/ccs/example_build/tx/Release/ccsObjs.opt
@@ -1 +1 @@
-"./tx_block_allocate.obj" "./tx_block_pool_cleanup.obj" "./tx_block_pool_create.obj" "./tx_block_pool_delete.obj" "./tx_block_pool_info_get.obj" "./tx_block_pool_initialize.obj" "./tx_block_pool_performance_info_get.obj" "./tx_block_pool_performance_system_info_get.obj" "./tx_block_pool_prioritize.obj" "./tx_block_release.obj" "./tx_byte_allocate.obj" "./tx_byte_pool_cleanup.obj" "./tx_byte_pool_create.obj" "./tx_byte_pool_delete.obj" "./tx_byte_pool_info_get.obj" "./tx_byte_pool_initialize.obj" "./tx_byte_pool_performance_info_get.obj" "./tx_byte_pool_performance_system_info_get.obj" "./tx_byte_pool_prioritize.obj" "./tx_byte_pool_search.obj" "./tx_byte_release.obj" "./tx_event_flags_cleanup.obj" "./tx_event_flags_create.obj" "./tx_event_flags_delete.obj" "./tx_event_flags_get.obj" "./tx_event_flags_info_get.obj" "./tx_event_flags_initialize.obj" "./tx_event_flags_performance_info_get.obj" "./tx_event_flags_performance_system_info_get.obj" "./tx_event_flags_set.obj" "./tx_event_flags_set_notify.obj" "./tx_initialize_high_level.obj" "./tx_initialize_kernel_enter.obj" "./tx_initialize_kernel_setup.obj" "./tx_mutex_cleanup.obj" "./tx_mutex_create.obj" "./tx_mutex_delete.obj" "./tx_mutex_get.obj" "./tx_mutex_info_get.obj" "./tx_mutex_initialize.obj" "./tx_mutex_performance_info_get.obj" "./tx_mutex_performance_system_info_get.obj" "./tx_mutex_prioritize.obj" "./tx_mutex_priority_change.obj" "./tx_mutex_put.obj" "./tx_queue_cleanup.obj" "./tx_queue_create.obj" "./tx_queue_delete.obj" "./tx_queue_flush.obj" "./tx_queue_front_send.obj" "./tx_queue_info_get.obj" "./tx_queue_initialize.obj" "./tx_queue_performance_info_get.obj" "./tx_queue_performance_system_info_get.obj" "./tx_queue_prioritize.obj" "./tx_queue_receive.obj" "./tx_queue_send.obj" "./tx_queue_send_notify.obj" "./tx_semaphore_ceiling_put.obj" "./tx_semaphore_cleanup.obj" "./tx_semaphore_create.obj" "./tx_semaphore_delete.obj" "./tx_semaphore_get.obj" "./tx_semaphore_info_get.obj" "./tx_semaphore_initialize.obj" "./tx_semaphore_performance_info_get.obj" "./tx_semaphore_performance_system_info_get.obj" "./tx_semaphore_prioritize.obj" "./tx_semaphore_put.obj" "./tx_semaphore_put_notify.obj" "./tx_thread_context_restore.obj" "./tx_thread_context_save.obj" "./tx_thread_create.obj" "./tx_thread_delete.obj" "./tx_thread_entry_exit_notify.obj" "./tx_thread_identify.obj" "./tx_thread_info_get.obj" "./tx_thread_initialize.obj" "./tx_thread_interrupt_control.obj" "./tx_thread_performance_info_get.obj" "./tx_thread_performance_system_info_get.obj" "./tx_thread_preemption_change.obj" "./tx_thread_priority_change.obj" "./tx_thread_relinquish.obj" "./tx_thread_reset.obj" "./tx_thread_resume.obj" "./tx_thread_schedule.obj" "./tx_thread_shell_entry.obj" "./tx_thread_sleep.obj" "./tx_thread_stack_analyze.obj" "./tx_thread_stack_build.obj" "./tx_thread_stack_error_handler.obj" "./tx_thread_stack_error_notify.obj" "./tx_thread_suspend.obj" "./tx_thread_system_preempt_check.obj" "./tx_thread_system_resume.obj" "./tx_thread_system_return.obj" "./tx_thread_system_suspend.obj" "./tx_thread_terminate.obj" "./tx_thread_time_slice.obj" "./tx_thread_time_slice_change.obj" "./tx_thread_timeout.obj" "./tx_thread_wait_abort.obj" "./tx_time_get.obj" "./tx_time_set.obj" "./tx_timer_activate.obj" "./tx_timer_change.obj" "./tx_timer_create.obj" "./tx_timer_deactivate.obj" "./tx_timer_delete.obj" "./tx_timer_expiration_process.obj" "./tx_timer_info_get.obj" "./tx_timer_initialize.obj" "./tx_timer_interrupt.obj" "./tx_timer_performance_info_get.obj" "./tx_timer_performance_system_info_get.obj" "./tx_timer_system_activate.obj" "./tx_timer_system_deactivate.obj" "./tx_timer_thread_entry.obj" "./tx_trace_buffer_full_notify.obj" "./tx_trace_disable.obj" "./tx_trace_enable.obj" "./tx_trace_event_filter.obj" "./tx_trace_event_unfilter.obj" "./tx_trace_initialize.obj" "./tx_trace_interrupt_control.obj" "./tx_trace_isr_enter_insert.obj" "./tx_trace_isr_exit_insert.obj" "./tx_trace_object_register.obj" "./tx_trace_object_unregister.obj" "./tx_trace_user_event_insert.obj" "./txe_block_allocate.obj" "./txe_block_pool_create.obj" "./txe_block_pool_delete.obj" "./txe_block_pool_info_get.obj" "./txe_block_pool_prioritize.obj" "./txe_block_release.obj" "./txe_byte_allocate.obj" "./txe_byte_pool_create.obj" "./txe_byte_pool_delete.obj" "./txe_byte_pool_info_get.obj" "./txe_byte_pool_prioritize.obj" "./txe_byte_release.obj" "./txe_event_flags_create.obj" "./txe_event_flags_delete.obj" "./txe_event_flags_get.obj" "./txe_event_flags_info_get.obj" "./txe_event_flags_set.obj" "./txe_event_flags_set_notify.obj" "./txe_mutex_create.obj" "./txe_mutex_delete.obj" "./txe_mutex_get.obj" "./txe_mutex_info_get.obj" "./txe_mutex_prioritize.obj" "./txe_mutex_put.obj" "./txe_queue_create.obj" "./txe_queue_delete.obj" "./txe_queue_flush.obj" "./txe_queue_front_send.obj" "./txe_queue_info_get.obj" "./txe_queue_prioritize.obj" "./txe_queue_receive.obj" "./txe_queue_send.obj" "./txe_queue_send_notify.obj" "./txe_semaphore_ceiling_put.obj" "./txe_semaphore_create.obj" "./txe_semaphore_delete.obj" "./txe_semaphore_get.obj" "./txe_semaphore_info_get.obj" "./txe_semaphore_prioritize.obj" "./txe_semaphore_put.obj" "./txe_semaphore_put_notify.obj" "./txe_thread_create.obj" "./txe_thread_delete.obj" "./txe_thread_entry_exit_notify.obj" "./txe_thread_info_get.obj" "./txe_thread_preemption_change.obj" "./txe_thread_priority_change.obj" "./txe_thread_relinquish.obj" "./txe_thread_reset.obj" "./txe_thread_resume.obj" "./txe_thread_suspend.obj" "./txe_thread_terminate.obj" "./txe_thread_time_slice_change.obj" "./txe_thread_wait_abort.obj" "./txe_timer_activate.obj" "./txe_timer_change.obj" "./txe_timer_create.obj" "./txe_timer_deactivate.obj" "./txe_timer_delete.obj" "./txe_timer_info_get.obj"
\ No newline at end of file
+"./tx_block_allocate.obj" "./tx_block_pool_cleanup.obj" "./tx_block_pool_create.obj" "./tx_block_pool_delete.obj" "./tx_block_pool_info_get.obj" "./tx_block_pool_initialize.obj" "./tx_block_pool_performance_info_get.obj" "./tx_block_pool_performance_system_info_get.obj" "./tx_block_pool_prioritize.obj" "./tx_block_release.obj" "./tx_byte_allocate.obj" "./tx_byte_pool_cleanup.obj" "./tx_byte_pool_create.obj" "./tx_byte_pool_delete.obj" "./tx_byte_pool_info_get.obj" "./tx_byte_pool_initialize.obj" "./tx_byte_pool_performance_info_get.obj" "./tx_byte_pool_performance_system_info_get.obj" "./tx_byte_pool_prioritize.obj" "./tx_byte_pool_search.obj" "./tx_byte_release.obj" "./tx_event_flags_cleanup.obj" "./tx_event_flags_create.obj" "./tx_event_flags_delete.obj" "./tx_event_flags_get.obj" "./tx_event_flags_info_get.obj" "./tx_event_flags_initialize.obj" "./tx_event_flags_performance_info_get.obj" "./tx_event_flags_performance_system_info_get.obj" "./tx_event_flags_set.obj" "./tx_event_flags_set_notify.obj" "./tx_initialize_high_level.obj" "./tx_initialize_kernel_enter.obj" "./tx_initialize_kernel_setup.obj" "./tx_mutex_cleanup.obj" "./tx_mutex_create.obj" "./tx_mutex_delete.obj" "./tx_mutex_get.obj" "./tx_mutex_info_get.obj" "./tx_mutex_initialize.obj" "./tx_mutex_performance_info_get.obj" "./tx_mutex_performance_system_info_get.obj" "./tx_mutex_prioritize.obj" "./tx_mutex_priority_change.obj" "./tx_mutex_put.obj" "./tx_queue_cleanup.obj" "./tx_queue_create.obj" "./tx_queue_delete.obj" "./tx_queue_flush.obj" "./tx_queue_front_send.obj" "./tx_queue_info_get.obj" "./tx_queue_initialize.obj" "./tx_queue_performance_info_get.obj" "./tx_queue_performance_system_info_get.obj" "./tx_queue_prioritize.obj" "./tx_queue_receive.obj" "./tx_queue_send.obj" "./tx_queue_send_notify.obj" "./tx_semaphore_ceiling_put.obj" "./tx_semaphore_cleanup.obj" "./tx_semaphore_create.obj" "./tx_semaphore_delete.obj" "./tx_semaphore_get.obj" "./tx_semaphore_info_get.obj" "./tx_semaphore_initialize.obj" "./tx_semaphore_performance_info_get.obj" "./tx_semaphore_performance_system_info_get.obj" "./tx_semaphore_prioritize.obj" "./tx_semaphore_put.obj" "./tx_semaphore_put_notify.obj" "./tx_thread_context_restore.obj" "./tx_thread_context_save.obj" "./tx_thread_create.obj" "./tx_thread_delete.obj" "./tx_thread_entry_exit_notify.obj" "./tx_thread_identify.obj" "./tx_thread_info_get.obj" "./tx_thread_initialize.obj" "./tx_thread_interrupt_control.obj" "./tx_thread_performance_info_get.obj" "./tx_thread_performance_system_info_get.obj" "./tx_thread_preemption_change.obj" "./tx_thread_priority_change.obj" "./tx_thread_relinquish.obj" "./tx_thread_reset.obj" "./tx_thread_resume.obj" "./tx_thread_schedule.obj" "./tx_thread_shell_entry.obj" "./tx_thread_sleep.obj" "./tx_thread_stack_analyze.obj" "./tx_thread_stack_build.obj" "./tx_thread_stack_error_handler.obj" "./tx_thread_stack_error_notify.obj" "./tx_thread_suspend.obj" "./tx_thread_system_preempt_check.obj" "./tx_thread_system_resume.obj" "./tx_thread_system_return.obj" "./tx_thread_system_suspend.obj" "./tx_thread_terminate.obj" "./tx_thread_time_slice.obj" "./tx_thread_time_slice_change.obj" "./tx_thread_timeout.obj" "./tx_thread_wait_abort.obj" "./tx_time_get.obj" "./tx_time_set.obj" "./tx_timer_activate.obj" "./tx_timer_change.obj" "./tx_timer_create.obj" "./tx_timer_deactivate.obj" "./tx_timer_delete.obj" "./tx_timer_expiration_process.obj" "./tx_timer_info_get.obj" "./tx_timer_initialize.obj" "./tx_timer_interrupt.obj" "./tx_timer_performance_info_get.obj" "./tx_timer_performance_system_info_get.obj" "./tx_timer_system_activate.obj" "./tx_timer_system_deactivate.obj" "./tx_timer_thread_entry.obj" "./tx_trace_buffer_full_notify.obj" "./tx_trace_disable.obj" "./tx_trace_enable.obj" "./tx_trace_event_filter.obj" "./tx_trace_event_unfilter.obj" "./tx_trace_initialize.obj" "./tx_trace_interrupt_control.obj" "./tx_trace_isr_enter_insert.obj" "./tx_trace_isr_exit_insert.obj" "./tx_trace_object_register.obj" "./tx_trace_object_unregister.obj" "./tx_trace_user_event_insert.obj" "./txe_block_allocate.obj" "./txe_block_pool_create.obj" "./txe_block_pool_delete.obj" "./txe_block_pool_info_get.obj" "./txe_block_pool_prioritize.obj" "./txe_block_release.obj" "./txe_byte_allocate.obj" "./txe_byte_pool_create.obj" "./txe_byte_pool_delete.obj" "./txe_byte_pool_info_get.obj" "./txe_byte_pool_prioritize.obj" "./txe_byte_release.obj" "./txe_event_flags_create.obj" "./txe_event_flags_delete.obj" "./txe_event_flags_get.obj" "./txe_event_flags_info_get.obj" "./txe_event_flags_set.obj" "./txe_event_flags_set_notify.obj" "./txe_mutex_create.obj" "./txe_mutex_delete.obj" "./txe_mutex_get.obj" "./txe_mutex_info_get.obj" "./txe_mutex_prioritize.obj" "./txe_mutex_put.obj" "./txe_queue_create.obj" "./txe_queue_delete.obj" "./txe_queue_flush.obj" "./txe_queue_front_send.obj" "./txe_queue_info_get.obj" "./txe_queue_prioritize.obj" "./txe_queue_receive.obj" "./txe_queue_send.obj" "./txe_queue_send_notify.obj" "./txe_semaphore_ceiling_put.obj" "./txe_semaphore_create.obj" "./txe_semaphore_delete.obj" "./txe_semaphore_get.obj" "./txe_semaphore_info_get.obj" "./txe_semaphore_prioritize.obj" "./txe_semaphore_put.obj" "./txe_semaphore_put_notify.obj" "./txe_thread_create.obj" "./txe_thread_delete.obj" "./txe_thread_entry_exit_notify.obj" "./txe_thread_info_get.obj" "./txe_thread_preemption_change.obj" "./txe_thread_priority_change.obj" "./txe_thread_relinquish.obj" "./txe_thread_reset.obj" "./txe_thread_resume.obj" "./txe_thread_suspend.obj" "./txe_thread_terminate.obj" "./txe_thread_time_slice_change.obj" "./txe_thread_wait_abort.obj" "./txe_timer_activate.obj" "./txe_timer_change.obj" "./txe_timer_create.obj" "./txe_timer_deactivate.obj" "./txe_timer_delete.obj" "./txe_timer_info_get.obj"
\ No newline at end of file
diff --git a/ports/c667x/ccs/example_build/tx/Release/makefile b/ports/c667x/ccs/example_build/tx/Release/makefile
index 45d27b35..10d8815d 100644
--- a/ports/c667x/ccs/example_build/tx/Release/makefile
+++ b/ports/c667x/ccs/example_build/tx/Release/makefile
@@ -6,8 +6,8 @@ SHELL = cmd.exe
CG_TOOL_ROOT := C:/ti/ccsv8/tools/compiler/ti-cgt-c6000_8.2.4
-GEN_OPTS__FLAG :=
-GEN_CMDS__FLAG :=
+GEN_OPTS__FLAG :=
+GEN_CMDS__FLAG :=
ORDERED_OBJS += \
"./tx_block_allocate.obj" \
@@ -305,7 +305,7 @@ endif
-include ../makefile.defs
-# Add inputs and outputs from these tool invocations to the build variables
+# Add inputs and outputs from these tool invocations to the build variables
LIB_OUTPUTS += \
tx.lib \
@@ -329,18 +329,18 @@ endif
# Other Targets
clean:
-$(RM) $(LIB_OUTPUTS__QUOTED)
- -$(RM) "tx_block_allocate.obj" "tx_block_pool_cleanup.obj" "tx_block_pool_create.obj" "tx_block_pool_delete.obj" "tx_block_pool_info_get.obj" "tx_block_pool_initialize.obj" "tx_block_pool_performance_info_get.obj" "tx_block_pool_performance_system_info_get.obj" "tx_block_pool_prioritize.obj" "tx_block_release.obj" "tx_byte_allocate.obj" "tx_byte_pool_cleanup.obj" "tx_byte_pool_create.obj" "tx_byte_pool_delete.obj" "tx_byte_pool_info_get.obj" "tx_byte_pool_initialize.obj" "tx_byte_pool_performance_info_get.obj" "tx_byte_pool_performance_system_info_get.obj" "tx_byte_pool_prioritize.obj" "tx_byte_pool_search.obj" "tx_byte_release.obj" "tx_event_flags_cleanup.obj" "tx_event_flags_create.obj" "tx_event_flags_delete.obj" "tx_event_flags_get.obj" "tx_event_flags_info_get.obj" "tx_event_flags_initialize.obj" "tx_event_flags_performance_info_get.obj" "tx_event_flags_performance_system_info_get.obj" "tx_event_flags_set.obj" "tx_event_flags_set_notify.obj" "tx_initialize_high_level.obj" "tx_initialize_kernel_enter.obj"
- -$(RM) "tx_initialize_kernel_setup.obj" "tx_mutex_cleanup.obj" "tx_mutex_create.obj" "tx_mutex_delete.obj" "tx_mutex_get.obj" "tx_mutex_info_get.obj" "tx_mutex_initialize.obj" "tx_mutex_performance_info_get.obj" "tx_mutex_performance_system_info_get.obj" "tx_mutex_prioritize.obj" "tx_mutex_priority_change.obj" "tx_mutex_put.obj" "tx_queue_cleanup.obj" "tx_queue_create.obj" "tx_queue_delete.obj" "tx_queue_flush.obj" "tx_queue_front_send.obj" "tx_queue_info_get.obj" "tx_queue_initialize.obj" "tx_queue_performance_info_get.obj" "tx_queue_performance_system_info_get.obj" "tx_queue_prioritize.obj" "tx_queue_receive.obj" "tx_queue_send.obj" "tx_queue_send_notify.obj" "tx_semaphore_ceiling_put.obj" "tx_semaphore_cleanup.obj" "tx_semaphore_create.obj" "tx_semaphore_delete.obj" "tx_semaphore_get.obj" "tx_semaphore_info_get.obj" "tx_semaphore_initialize.obj" "tx_semaphore_performance_info_get.obj" "tx_semaphore_performance_system_info_get.obj" "tx_semaphore_prioritize.obj" "tx_semaphore_put.obj" "tx_semaphore_put_notify.obj"
- -$(RM) "tx_thread_context_restore.obj" "tx_thread_context_save.obj" "tx_thread_create.obj" "tx_thread_delete.obj" "tx_thread_entry_exit_notify.obj" "tx_thread_identify.obj" "tx_thread_info_get.obj" "tx_thread_initialize.obj" "tx_thread_interrupt_control.obj" "tx_thread_performance_info_get.obj" "tx_thread_performance_system_info_get.obj" "tx_thread_preemption_change.obj" "tx_thread_priority_change.obj" "tx_thread_relinquish.obj" "tx_thread_reset.obj" "tx_thread_resume.obj" "tx_thread_schedule.obj" "tx_thread_shell_entry.obj" "tx_thread_sleep.obj" "tx_thread_stack_analyze.obj" "tx_thread_stack_build.obj" "tx_thread_stack_error_handler.obj" "tx_thread_stack_error_notify.obj" "tx_thread_suspend.obj" "tx_thread_system_preempt_check.obj" "tx_thread_system_resume.obj" "tx_thread_system_return.obj" "tx_thread_system_suspend.obj" "tx_thread_terminate.obj" "tx_thread_time_slice.obj" "tx_thread_time_slice_change.obj" "tx_thread_timeout.obj" "tx_thread_wait_abort.obj" "tx_time_get.obj" "tx_time_set.obj"
- -$(RM) "tx_timer_activate.obj" "tx_timer_change.obj" "tx_timer_create.obj" "tx_timer_deactivate.obj" "tx_timer_delete.obj" "tx_timer_expiration_process.obj" "tx_timer_info_get.obj" "tx_timer_initialize.obj" "tx_timer_interrupt.obj" "tx_timer_performance_info_get.obj" "tx_timer_performance_system_info_get.obj" "tx_timer_system_activate.obj" "tx_timer_system_deactivate.obj" "tx_timer_thread_entry.obj" "tx_trace_buffer_full_notify.obj" "tx_trace_disable.obj" "tx_trace_enable.obj" "tx_trace_event_filter.obj" "tx_trace_event_unfilter.obj" "tx_trace_initialize.obj" "tx_trace_interrupt_control.obj" "tx_trace_isr_enter_insert.obj" "tx_trace_isr_exit_insert.obj" "tx_trace_object_register.obj" "tx_trace_object_unregister.obj" "tx_trace_user_event_insert.obj" "txe_block_allocate.obj" "txe_block_pool_create.obj" "txe_block_pool_delete.obj" "txe_block_pool_info_get.obj" "txe_block_pool_prioritize.obj" "txe_block_release.obj" "txe_byte_allocate.obj" "txe_byte_pool_create.obj" "txe_byte_pool_delete.obj" "txe_byte_pool_info_get.obj"
- -$(RM) "txe_byte_pool_prioritize.obj" "txe_byte_release.obj" "txe_event_flags_create.obj" "txe_event_flags_delete.obj" "txe_event_flags_get.obj" "txe_event_flags_info_get.obj" "txe_event_flags_set.obj" "txe_event_flags_set_notify.obj" "txe_mutex_create.obj" "txe_mutex_delete.obj" "txe_mutex_get.obj" "txe_mutex_info_get.obj" "txe_mutex_prioritize.obj" "txe_mutex_put.obj" "txe_queue_create.obj" "txe_queue_delete.obj" "txe_queue_flush.obj" "txe_queue_front_send.obj" "txe_queue_info_get.obj" "txe_queue_prioritize.obj" "txe_queue_receive.obj" "txe_queue_send.obj" "txe_queue_send_notify.obj" "txe_semaphore_ceiling_put.obj" "txe_semaphore_create.obj" "txe_semaphore_delete.obj" "txe_semaphore_get.obj" "txe_semaphore_info_get.obj" "txe_semaphore_prioritize.obj" "txe_semaphore_put.obj" "txe_semaphore_put_notify.obj" "txe_thread_create.obj" "txe_thread_delete.obj" "txe_thread_entry_exit_notify.obj" "txe_thread_info_get.obj" "txe_thread_preemption_change.obj" "txe_thread_priority_change.obj" "txe_thread_relinquish.obj"
- -$(RM) "txe_thread_reset.obj" "txe_thread_resume.obj" "txe_thread_suspend.obj" "txe_thread_terminate.obj" "txe_thread_time_slice_change.obj" "txe_thread_wait_abort.obj" "txe_timer_activate.obj" "txe_timer_change.obj" "txe_timer_create.obj" "txe_timer_deactivate.obj" "txe_timer_delete.obj" "txe_timer_info_get.obj"
- -$(RM) "tx_block_allocate.d" "tx_block_pool_cleanup.d" "tx_block_pool_create.d" "tx_block_pool_delete.d" "tx_block_pool_info_get.d" "tx_block_pool_initialize.d" "tx_block_pool_performance_info_get.d" "tx_block_pool_performance_system_info_get.d" "tx_block_pool_prioritize.d" "tx_block_release.d" "tx_byte_allocate.d" "tx_byte_pool_cleanup.d" "tx_byte_pool_create.d" "tx_byte_pool_delete.d" "tx_byte_pool_info_get.d" "tx_byte_pool_initialize.d" "tx_byte_pool_performance_info_get.d" "tx_byte_pool_performance_system_info_get.d" "tx_byte_pool_prioritize.d" "tx_byte_pool_search.d" "tx_byte_release.d" "tx_event_flags_cleanup.d" "tx_event_flags_create.d" "tx_event_flags_delete.d" "tx_event_flags_get.d" "tx_event_flags_info_get.d" "tx_event_flags_initialize.d" "tx_event_flags_performance_info_get.d" "tx_event_flags_performance_system_info_get.d" "tx_event_flags_set.d" "tx_event_flags_set_notify.d" "tx_initialize_high_level.d" "tx_initialize_kernel_enter.d" "tx_initialize_kernel_setup.d" "tx_mutex_cleanup.d"
- -$(RM) "tx_mutex_create.d" "tx_mutex_delete.d" "tx_mutex_get.d" "tx_mutex_info_get.d" "tx_mutex_initialize.d" "tx_mutex_performance_info_get.d" "tx_mutex_performance_system_info_get.d" "tx_mutex_prioritize.d" "tx_mutex_priority_change.d" "tx_mutex_put.d" "tx_queue_cleanup.d" "tx_queue_create.d" "tx_queue_delete.d" "tx_queue_flush.d" "tx_queue_front_send.d" "tx_queue_info_get.d" "tx_queue_initialize.d" "tx_queue_performance_info_get.d" "tx_queue_performance_system_info_get.d" "tx_queue_prioritize.d" "tx_queue_receive.d" "tx_queue_send.d" "tx_queue_send_notify.d" "tx_semaphore_ceiling_put.d" "tx_semaphore_cleanup.d" "tx_semaphore_create.d" "tx_semaphore_delete.d" "tx_semaphore_get.d" "tx_semaphore_info_get.d" "tx_semaphore_initialize.d" "tx_semaphore_performance_info_get.d" "tx_semaphore_performance_system_info_get.d" "tx_semaphore_prioritize.d" "tx_semaphore_put.d" "tx_semaphore_put_notify.d" "tx_thread_create.d" "tx_thread_delete.d" "tx_thread_entry_exit_notify.d" "tx_thread_identify.d" "tx_thread_info_get.d"
- -$(RM) "tx_thread_initialize.d" "tx_thread_performance_info_get.d" "tx_thread_performance_system_info_get.d" "tx_thread_preemption_change.d" "tx_thread_priority_change.d" "tx_thread_relinquish.d" "tx_thread_reset.d" "tx_thread_resume.d" "tx_thread_shell_entry.d" "tx_thread_sleep.d" "tx_thread_stack_analyze.d" "tx_thread_stack_error_handler.d" "tx_thread_stack_error_notify.d" "tx_thread_suspend.d" "tx_thread_system_preempt_check.d" "tx_thread_system_resume.d" "tx_thread_system_suspend.d" "tx_thread_terminate.d" "tx_thread_time_slice.d" "tx_thread_time_slice_change.d" "tx_thread_timeout.d" "tx_thread_wait_abort.d" "tx_time_get.d" "tx_time_set.d" "tx_timer_activate.d" "tx_timer_change.d" "tx_timer_create.d" "tx_timer_deactivate.d" "tx_timer_delete.d" "tx_timer_expiration_process.d" "tx_timer_info_get.d" "tx_timer_initialize.d" "tx_timer_performance_info_get.d" "tx_timer_performance_system_info_get.d" "tx_timer_system_activate.d" "tx_timer_system_deactivate.d" "tx_timer_thread_entry.d" "tx_trace_buffer_full_notify.d"
- -$(RM) "tx_trace_disable.d" "tx_trace_enable.d" "tx_trace_event_filter.d" "tx_trace_event_unfilter.d" "tx_trace_initialize.d" "tx_trace_interrupt_control.d" "tx_trace_isr_enter_insert.d" "tx_trace_isr_exit_insert.d" "tx_trace_object_register.d" "tx_trace_object_unregister.d" "tx_trace_user_event_insert.d" "txe_block_allocate.d" "txe_block_pool_create.d" "txe_block_pool_delete.d" "txe_block_pool_info_get.d" "txe_block_pool_prioritize.d" "txe_block_release.d" "txe_byte_allocate.d" "txe_byte_pool_create.d" "txe_byte_pool_delete.d" "txe_byte_pool_info_get.d" "txe_byte_pool_prioritize.d" "txe_byte_release.d" "txe_event_flags_create.d" "txe_event_flags_delete.d" "txe_event_flags_get.d" "txe_event_flags_info_get.d" "txe_event_flags_set.d" "txe_event_flags_set_notify.d" "txe_mutex_create.d" "txe_mutex_delete.d" "txe_mutex_get.d" "txe_mutex_info_get.d" "txe_mutex_prioritize.d" "txe_mutex_put.d" "txe_queue_create.d" "txe_queue_delete.d" "txe_queue_flush.d" "txe_queue_front_send.d" "txe_queue_info_get.d"
- -$(RM) "txe_queue_prioritize.d" "txe_queue_receive.d" "txe_queue_send.d" "txe_queue_send_notify.d" "txe_semaphore_ceiling_put.d" "txe_semaphore_create.d" "txe_semaphore_delete.d" "txe_semaphore_get.d" "txe_semaphore_info_get.d" "txe_semaphore_prioritize.d" "txe_semaphore_put.d" "txe_semaphore_put_notify.d" "txe_thread_create.d" "txe_thread_delete.d" "txe_thread_entry_exit_notify.d" "txe_thread_info_get.d" "txe_thread_preemption_change.d" "txe_thread_priority_change.d" "txe_thread_relinquish.d" "txe_thread_reset.d" "txe_thread_resume.d" "txe_thread_suspend.d" "txe_thread_terminate.d" "txe_thread_time_slice_change.d" "txe_thread_wait_abort.d" "txe_timer_activate.d" "txe_timer_change.d" "txe_timer_create.d" "txe_timer_deactivate.d" "txe_timer_delete.d" "txe_timer_info_get.d"
- -$(RM) "tx_thread_context_restore.d" "tx_thread_context_save.d" "tx_thread_interrupt_control.d" "tx_thread_schedule.d" "tx_thread_stack_build.d" "tx_thread_system_return.d" "tx_timer_interrupt.d"
+ -$(RM) "tx_block_allocate.obj" "tx_block_pool_cleanup.obj" "tx_block_pool_create.obj" "tx_block_pool_delete.obj" "tx_block_pool_info_get.obj" "tx_block_pool_initialize.obj" "tx_block_pool_performance_info_get.obj" "tx_block_pool_performance_system_info_get.obj" "tx_block_pool_prioritize.obj" "tx_block_release.obj" "tx_byte_allocate.obj" "tx_byte_pool_cleanup.obj" "tx_byte_pool_create.obj" "tx_byte_pool_delete.obj" "tx_byte_pool_info_get.obj" "tx_byte_pool_initialize.obj" "tx_byte_pool_performance_info_get.obj" "tx_byte_pool_performance_system_info_get.obj" "tx_byte_pool_prioritize.obj" "tx_byte_pool_search.obj" "tx_byte_release.obj" "tx_event_flags_cleanup.obj" "tx_event_flags_create.obj" "tx_event_flags_delete.obj" "tx_event_flags_get.obj" "tx_event_flags_info_get.obj" "tx_event_flags_initialize.obj" "tx_event_flags_performance_info_get.obj" "tx_event_flags_performance_system_info_get.obj" "tx_event_flags_set.obj" "tx_event_flags_set_notify.obj" "tx_initialize_high_level.obj" "tx_initialize_kernel_enter.obj"
+ -$(RM) "tx_initialize_kernel_setup.obj" "tx_mutex_cleanup.obj" "tx_mutex_create.obj" "tx_mutex_delete.obj" "tx_mutex_get.obj" "tx_mutex_info_get.obj" "tx_mutex_initialize.obj" "tx_mutex_performance_info_get.obj" "tx_mutex_performance_system_info_get.obj" "tx_mutex_prioritize.obj" "tx_mutex_priority_change.obj" "tx_mutex_put.obj" "tx_queue_cleanup.obj" "tx_queue_create.obj" "tx_queue_delete.obj" "tx_queue_flush.obj" "tx_queue_front_send.obj" "tx_queue_info_get.obj" "tx_queue_initialize.obj" "tx_queue_performance_info_get.obj" "tx_queue_performance_system_info_get.obj" "tx_queue_prioritize.obj" "tx_queue_receive.obj" "tx_queue_send.obj" "tx_queue_send_notify.obj" "tx_semaphore_ceiling_put.obj" "tx_semaphore_cleanup.obj" "tx_semaphore_create.obj" "tx_semaphore_delete.obj" "tx_semaphore_get.obj" "tx_semaphore_info_get.obj" "tx_semaphore_initialize.obj" "tx_semaphore_performance_info_get.obj" "tx_semaphore_performance_system_info_get.obj" "tx_semaphore_prioritize.obj" "tx_semaphore_put.obj" "tx_semaphore_put_notify.obj"
+ -$(RM) "tx_thread_context_restore.obj" "tx_thread_context_save.obj" "tx_thread_create.obj" "tx_thread_delete.obj" "tx_thread_entry_exit_notify.obj" "tx_thread_identify.obj" "tx_thread_info_get.obj" "tx_thread_initialize.obj" "tx_thread_interrupt_control.obj" "tx_thread_performance_info_get.obj" "tx_thread_performance_system_info_get.obj" "tx_thread_preemption_change.obj" "tx_thread_priority_change.obj" "tx_thread_relinquish.obj" "tx_thread_reset.obj" "tx_thread_resume.obj" "tx_thread_schedule.obj" "tx_thread_shell_entry.obj" "tx_thread_sleep.obj" "tx_thread_stack_analyze.obj" "tx_thread_stack_build.obj" "tx_thread_stack_error_handler.obj" "tx_thread_stack_error_notify.obj" "tx_thread_suspend.obj" "tx_thread_system_preempt_check.obj" "tx_thread_system_resume.obj" "tx_thread_system_return.obj" "tx_thread_system_suspend.obj" "tx_thread_terminate.obj" "tx_thread_time_slice.obj" "tx_thread_time_slice_change.obj" "tx_thread_timeout.obj" "tx_thread_wait_abort.obj" "tx_time_get.obj" "tx_time_set.obj"
+ -$(RM) "tx_timer_activate.obj" "tx_timer_change.obj" "tx_timer_create.obj" "tx_timer_deactivate.obj" "tx_timer_delete.obj" "tx_timer_expiration_process.obj" "tx_timer_info_get.obj" "tx_timer_initialize.obj" "tx_timer_interrupt.obj" "tx_timer_performance_info_get.obj" "tx_timer_performance_system_info_get.obj" "tx_timer_system_activate.obj" "tx_timer_system_deactivate.obj" "tx_timer_thread_entry.obj" "tx_trace_buffer_full_notify.obj" "tx_trace_disable.obj" "tx_trace_enable.obj" "tx_trace_event_filter.obj" "tx_trace_event_unfilter.obj" "tx_trace_initialize.obj" "tx_trace_interrupt_control.obj" "tx_trace_isr_enter_insert.obj" "tx_trace_isr_exit_insert.obj" "tx_trace_object_register.obj" "tx_trace_object_unregister.obj" "tx_trace_user_event_insert.obj" "txe_block_allocate.obj" "txe_block_pool_create.obj" "txe_block_pool_delete.obj" "txe_block_pool_info_get.obj" "txe_block_pool_prioritize.obj" "txe_block_release.obj" "txe_byte_allocate.obj" "txe_byte_pool_create.obj" "txe_byte_pool_delete.obj" "txe_byte_pool_info_get.obj"
+ -$(RM) "txe_byte_pool_prioritize.obj" "txe_byte_release.obj" "txe_event_flags_create.obj" "txe_event_flags_delete.obj" "txe_event_flags_get.obj" "txe_event_flags_info_get.obj" "txe_event_flags_set.obj" "txe_event_flags_set_notify.obj" "txe_mutex_create.obj" "txe_mutex_delete.obj" "txe_mutex_get.obj" "txe_mutex_info_get.obj" "txe_mutex_prioritize.obj" "txe_mutex_put.obj" "txe_queue_create.obj" "txe_queue_delete.obj" "txe_queue_flush.obj" "txe_queue_front_send.obj" "txe_queue_info_get.obj" "txe_queue_prioritize.obj" "txe_queue_receive.obj" "txe_queue_send.obj" "txe_queue_send_notify.obj" "txe_semaphore_ceiling_put.obj" "txe_semaphore_create.obj" "txe_semaphore_delete.obj" "txe_semaphore_get.obj" "txe_semaphore_info_get.obj" "txe_semaphore_prioritize.obj" "txe_semaphore_put.obj" "txe_semaphore_put_notify.obj" "txe_thread_create.obj" "txe_thread_delete.obj" "txe_thread_entry_exit_notify.obj" "txe_thread_info_get.obj" "txe_thread_preemption_change.obj" "txe_thread_priority_change.obj" "txe_thread_relinquish.obj"
+ -$(RM) "txe_thread_reset.obj" "txe_thread_resume.obj" "txe_thread_suspend.obj" "txe_thread_terminate.obj" "txe_thread_time_slice_change.obj" "txe_thread_wait_abort.obj" "txe_timer_activate.obj" "txe_timer_change.obj" "txe_timer_create.obj" "txe_timer_deactivate.obj" "txe_timer_delete.obj" "txe_timer_info_get.obj"
+ -$(RM) "tx_block_allocate.d" "tx_block_pool_cleanup.d" "tx_block_pool_create.d" "tx_block_pool_delete.d" "tx_block_pool_info_get.d" "tx_block_pool_initialize.d" "tx_block_pool_performance_info_get.d" "tx_block_pool_performance_system_info_get.d" "tx_block_pool_prioritize.d" "tx_block_release.d" "tx_byte_allocate.d" "tx_byte_pool_cleanup.d" "tx_byte_pool_create.d" "tx_byte_pool_delete.d" "tx_byte_pool_info_get.d" "tx_byte_pool_initialize.d" "tx_byte_pool_performance_info_get.d" "tx_byte_pool_performance_system_info_get.d" "tx_byte_pool_prioritize.d" "tx_byte_pool_search.d" "tx_byte_release.d" "tx_event_flags_cleanup.d" "tx_event_flags_create.d" "tx_event_flags_delete.d" "tx_event_flags_get.d" "tx_event_flags_info_get.d" "tx_event_flags_initialize.d" "tx_event_flags_performance_info_get.d" "tx_event_flags_performance_system_info_get.d" "tx_event_flags_set.d" "tx_event_flags_set_notify.d" "tx_initialize_high_level.d" "tx_initialize_kernel_enter.d" "tx_initialize_kernel_setup.d" "tx_mutex_cleanup.d"
+ -$(RM) "tx_mutex_create.d" "tx_mutex_delete.d" "tx_mutex_get.d" "tx_mutex_info_get.d" "tx_mutex_initialize.d" "tx_mutex_performance_info_get.d" "tx_mutex_performance_system_info_get.d" "tx_mutex_prioritize.d" "tx_mutex_priority_change.d" "tx_mutex_put.d" "tx_queue_cleanup.d" "tx_queue_create.d" "tx_queue_delete.d" "tx_queue_flush.d" "tx_queue_front_send.d" "tx_queue_info_get.d" "tx_queue_initialize.d" "tx_queue_performance_info_get.d" "tx_queue_performance_system_info_get.d" "tx_queue_prioritize.d" "tx_queue_receive.d" "tx_queue_send.d" "tx_queue_send_notify.d" "tx_semaphore_ceiling_put.d" "tx_semaphore_cleanup.d" "tx_semaphore_create.d" "tx_semaphore_delete.d" "tx_semaphore_get.d" "tx_semaphore_info_get.d" "tx_semaphore_initialize.d" "tx_semaphore_performance_info_get.d" "tx_semaphore_performance_system_info_get.d" "tx_semaphore_prioritize.d" "tx_semaphore_put.d" "tx_semaphore_put_notify.d" "tx_thread_create.d" "tx_thread_delete.d" "tx_thread_entry_exit_notify.d" "tx_thread_identify.d" "tx_thread_info_get.d"
+ -$(RM) "tx_thread_initialize.d" "tx_thread_performance_info_get.d" "tx_thread_performance_system_info_get.d" "tx_thread_preemption_change.d" "tx_thread_priority_change.d" "tx_thread_relinquish.d" "tx_thread_reset.d" "tx_thread_resume.d" "tx_thread_shell_entry.d" "tx_thread_sleep.d" "tx_thread_stack_analyze.d" "tx_thread_stack_error_handler.d" "tx_thread_stack_error_notify.d" "tx_thread_suspend.d" "tx_thread_system_preempt_check.d" "tx_thread_system_resume.d" "tx_thread_system_suspend.d" "tx_thread_terminate.d" "tx_thread_time_slice.d" "tx_thread_time_slice_change.d" "tx_thread_timeout.d" "tx_thread_wait_abort.d" "tx_time_get.d" "tx_time_set.d" "tx_timer_activate.d" "tx_timer_change.d" "tx_timer_create.d" "tx_timer_deactivate.d" "tx_timer_delete.d" "tx_timer_expiration_process.d" "tx_timer_info_get.d" "tx_timer_initialize.d" "tx_timer_performance_info_get.d" "tx_timer_performance_system_info_get.d" "tx_timer_system_activate.d" "tx_timer_system_deactivate.d" "tx_timer_thread_entry.d" "tx_trace_buffer_full_notify.d"
+ -$(RM) "tx_trace_disable.d" "tx_trace_enable.d" "tx_trace_event_filter.d" "tx_trace_event_unfilter.d" "tx_trace_initialize.d" "tx_trace_interrupt_control.d" "tx_trace_isr_enter_insert.d" "tx_trace_isr_exit_insert.d" "tx_trace_object_register.d" "tx_trace_object_unregister.d" "tx_trace_user_event_insert.d" "txe_block_allocate.d" "txe_block_pool_create.d" "txe_block_pool_delete.d" "txe_block_pool_info_get.d" "txe_block_pool_prioritize.d" "txe_block_release.d" "txe_byte_allocate.d" "txe_byte_pool_create.d" "txe_byte_pool_delete.d" "txe_byte_pool_info_get.d" "txe_byte_pool_prioritize.d" "txe_byte_release.d" "txe_event_flags_create.d" "txe_event_flags_delete.d" "txe_event_flags_get.d" "txe_event_flags_info_get.d" "txe_event_flags_set.d" "txe_event_flags_set_notify.d" "txe_mutex_create.d" "txe_mutex_delete.d" "txe_mutex_get.d" "txe_mutex_info_get.d" "txe_mutex_prioritize.d" "txe_mutex_put.d" "txe_queue_create.d" "txe_queue_delete.d" "txe_queue_flush.d" "txe_queue_front_send.d" "txe_queue_info_get.d"
+ -$(RM) "txe_queue_prioritize.d" "txe_queue_receive.d" "txe_queue_send.d" "txe_queue_send_notify.d" "txe_semaphore_ceiling_put.d" "txe_semaphore_create.d" "txe_semaphore_delete.d" "txe_semaphore_get.d" "txe_semaphore_info_get.d" "txe_semaphore_prioritize.d" "txe_semaphore_put.d" "txe_semaphore_put_notify.d" "txe_thread_create.d" "txe_thread_delete.d" "txe_thread_entry_exit_notify.d" "txe_thread_info_get.d" "txe_thread_preemption_change.d" "txe_thread_priority_change.d" "txe_thread_relinquish.d" "txe_thread_reset.d" "txe_thread_resume.d" "txe_thread_suspend.d" "txe_thread_terminate.d" "txe_thread_time_slice_change.d" "txe_thread_wait_abort.d" "txe_timer_activate.d" "txe_timer_change.d" "txe_timer_create.d" "txe_timer_deactivate.d" "txe_timer_delete.d" "txe_timer_info_get.d"
+ -$(RM) "tx_thread_context_restore.d" "tx_thread_context_save.d" "tx_thread_interrupt_control.d" "tx_thread_schedule.d" "tx_thread_stack_build.d" "tx_thread_system_return.d" "tx_timer_interrupt.d"
-@echo 'Finished clean'
-@echo ' '
diff --git a/ports/c667x/ccs/example_build/tx/Release/sources.mk b/ports/c667x/ccs/example_build/tx/Release/sources.mk
index 9cbc2a26..95c7e8c3 100644
--- a/ports/c667x/ccs/example_build/tx/Release/sources.mk
+++ b/ports/c667x/ccs/example_build/tx/Release/sources.mk
@@ -2,107 +2,107 @@
# Automatically-generated file. Do not edit!
################################################################################
-C55_SRCS :=
-A_SRCS :=
-ASM_UPPER_SRCS :=
-LDS_UPPER_SRCS :=
-CPP_SRCS :=
-CMD_SRCS :=
-O_SRCS :=
-C??_SRCS :=
-C64_SRCS :=
-C67_SRCS :=
-SA_SRCS :=
-S64_SRCS :=
-OPT_SRCS :=
-CXX_SRCS :=
-S67_SRCS :=
-S??_SRCS :=
-PDE_SRCS :=
-SV7A_SRCS :=
-K_SRCS :=
-CLA_SRCS :=
-S55_SRCS :=
-LD_UPPER_SRCS :=
-INO_SRCS :=
-LIB_SRCS :=
-ASM_SRCS :=
-S_UPPER_SRCS :=
-S43_SRCS :=
-LD_SRCS :=
-CMD_UPPER_SRCS :=
-C_UPPER_SRCS :=
-C++_SRCS :=
-C43_SRCS :=
-OBJ_SRCS :=
-LDS_SRCS :=
-S_SRCS :=
-CC_SRCS :=
-S62_SRCS :=
-C62_SRCS :=
-C_SRCS :=
-C55_DEPS :=
-C_UPPER_DEPS :=
-S67_DEPS :=
-S62_DEPS :=
-S_DEPS :=
-OPT_DEPS :=
-C??_DEPS :=
-ASM_UPPER_DEPS :=
-S??_DEPS :=
-C64_DEPS :=
-CXX_DEPS :=
-S64_DEPS :=
-INO_DEPS :=
-CLA_DEPS :=
-S55_DEPS :=
-SV7A_DEPS :=
-C62_DEPS :=
-C67_DEPS :=
-PDE_DEPS :=
-K_DEPS :=
-C_DEPS :=
-LIB_OUTPUTS :=
-CC_DEPS :=
-C++_DEPS :=
-C43_DEPS :=
-S43_DEPS :=
-OBJS :=
-ASM_DEPS :=
-S_UPPER_DEPS :=
-CPP_DEPS :=
-SA_DEPS :=
-C++_DEPS__QUOTED :=
-OPT_DEPS__QUOTED :=
-S_UPPER_DEPS__QUOTED :=
-SA_DEPS__QUOTED :=
-C??_DEPS__QUOTED :=
-S67_DEPS__QUOTED :=
-C55_DEPS__QUOTED :=
-CC_DEPS__QUOTED :=
-ASM_UPPER_DEPS__QUOTED :=
-SV7A_DEPS__QUOTED :=
-S??_DEPS__QUOTED :=
-OBJS__QUOTED :=
-C67_DEPS__QUOTED :=
-LIB_OUTPUTS__QUOTED :=
-K_DEPS__QUOTED :=
-S55_DEPS__QUOTED :=
-INO_DEPS__QUOTED :=
-C62_DEPS__QUOTED :=
-C_DEPS__QUOTED :=
-C_UPPER_DEPS__QUOTED :=
-C43_DEPS__QUOTED :=
-CPP_DEPS__QUOTED :=
-C64_DEPS__QUOTED :=
-CXX_DEPS__QUOTED :=
-CLA_DEPS__QUOTED :=
-S_DEPS__QUOTED :=
-ASM_DEPS__QUOTED :=
-S43_DEPS__QUOTED :=
-S64_DEPS__QUOTED :=
-S62_DEPS__QUOTED :=
-PDE_DEPS__QUOTED :=
+C55_SRCS :=
+A_SRCS :=
+ASM_UPPER_SRCS :=
+LDS_UPPER_SRCS :=
+CPP_SRCS :=
+CMD_SRCS :=
+O_SRCS :=
+C??_SRCS :=
+C64_SRCS :=
+C67_SRCS :=
+SA_SRCS :=
+S64_SRCS :=
+OPT_SRCS :=
+CXX_SRCS :=
+S67_SRCS :=
+S??_SRCS :=
+PDE_SRCS :=
+SV7A_SRCS :=
+K_SRCS :=
+CLA_SRCS :=
+S55_SRCS :=
+LD_UPPER_SRCS :=
+INO_SRCS :=
+LIB_SRCS :=
+ASM_SRCS :=
+S_UPPER_SRCS :=
+S43_SRCS :=
+LD_SRCS :=
+CMD_UPPER_SRCS :=
+C_UPPER_SRCS :=
+C++_SRCS :=
+C43_SRCS :=
+OBJ_SRCS :=
+LDS_SRCS :=
+S_SRCS :=
+CC_SRCS :=
+S62_SRCS :=
+C62_SRCS :=
+C_SRCS :=
+C55_DEPS :=
+C_UPPER_DEPS :=
+S67_DEPS :=
+S62_DEPS :=
+S_DEPS :=
+OPT_DEPS :=
+C??_DEPS :=
+ASM_UPPER_DEPS :=
+S??_DEPS :=
+C64_DEPS :=
+CXX_DEPS :=
+S64_DEPS :=
+INO_DEPS :=
+CLA_DEPS :=
+S55_DEPS :=
+SV7A_DEPS :=
+C62_DEPS :=
+C67_DEPS :=
+PDE_DEPS :=
+K_DEPS :=
+C_DEPS :=
+LIB_OUTPUTS :=
+CC_DEPS :=
+C++_DEPS :=
+C43_DEPS :=
+S43_DEPS :=
+OBJS :=
+ASM_DEPS :=
+S_UPPER_DEPS :=
+CPP_DEPS :=
+SA_DEPS :=
+C++_DEPS__QUOTED :=
+OPT_DEPS__QUOTED :=
+S_UPPER_DEPS__QUOTED :=
+SA_DEPS__QUOTED :=
+C??_DEPS__QUOTED :=
+S67_DEPS__QUOTED :=
+C55_DEPS__QUOTED :=
+CC_DEPS__QUOTED :=
+ASM_UPPER_DEPS__QUOTED :=
+SV7A_DEPS__QUOTED :=
+S??_DEPS__QUOTED :=
+OBJS__QUOTED :=
+C67_DEPS__QUOTED :=
+LIB_OUTPUTS__QUOTED :=
+K_DEPS__QUOTED :=
+S55_DEPS__QUOTED :=
+INO_DEPS__QUOTED :=
+C62_DEPS__QUOTED :=
+C_DEPS__QUOTED :=
+C_UPPER_DEPS__QUOTED :=
+C43_DEPS__QUOTED :=
+CPP_DEPS__QUOTED :=
+C64_DEPS__QUOTED :=
+CXX_DEPS__QUOTED :=
+CLA_DEPS__QUOTED :=
+S_DEPS__QUOTED :=
+ASM_DEPS__QUOTED :=
+S43_DEPS__QUOTED :=
+S64_DEPS__QUOTED :=
+S62_DEPS__QUOTED :=
+PDE_DEPS__QUOTED :=
# Every subdirectory with source files must be described here
SUBDIRS := \
diff --git a/ports/c667x/ccs/example_build/tx/Release/subdir_vars.mk b/ports/c667x/ccs/example_build/tx/Release/subdir_vars.mk
index 6a6a3ffd..70ef8b01 100644
--- a/ports/c667x/ccs/example_build/tx/Release/subdir_vars.mk
+++ b/ports/c667x/ccs/example_build/tx/Release/subdir_vars.mk
@@ -4,7 +4,7 @@
SHELL = cmd.exe
-# Add inputs and outputs from these tool invocations to the build variables
+# Add inputs and outputs from these tool invocations to the build variables
ASM_SRCS += \
../tx_thread_context_restore.asm \
../tx_thread_context_save.asm \
@@ -12,7 +12,7 @@ ASM_SRCS += \
../tx_thread_schedule.asm \
../tx_thread_stack_build.asm \
../tx_thread_system_return.asm \
-../tx_timer_interrupt.asm
+../tx_timer_interrupt.asm
C_SRCS += \
../tx_block_allocate.c \
@@ -198,7 +198,7 @@ C_SRCS += \
../txe_timer_create.c \
../txe_timer_deactivate.c \
../txe_timer_delete.c \
-../txe_timer_info_get.c
+../txe_timer_info_get.c
C_DEPS += \
./tx_block_allocate.d \
@@ -384,7 +384,7 @@ C_DEPS += \
./txe_timer_create.d \
./txe_timer_deactivate.d \
./txe_timer_delete.d \
-./txe_timer_info_get.d
+./txe_timer_info_get.d
OBJS += \
./tx_block_allocate.obj \
@@ -577,7 +577,7 @@ OBJS += \
./txe_timer_create.obj \
./txe_timer_deactivate.obj \
./txe_timer_delete.obj \
-./txe_timer_info_get.obj
+./txe_timer_info_get.obj
ASM_DEPS += \
./tx_thread_context_restore.d \
@@ -586,7 +586,7 @@ ASM_DEPS += \
./tx_thread_schedule.d \
./tx_thread_stack_build.d \
./tx_thread_system_return.d \
-./tx_timer_interrupt.d
+./tx_timer_interrupt.d
OBJS__QUOTED += \
"tx_block_allocate.obj" \
@@ -779,7 +779,7 @@ OBJS__QUOTED += \
"txe_timer_create.obj" \
"txe_timer_deactivate.obj" \
"txe_timer_delete.obj" \
-"txe_timer_info_get.obj"
+"txe_timer_info_get.obj"
C_DEPS__QUOTED += \
"tx_block_allocate.d" \
@@ -965,7 +965,7 @@ C_DEPS__QUOTED += \
"txe_timer_create.d" \
"txe_timer_deactivate.d" \
"txe_timer_delete.d" \
-"txe_timer_info_get.d"
+"txe_timer_info_get.d"
ASM_DEPS__QUOTED += \
"tx_thread_context_restore.d" \
@@ -974,7 +974,7 @@ ASM_DEPS__QUOTED += \
"tx_thread_schedule.d" \
"tx_thread_stack_build.d" \
"tx_thread_system_return.d" \
-"tx_timer_interrupt.d"
+"tx_timer_interrupt.d"
C_SRCS__QUOTED += \
"../tx_block_allocate.c" \
@@ -1160,7 +1160,7 @@ C_SRCS__QUOTED += \
"../txe_timer_create.c" \
"../txe_timer_deactivate.c" \
"../txe_timer_delete.c" \
-"../txe_timer_info_get.c"
+"../txe_timer_info_get.c"
ASM_SRCS__QUOTED += \
"../tx_thread_context_restore.asm" \
@@ -1169,6 +1169,6 @@ ASM_SRCS__QUOTED += \
"../tx_thread_schedule.asm" \
"../tx_thread_stack_build.asm" \
"../tx_thread_system_return.asm" \
-"../tx_timer_interrupt.asm"
+"../tx_timer_interrupt.asm"
diff --git a/ports/c667x/ccs/inc/tx_port.h b/ports/c667x/ccs/inc/tx_port.h
index 55fa6dfd..6f5a9838 100644
--- a/ports/c667x/ccs/inc/tx_port.h
+++ b/ports/c667x/ccs/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,10 +21,10 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
/* tx_port.h C667x/TI */
/* 6.1.11 */
/* */
@@ -32,28 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Wenhui Xie Modified comment(s), */
-/* optimized the definition of */
-/* TX_TIMER_TICKS_PER_SECOND, */
-/* resulting in version 6.1.11 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -66,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -80,7 +68,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -116,12 +104,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 2048 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX C6xxx port. */
+/* Define various constants for the ThreadX C6xxx port. */
#define TX_INT_DISABLE 0x00 /* Disable interrupts */
#define TX_INT_ENABLE 0x01 /* Enable interrupts */
@@ -132,8 +120,8 @@ typedef unsigned short USHORT;
#endif
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -162,7 +150,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -174,13 +162,13 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
-#define TX_THREAD_EXTENSION_2
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -196,11 +184,11 @@ typedef unsigned short USHORT;
#define TX_TIMER_INTERNAL_EXTENSION ULONG tx_timer_internal_padding;
*/
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -208,8 +196,8 @@ typedef unsigned short USHORT;
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -236,9 +224,9 @@ typedef unsigned short USHORT;
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -269,8 +257,8 @@ unsigned int _tx_thread_interrupt_control(unsigned int);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX C667x/TI Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX C667x/TI Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/c667x/ccs/readme_threadx.txt b/ports/c667x/ccs/readme_threadx.txt
index 8826de45..989f0b49 100644
--- a/ports/c667x/ccs/readme_threadx.txt
+++ b/ports/c667x/ccs/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for TMS320C667x
+ Microsoft's Azure RTOS ThreadX for TMS320C667x
Using the TI Code Composer Tools
@@ -17,73 +17,73 @@ It is assumed the tools are installed in the default directories:
CCS path by default - c:\ti\ccsv(version number)
MCSDK path by default - c:\ti
-If the packages are installed in different directories, the ThreadX project
+If the packages are installed in different directories, the ThreadX project
settings must be adjusted.
-2. Open the Azure RTOS Workspace
+2. Open the Azure RTOS Workspace
-In order to build the ThreadX library and the ThreadX demonstration first open
-the Azure RTOS Workspace inside your ThreadX installation directory.
+In order to build the ThreadX library and the ThreadX demonstration first open
+the Azure RTOS Workspace inside your ThreadX installation directory.
3. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply import the CCS project file
-"tx" and then select the build button. You should now observe the compilation
-and assembly of the ThreadX library. This project build produces the ThreadX
+Building the ThreadX library is easy; simply import the CCS project file
+"tx" and then select the build button. You should now observe the compilation
+and assembly of the ThreadX library. This project build produces the ThreadX
library file tx.lib.
4. Demonstration System
-The ThreadX demonstration is designed to execute on the C6678EVM evaluation board.
+The ThreadX demonstration is designed to execute on the C6678EVM evaluation board.
Building the demonstration is easy; simply import the "sample_threadx_c6678evm" project.
-Now select "Project -> Build Active Project" to build the ThreadX demonstration,
-which produces the sample_threadx.out file in the "Debug" directory. You are now
+Now select "Project -> Build Active Project" to build the ThreadX demonstration,
+which produces the sample_threadx.out file in the "Debug" directory. You are now
ready to run the ThreadX demonstration on the C6678EVM evaluation board.
-Please refer to Chapter 6 of the ThreadX User Guide for a complete description
-of this demonstration.
+Please refer to Chapter 6 of the ThreadX User Guide for a complete description
+of this demonstration.
5. System Initialization
-The entry point in ThreadX for the TMS320C667x using the TI tools is at label
-_c_int00. This is defined within the TI library. In addition, this is
-where all static and global pre-set C variable initialization processing
+The entry point in ThreadX for the TMS320C667x using the TI tools is at label
+_c_int00. This is defined within the TI library. In addition, this is
+where all static and global pre-set C variable initialization processing
takes place.
-The ThreadX initialization file tx_initialize_low_level.asm is responsible
-for setting up various system data structures, the vector area, and a periodic
-timer interrupt source. By default, the vector area is defined to be located in
-the "vectors" section, which is defined at the top of tx_initialize_low_level.asm.
-This area is located at address 0 for the demonstration.
+The ThreadX initialization file tx_initialize_low_level.asm is responsible
+for setting up various system data structures, the vector area, and a periodic
+timer interrupt source. By default, the vector area is defined to be located in
+the "vectors" section, which is defined at the top of tx_initialize_low_level.asm.
+This area is located at address 0 for the demonstration.
-tx_initialize_low_level.asm is also where initialization of a periodic timer
+tx_initialize_low_level.asm is also where initialization of a periodic timer
interrupt source should take place.
-In addition, _tx_initialize_low_level determines the first available address
-for use by the application. By default, free memory is assumed to start after
+In addition, _tx_initialize_low_level determines the first available address
+for use by the application. By default, free memory is assumed to start after
the .zend section in RAM (defined in tx_initialize_low_level). This section
must be placed at the end of your other RAM sections. Please see sample_threadx.cmd
-for an example. The address of this section is passed to the application definition
+for an example. The address of this section is passed to the application definition
function, tx_application_define.
6. Register Usage and Stack Frames
-The TI TMS320C667x compiler assumes that registers A0-A9, A16-A31, B0-B9, and
-B16-B31 are scratch registers for each function. All other registers used by
-a C function must be preserved by the function. ThreadX takes advantage of this
-in situations where a context switch happens as a result of making a ThreadX
-service call (which is itself a C function). In such cases, the saved context
+The TI TMS320C667x compiler assumes that registers A0-A9, A16-A31, B0-B9, and
+B16-B31 are scratch registers for each function. All other registers used by
+a C function must be preserved by the function. ThreadX takes advantage of this
+in situations where a context switch happens as a result of making a ThreadX
+service call (which is itself a C function). In such cases, the saved context
of a thread is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -101,10 +101,10 @@ associated thread control block TX_THREAD.
0x24 A4 A14
0x28 A5 A15
0x2C A6 B10
- 0x30 A7 B11
- 0x34 A8 B12
- 0x38 A9 B13
- 0x3C A10 ILC
+ 0x30 A7 B11
+ 0x34 A8 B12
+ 0x38 A9 B13
+ 0x3C A10 ILC
0x40 A11 RILC
0x44 A12
0x48 A13
@@ -159,38 +159,38 @@ associated thread control block TX_THREAD.
0x10C ILC
0x110 RILC
0x114 ITSR
-
+
7. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some performance.
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some performance.
To make it run faster, you can replace the -g compiler option
-to a -O3 in the ThreadX project file to enable all compiler optimizations.
+to a -O3 in the ThreadX project file to enable all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
8. Interrupt Handling
-ThreadX provides complete and high-performance interrupt handling for
-TMS320C667x targets. There are a certain set of requirements that are
+ThreadX provides complete and high-performance interrupt handling for
+TMS320C667x targets. There are a certain set of requirements that are
defined in the following sub-sections:
8.1 Vector Area
-The TMS320C667x interrupt vectors at in the section "vectors" and is defined at
-the top of tx_initialize_low_level.asm. Each interrupt vector entry contains
-a jump to a template interrupt processing shell.
+The TMS320C667x interrupt vectors at in the section "vectors" and is defined at
+the top of tx_initialize_low_level.asm. Each interrupt vector entry contains
+a jump to a template interrupt processing shell.
8.2 Interrupt Service Routine Shells
-The following interrupt processing shells are defined at the bottom of
+The following interrupt processing shells are defined at the bottom of
tx_initialize_low_level.asm:
@@ -207,18 +207,18 @@ tx_initialize_low_level.asm:
__tx_int14_ISR
__tx_int15_ISR
-Each interrupt ISR is entered with B3, A0-A4 is available (these registers are
-saved in the initial vector processing). The default interrupt handling
+Each interrupt ISR is entered with B3, A0-A4 is available (these registers are
+saved in the initial vector processing). The default interrupt handling
includes calls to __tx_thread_context_save and __tx_thread_context_restore.
-Application ISR processing can be added between the context save/restore
+Application ISR processing can be added between the context save/restore
calls. Note that only the compiler scratch registers are available for use
after context save return to the ISR.
-High-frequency interrupt handlers might not want to perform context
-save/restore processing on each interrupt. If this is the case, any
+High-frequency interrupt handlers might not want to perform context
+save/restore processing on each interrupt. If this is the case, any
additional registers used must be saved and restored by the ISR and
the interrupt return processing must restore the registers saved by the
-initial vector processing. This can be accomplished by adding the
+initial vector processing. This can be accomplished by adding the
following code to the end of the custom ISR handling:
LDW *+SP(20),A0 ; Recover A0
diff --git a/ports/c667x/ccs/src/tx_thread_context_restore.asm b/ports/c667x/ccs/src/tx_thread_context_restore.asm
index 593881ba..496e413e 100644
--- a/ports/c667x/ccs/src/tx_thread_context_restore.asm
+++ b/ports/c667x/ccs/src/tx_thread_context_restore.asm
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -43,41 +43,41 @@ SP .set B15
;
;
.sect ".text"
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore C667x/TI */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore C667x/TI */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
+;/* */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
+;/* */
+;/* RELEASE HISTORY */
+;/* */
;/* DATE NAME DESCRIPTION */
;/* */
;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -99,20 +99,20 @@ _tx_thread_context_restore:
; {
;
MVKL _tx_thread_system_state,A0 ; Build address of system state
- MVKH _tx_thread_system_state,A0 ;
+ MVKH _tx_thread_system_state,A0 ;
LDW *A0,A1 ; Pickup system state variable
MVKL _tx_thread_current_ptr,A2 ; Build address of current thread ptr
NOP 3 ; Delay slots
SUB A1,1,A1 ; Decrement system state
[!A1] B _tx_thread_not_nested_restore ; If 0, not a nested restore
- MVKH _tx_thread_current_ptr,A2 ;
+ MVKH _tx_thread_current_ptr,A2 ;
LDW *A2,A3 ; Pickup current thread pointer
STW A1,*A0 ; Store system state
NOP 2 ; Delay slots
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDW *+SP(8),B0 ; Recover saved CSR
@@ -196,19 +196,19 @@ _tx_thread_not_nested_restore:
MV A3,A1 ; Move thread pointer into A1
[!A1] B _tx_thread_schedule ; If null, idle system restore
MVKL _tx_thread_preempt_disable,A0 ; Build preempt disable flag address
- MVKH _tx_thread_preempt_disable,A0 ;
+ MVKH _tx_thread_preempt_disable,A0 ;
MVKL _tx_thread_execute_ptr,A4 ; Build execute thread pointer
- MVKH _tx_thread_execute_ptr,A4 ;
+ MVKH _tx_thread_execute_ptr,A4 ;
LDW *A0,B1 ; Pickup preempt disable flag
- LDW *A4,A6 ; Pickup next thread to execute
+ LDW *A4,A6 ; Pickup next thread to execute
NOP 4 ; Delay slot
CMPEQ A6,A1,A7 ; Determine if threads are the same?
ADD A7,B1,B1 ; Add results together
[B1] B _tx_thread_no_preempt_restore ; If set, skip preeemption
LDW *+A1(8),A6 ; Recover thread's stack pointer
MVKL _tx_timer_time_slice,A5 ; Build time slice address
- MVKH _tx_timer_time_slice,A5 ;
+ MVKH _tx_timer_time_slice,A5 ;
LDW *A5,B1 ; Pickup current time-slice
NOP ; Delay slot
;
diff --git a/ports/c667x/ccs/src/tx_thread_context_save.asm b/ports/c667x/ccs/src/tx_thread_context_save.asm
index 795f720e..c6a6c307 100644
--- a/ports/c667x/ccs/src/tx_thread_context_save.asm
+++ b/ports/c667x/ccs/src/tx_thread_context_save.asm
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -39,40 +39,40 @@ SP .set B15
;
;
.sect ".text"
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save C667x/TI */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save C667x/TI */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
+;/* */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
+;/* */
+;/* RELEASE HISTORY */
+;/* */
;/* DATE NAME DESCRIPTION */
;/* */
;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -93,7 +93,7 @@ _tx_thread_context_save:
; {
;
MVKL _tx_thread_system_state,A0 ; Build address of system state
- MVKH _tx_thread_system_state,A0 ;
+ MVKH _tx_thread_system_state,A0 ;
LDW *A0,A1 ; Pickup current system state
STW A5,*+SP(40) ; Save A5
STW A6,*+SP(44) ; Save A6
@@ -101,7 +101,7 @@ _tx_thread_context_save:
STW A8,*+SP(52) ; Save A8
[!A1] B _tx_thread_not_nested_save ; If 0, not a nested save condition
MVKL _tx_thread_current_ptr,A3 ; Build address of current thread ptr
- MVKH _tx_thread_current_ptr,A3 ;
+ MVKH _tx_thread_current_ptr,A3 ;
LDW *A3,A2 ; Pickup current thread pointer
ADD 1,A1,A1 ; Increment the system state (nested) counter
STW A1,*A0 ; Store system state
@@ -261,7 +261,7 @@ _tx_thread_idle_system_save:
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to ISR
+; /* Not much to do here, just adjust the stack pointer, and return to ISR
; processing. */
;
B B3 ; Return to ISR
diff --git a/ports/c667x/ccs/src/tx_thread_interrupt_control.asm b/ports/c667x/ccs/src/tx_thread_interrupt_control.asm
index ff39fe91..f43aee94 100644
--- a/ports/c667x/ccs/src/tx_thread_interrupt_control.asm
+++ b/ports/c667x/ccs/src/tx_thread_interrupt_control.asm
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,39 +34,39 @@ SP .set B15
;
;
.sect ".text"
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control C667x/TI */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control C667x/TI */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
+;/* */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
+;/* */
+;/* RELEASE HISTORY */
+;/* */
;/* DATE NAME DESCRIPTION */
;/* */
;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
diff --git a/ports/c667x/ccs/src/tx_thread_schedule.asm b/ports/c667x/ccs/src/tx_thread_schedule.asm
index 2b40fec1..10d0b3ad 100644
--- a/ports/c667x/ccs/src/tx_thread_schedule.asm
+++ b/ports/c667x/ccs/src/tx_thread_schedule.asm
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -40,42 +40,42 @@ SP .set B15
;
;
.sect ".text"
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule C667x/TI */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule C667x/TI */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
+;/* */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
;/* None */
-;/* */
-;/* CALLS */
-;/* */
+;/* */
+;/* OUTPUT */
+;/* */
;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
+;/* */
+;/* RELEASE HISTORY */
+;/* */
;/* DATE NAME DESCRIPTION */
;/* */
;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -92,7 +92,7 @@ _tx_thread_schedule
OR 1,B0,B0 ; Build interrupt enable value
MVC B0,CSR ; Enable interrupts
MVKL _tx_thread_execute_ptr,A0 ; Build address of execute pointer
- MVKH _tx_thread_execute_ptr,A0 ;
+ MVKH _tx_thread_execute_ptr,A0 ;
;
; /* Wait for a thread to execute. */
; do
@@ -106,13 +106,13 @@ _tx_thread_schedule_loop:
; to become ready
MV A1,A4 ; Move thread pointer to A4
MVKL _tx_thread_current_ptr,A1 ; Build address of current thread ptr
- MVKH _tx_thread_current_ptr,A1 ;
+ MVKH _tx_thread_current_ptr,A1 ;
MVKL _tx_timer_time_slice,A2 ; Build address of time-slice
- MVKH _tx_timer_time_slice,A2 ;
+ MVKH _tx_timer_time_slice,A2 ;
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
diff --git a/ports/c667x/ccs/src/tx_thread_stack_build.asm b/ports/c667x/ccs/src/tx_thread_stack_build.asm
index dabfea41..d6521d09 100644
--- a/ports/c667x/ccs/src/tx_thread_stack_build.asm
+++ b/ports/c667x/ccs/src/tx_thread_stack_build.asm
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,41 +34,41 @@ SP .set B15
ADDRESS_MSK .set 0xFFFFFFF0
;
.sect ".text"
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build C667x/TI */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build C667x/TI */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function builds a stack frame on the supplied thread's stack. */
;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
;/* thread_ptr Pointer to thread control blk */
;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
+;/* */
+;/* OUTPUT */
+;/* */
;/* None */
-;/* */
-;/* CALLS */
-;/* */
+;/* */
+;/* CALLS */
+;/* */
;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
+;/* */
+;/* CALLED BY */
+;/* */
;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
+;/* */
+;/* RELEASE HISTORY */
+;/* */
;/* DATE NAME DESCRIPTION */
;/* */
;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -79,10 +79,10 @@ ADDRESS_MSK .set 0xFFFFFFF0
.global _tx_thread_stack_build
_tx_thread_stack_build:
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the C667x should look like the following after it is built:
-;
+;
; Stack Top: N/A Available for use
; 1 Interrupt stack frame type 4
; CSR Initial value for CSR 8
@@ -160,7 +160,7 @@ _tx_thread_stack_build:
;
LDW *+A4(16),A0 ; Pickup end of stack area
MVKL ADDRESS_MSK,A1 ; Build address mask
- MVKH ADDRESS_MSK,A1 ;
+ MVKH ADDRESS_MSK,A1 ;
MVC CSR,B0 ; Pickup current CSR
AND -2,B0,B0 ; Clear GIE bit
OR 2,B0,B0 ; Set PGIE bit for interrupt return
@@ -171,7 +171,7 @@ _tx_thread_stack_build:
; /* Actually build the stack frame. */
;
MVKL 1,A2 ; Build stack type
- ZERO A3 ; Clear value
+ ZERO A3 ; Clear value
STW A2,*+A0(4) ; Interrupt stack type
STW B0,*+A0(8) ; Initial CSR
STW B4,*+A0(12) ; Thread shell entry point
diff --git a/ports/c667x/ccs/src/tx_thread_system_return.asm b/ports/c667x/ccs/src/tx_thread_system_return.asm
index bf4c5caf..5123958b 100644
--- a/ports/c667x/ccs/src/tx_thread_system_return.asm
+++ b/ports/c667x/ccs/src/tx_thread_system_return.asm
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -40,41 +40,41 @@ SP .set B15
;
;
.sect ".text"
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return C667x/TI */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return C667x/TI */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
+;/* */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
+;/* */
+;/* RELEASE HISTORY */
+;/* */
;/* DATE NAME DESCRIPTION */
;/* */
;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -109,7 +109,7 @@ _tx_thread_system_return:
MVC RILC,B1 ; Pickup RILC
STW B0,*+SP(60) ; Save ILC
STW B1,*+SP(64) ; Save RILC
-;
+;
; /* Lockout interrupts. */
;
AND -2,B0,B0 ; Build interrupt disable value
@@ -120,13 +120,13 @@ _tx_thread_system_return:
; SP = _tx_thread_system_stack_ptr;
;
MVKL _tx_timer_time_slice,A2 ; Pickup address of time slice
- MVKH _tx_timer_time_slice,A2 ;
+ MVKH _tx_timer_time_slice,A2 ;
LDW *A2,B0 ; Pickup time slice
MVKL _tx_thread_current_ptr,A1 ; Pickup address of current thread
- MVKH _tx_thread_current_ptr,A1 ;
+ MVKH _tx_thread_current_ptr,A1 ;
LDW *A1,A4 ; Pickup current thread pointer
MVKL _tx_thread_system_stack_ptr,A3 ; Pickup address of system stack
- MVKH _tx_thread_system_stack_ptr,A3 ;
+ MVKH _tx_thread_system_stack_ptr,A3 ;
;
; /* Determine if the time-slice is active. */
; if (_tx_timer_time_slice)
@@ -134,14 +134,14 @@ _tx_thread_system_return:
;
[!B0] B _tx_thread_dont_save_ts ; If no-time slice, skip save
NOP ; Delay slot
- STW SP,*+A4(8) ; Save thread's stack pointer
+ STW SP,*+A4(8) ; Save thread's stack pointer
LDW *A3,SP ; Switch to system stack pointer
NOP ; Delay slot
;
; /* Save time-slice for the thread and clear the current time-slice. */
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
; _tx_timer_time_slice = 0;
- NOP ;
+ NOP ;
STW B2,*A2 ; Clear time-slice
NOP 2 ; Delay slots
STW B0,*+A4(24) ; Save time-slice
diff --git a/ports/c667x/ccs/src/tx_timer_interrupt.asm b/ports/c667x/ccs/src/tx_timer_interrupt.asm
index 60dd91b6..48df12d7 100644
--- a/ports/c667x/ccs/src/tx_timer_interrupt.asm
+++ b/ports/c667x/ccs/src/tx_timer_interrupt.asm
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Timer */
;/** */
@@ -48,45 +48,45 @@ SP .set B15
;
;
.sect ".text"
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt C667x/TI */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt C667x/TI */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_context_save Context save */
-;/* _tx_thread_context_restore Context restore */
-;/* _tx_thread_time_slice Time slice interrupted thread */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
+;/* */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_context_save Context save */
+;/* _tx_thread_context_restore Context restore */
+;/* _tx_thread_time_slice Time slice interrupted thread */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
+;/* */
+;/* RELEASE HISTORY */
+;/* */
;/* DATE NAME DESCRIPTION */
;/* */
;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -106,10 +106,10 @@ _tx_timer_interrupt:
; _tx_timer_system_clock++;
;
MVKL _tx_timer_system_clock,A0 ; Build address of system clock
- MVKH _tx_timer_system_clock,A0 ;
+ MVKH _tx_timer_system_clock,A0 ;
LDW *A0,A2 ; Pickup system clock
MVKL _tx_timer_time_slice,A3 ; Build address of time slice
- MVKH _tx_timer_time_slice,A3 ;
+ MVKH _tx_timer_time_slice,A3 ;
LDW *A3,A1 ; Pickup time slice
NOP 2 ; Delay
ADD 1,A2,A2 ; Increment the system clock
@@ -120,7 +120,7 @@ _tx_timer_interrupt:
; {
;
[!A1] B _tx_timer_no_time_slice ; If 0, skip time slice processing
- SUB A1,1,A1 ; Decrement time-slice value
+ SUB A1,1,A1 ; Decrement time-slice value
NOP 4 ; Delay slots
;
; /* Decrement the time_slice. */
@@ -130,9 +130,9 @@ _tx_timer_interrupt:
; if (_tx_timer_time_slice == 0)
;
[A1] B _tx_timer_no_time_slice ; If non-zero, not expired yet
- STW A1,*A3 ; Store new time-slice
+ STW A1,*A3 ; Store new time-slice
MVKL _tx_timer_expired_time_slice,A0 ; Build address of expired flag
- MVKH _tx_timer_expired_time_slice,A0 ;
+ MVKH _tx_timer_expired_time_slice,A0 ;
MVKL 1,A4 ; Expired flag
NOP ; Delay
;
@@ -149,10 +149,10 @@ _tx_timer_no_time_slice:
; {
;
MVKL _tx_timer_current_ptr,A2 ; Build address of current timer pointer
- MVKH _tx_timer_current_ptr,A2 ;
+ MVKH _tx_timer_current_ptr,A2 ;
LDW *A2,A0 ; Pickup timer list address
MVKL _tx_timer_expired,A3 ; Build address of expired flag
- MVKH _tx_timer_expired,A3 ;
+ MVKH _tx_timer_expired,A3 ;
NOP 2 ; Delay slots
LDW *A0,A1 ; Pickup current timer entry
ADD 4,A0,A0 ; Increment the current pointer
@@ -179,10 +179,10 @@ _tx_timer_no_timer:
; if (_tx_timer_current_ptr == _tx_timer_list_end)
;
MVKL _tx_timer_list_end,A3 ; Build timer list end address
- MVKH _tx_timer_list_end,A3 ;
+ MVKH _tx_timer_list_end,A3 ;
LDW *A3,A4 ; Pickup list end address
MVKL _tx_timer_list_start,A3 ; Build timer list start address
- MVKH _tx_timer_list_start,A3 ;
+ MVKH _tx_timer_list_start,A3 ;
NOP 2 ; Delay slots
CMPEQ A4,A0,A1 ; Compare current pointer with end
[A1] LDW *A3,A0 ; If at the end, pickup timer list start
@@ -205,10 +205,10 @@ _tx_timer_done:
; {
;
MVKL _tx_timer_expired_time_slice,A3 ; Build time-slice expired flag
- MVKH _tx_timer_expired_time_slice,A3 ;
+ MVKH _tx_timer_expired_time_slice,A3 ;
LDW *A3,A4 ; Pickup time-slice expired flag
MVKL _tx_timer_expired,A0 ; Build timer expired flag
- MVKH _tx_timer_expired,A0 ;
+ MVKH _tx_timer_expired,A0 ;
LDW *A0,A2 ; Pickup timer expired flag
NOP 4 ; Delay slots
OR A2,A4,A1 ; Combine expired flags
@@ -223,8 +223,8 @@ _tx_something_expired:
;
B _tx_thread_context_save ; Call context save routine
MVKL _tx_timer_ISR_return,B3 ; Build return address
- MVKH _tx_timer_ISR_return,B3 ;
- NOP 3 ; Delay slots
+ MVKH _tx_timer_ISR_return,B3 ;
+ NOP 3 ; Delay slots
_tx_timer_ISR_return:
;
; /* Did a timer expire? */
@@ -232,7 +232,7 @@ _tx_timer_ISR_return:
; {
;
MVKL _tx_timer_expired,A0 ; Build timer expired address
- MVKH _tx_timer_expired,A0 ;
+ MVKH _tx_timer_expired,A0 ;
LDW *A0,A1 ; Pickup expired flag
NOP 4 ; Delay slots
[!A1] B _tx_timer_dont_activate ; If not set, skip timer activation
@@ -243,7 +243,7 @@ _tx_timer_ISR_return:
;
B _tx_timer_expiration_process ; Process timer expiration
MVKL _tx_timer_ISR_return_1,B3 ; Build return address
- MVKH _tx_timer_ISR_return_1,B3 ;
+ MVKH _tx_timer_ISR_return_1,B3 ;
NOP 3 ; Delay slots
_tx_timer_ISR_return_1:
;
@@ -255,7 +255,7 @@ _tx_timer_dont_activate:
; {
;
MVKL _tx_timer_expired_time_slice,A0 ; Build address of expired flag
- MVKH _tx_timer_expired_time_slice,A0 ;
+ MVKH _tx_timer_expired_time_slice,A0 ;
LDW *A0,A1 ; Pickup expired flag
NOP 4 ; Delay slots
[!A1] B _tx_timer_not_ts_expiration ; If not set, skip time-slice processing
@@ -266,7 +266,7 @@ _tx_timer_dont_activate:
;
B _tx_thread_time_slice ; Call time-slice processing
MVKL _tx_timer_ISR_return_2,B3 ; Build return address
- MVKH _tx_timer_ISR_return_2,B3 ;
+ MVKH _tx_timer_ISR_return_2,B3 ;
NOP 3 ; Delay slots
_tx_timer_ISR_return_2:
;
diff --git a/ports/cortex_a12/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a12/ac6/example_build/sample_threadx/.cproject
index e212b36d..7882693e 100644
--- a/ports/cortex_a12/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a12/ac6/example_build/sample_threadx/.cproject
@@ -1,176 +1,176 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a12/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a12/ac6/example_build/sample_threadx/sample_threadx.scat
index d23881cd..66d0d95a 100644
--- a/ports/cortex_a12/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a12/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -1,7 +1,7 @@
;*******************************************************
; Copyright (c) 2011-2016 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;*******************************************************
diff --git a/ports/cortex_a12/ac6/example_build/sample_threadx/tx_initialize_low_level.S b/ports/cortex_a12/ac6/example_build/sample_threadx/tx_initialize_low_level.S
index 083a57a7..76395459 100644
--- a/ports/cortex_a12/ac6/example_build/sample_threadx/tx_initialize_low_level.S
+++ b/ports/cortex_a12/ac6/example_build/sample_threadx/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -91,14 +92,6 @@ $_tx_initialize_low_level:
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* */
/**************************************************************************/
.global _tx_initialize_low_level
.type _tx_initialize_low_level,function
diff --git a/ports/cortex_a12/ac6/example_build/tx/.cproject b/ports/cortex_a12/ac6/example_build/tx/.cproject
index c6b251b2..7580a13f 100644
--- a/ports/cortex_a12/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a12/ac6/example_build/tx/.cproject
@@ -1,146 +1,146 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a12/ac6/inc/tx_port.h b/ports/cortex_a12/ac6/inc/tx_port.h
index d80ddec1..f0153046 100644
--- a/ports/cortex_a12/ac6/inc/tx_port.h
+++ b/ports/cortex_a12/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,20 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -320,7 +307,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv7-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv7-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a12/ac6/src/tx_thread_context_restore.S b/ports/cortex_a12/ac6/src/tx_thread_context_restore.S
index 6b4a561d..41b0b0d0 100644
--- a/ports/cortex_a12/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a12/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,23 +80,6 @@ IRQ_MODE = 0x12 // IRQ mode
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_restore
.type _tx_thread_context_restore,function
diff --git a/ports/cortex_a12/ac6/src/tx_thread_context_save.S b/ports/cortex_a12/ac6/src/tx_thread_context_save.S
index eff06283..d2d29d34 100644
--- a/ports/cortex_a12/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a12/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,23 +72,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_save
.type _tx_thread_context_save,function
diff --git a/ports/cortex_a12/ac6/src/tx_thread_fiq_context_restore.S b/ports/cortex_a12/ac6/src/tx_thread_fiq_context_restore.S
index d2fbebe1..921c322c 100644
--- a/ports/cortex_a12/ac6/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_a12/ac6/src/tx_thread_fiq_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,20 +79,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* FIQ ISR Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_restore
.type _tx_thread_fiq_context_restore,function
diff --git a/ports/cortex_a12/ac6/src/tx_thread_fiq_context_save.S b/ports/cortex_a12/ac6/src/tx_thread_fiq_context_save.S
index 88472a3d..2f1a6c40 100644
--- a/ports/cortex_a12/ac6/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_a12/ac6/src/tx_thread_fiq_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_save
.type _tx_thread_fiq_context_save,function
diff --git a/ports/cortex_a12/ac6/src/tx_thread_fiq_nesting_end.S b/ports/cortex_a12/ac6/src/tx_thread_fiq_nesting_end.S
index fa3886b8..a7ce701e 100644
--- a/ports/cortex_a12/ac6/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_a12/ac6/src/tx_thread_fiq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ FIQ_MODE_BITS = 0x11 // FIQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/ac6/src/tx_thread_fiq_nesting_start.S b/ports/cortex_a12/ac6/src/tx_thread_fiq_nesting_start.S
index dbed1cf2..4f095dde 100644
--- a/ports/cortex_a12/ac6/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_a12/ac6/src/tx_thread_fiq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a12/ac6/src/tx_thread_interrupt_control.S
index d1223cb8..a5bc47f7 100644
--- a/ports/cortex_a12/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a12/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,20 +69,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a12/ac6/src/tx_thread_interrupt_disable.S
index a87d1a06..d7b53bc2 100644
--- a/ports/cortex_a12/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a12/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,20 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a12/ac6/src/tx_thread_interrupt_restore.S
index 53ff2813..3c31e94b 100644
--- a/ports/cortex_a12/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a12/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,20 +68,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/ac6/src/tx_thread_irq_nesting_end.S b/ports/cortex_a12/ac6/src/tx_thread_irq_nesting_end.S
index 18aebc7c..cc4db3a7 100644
--- a/ports/cortex_a12/ac6/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_a12/ac6/src/tx_thread_irq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/ac6/src/tx_thread_irq_nesting_start.S b/ports/cortex_a12/ac6/src/tx_thread_irq_nesting_start.S
index a2ffd35d..3635874d 100644
--- a/ports/cortex_a12/ac6/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_a12/ac6/src/tx_thread_irq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/ac6/src/tx_thread_schedule.S b/ports/cortex_a12/ac6/src/tx_thread_schedule.S
index 07dd6f7f..a74e2050 100644
--- a/ports/cortex_a12/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a12/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,6 +40,14 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode
+#ifdef TX_ENABLE_VFP_SUPPORT
+#define IRQ_MASK 0x80
+#endif
+
+#ifdef TX_ENABLE_FIQ_SUPPORT
+#define FIQ_MASK 0x40
+#endif
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
@@ -73,23 +82,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
@@ -259,3 +251,4 @@ no_fiq:
BX lr
#endif
+
diff --git a/ports/cortex_a12/ac6/src/tx_thread_stack_build.S b/ports/cortex_a12/ac6/src/tx_thread_stack_build.S
index 3876225a..827554a7 100644
--- a/ports/cortex_a12/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a12/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,20 +75,6 @@ CPSR_MASK = 0xBF // Mask initial CPSR, T, IRQ int
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/ac6/src/tx_thread_system_return.S b/ports/cortex_a12/ac6/src/tx_thread_system_return.S
index 0eed478d..1a17446b 100644
--- a/ports/cortex_a12/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a12/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,23 +69,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/ac6/src/tx_thread_vectored_context_save.S b/ports/cortex_a12/ac6/src/tx_thread_vectored_context_save.S
index fe8a98e8..91653b75 100644
--- a/ports/cortex_a12/ac6/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_a12/ac6/src/tx_thread_vectored_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_vectored_context_save
.type _tx_thread_vectored_context_save,function
diff --git a/ports/cortex_a12/ac6/src/tx_timer_interrupt.S b/ports/cortex_a12/ac6/src/tx_timer_interrupt.S
index cb0c1fa2..179ac894 100644
--- a/ports/cortex_a12/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a12/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,20 +78,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/gnu/example_build/reset.S b/ports/cortex_a12/gnu/example_build/reset.S
index 3ce9efb7..f2e0522b 100644
--- a/ports/cortex_a12/gnu/example_build/reset.S
+++ b/ports/cortex_a12/gnu/example_build/reset.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a12/gnu/example_build/sample_threadx.ld b/ports/cortex_a12/gnu/example_build/sample_threadx.ld
index cb42c11c..d43e28f1 100644
--- a/ports/cortex_a12/gnu/example_build/sample_threadx.ld
+++ b/ports/cortex_a12/gnu/example_build/sample_threadx.ld
@@ -7,7 +7,7 @@ OUTPUT_ARCH(arm)
SECTIONS
{
. = 0x00000000;
-
+
.vectors : {reset.o(.text) }
/* Read-only sections, merged into text segment: */
@@ -94,8 +94,8 @@ SECTIONS
*(.gnu.linkonce.t*)
*(.glue_7t) *(.glue_7)
} =0
- .init :
- {
+ .init :
+ {
KEEP (*(.init))
} =0
_etext = .;
@@ -120,7 +120,7 @@ SECTIONS
.data1 : { *(.data1) }
.eh_frame : { KEEP (*(.eh_frame)) }
.gcc_except_table : { *(.gcc_except_table) }
- .ctors :
+ .ctors :
{
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
@@ -153,9 +153,9 @@ SECTIONS
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata :
+ .sdata :
{
- *(.sdata)
+ *(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
}
@@ -191,7 +191,7 @@ SECTIONS
_stack_bottom = ABSOLUTE(.) ;
- /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
+ /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
SYS stack if nested interrupts are enabled. */
. = ALIGN(8) ;
. += 4096 ;
diff --git a/ports/cortex_a12/gnu/example_build/tx_initialize_low_level.S b/ports/cortex_a12/gnu/example_build/tx_initialize_low_level.S
index 88777dfd..f9a57216 100644
--- a/ports/cortex_a12/gnu/example_build/tx_initialize_low_level.S
+++ b/ports/cortex_a12/gnu/example_build/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -95,17 +96,6 @@ $_tx_initialize_low_level:
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_initialize_low_level
.type _tx_initialize_low_level,function
diff --git a/ports/cortex_a12/gnu/example_build/v7.h b/ports/cortex_a12/gnu/example_build/v7.h
index 5a08b43f..1133b0ac 100644
--- a/ports/cortex_a12/gnu/example_build/v7.h
+++ b/ports/cortex_a12/gnu/example_build/v7.h
@@ -4,7 +4,7 @@
//
// Copyright (c) 2011-2016 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
@@ -37,7 +37,6 @@ void disableInterrupts(void);
void invalidateCaches_IS(void);
void cleanInvalidateDCache(void);
-void invalidateCaches_IS(void);
void enableCaches(void);
void disableCaches(void);
void invalidateCaches(void);
diff --git a/ports/cortex_a12/gnu/example_build/v7.s b/ports/cortex_a12/gnu/example_build/v7.s
index 82c9ab1e..9487ddde 100644
--- a/ports/cortex_a12/gnu/example_build/v7.s
+++ b/ports/cortex_a12/gnu/example_build/v7.s
@@ -3,7 +3,7 @@
//
// Copyright (c) 2011-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
@@ -20,7 +20,7 @@
enableInterrupts:
CPSIE i
BX lr
-
+
.global disableInterrupts
.type disableInterrupts,function
@@ -28,7 +28,7 @@ enableInterrupts:
disableInterrupts:
CPSID i
BX lr
-
+
// ------------------------------------------------------------
// Cache Maintenance
@@ -44,7 +44,7 @@ enableCaches:
MCR p15, 0, r0, c1, c0, 0 // Write System Control Register
ISB
BX lr
-
+
.global disableCaches
@@ -57,7 +57,7 @@ disableCaches:
MCR p15, 0, r0, c1, c0, 0 // Write System Control Register
ISB
BX lr
-
+
.global cleanDCache
@@ -114,7 +114,7 @@ clean_dcache_finished:
POP {r4-r12}
BX lr
-
+
.global cleanInvalidateDCache
.type cleanInvalidateDCache,function
@@ -170,7 +170,7 @@ clean_invalidate_dcache_finished:
POP {r4-r12}
BX lr
-
+
.global invalidateCaches
@@ -229,7 +229,7 @@ invalidate_caches_skip:
invalidate_caches_finished:
POP {r4-r12}
BX lr
-
+
.global invalidateCaches_IS
@@ -284,7 +284,7 @@ invalidate_caches_is_skip:
invalidate_caches_is_finished:
POP {r4-r12}
BX lr
-
+
// ------------------------------------------------------------
// TLB
@@ -297,7 +297,7 @@ invalidateUnifiedTLB:
MOV r0, #0
MCR p15, 0, r0, c8, c7, 0 // TLBIALL - Invalidate entire unified TLB
BX lr
-
+
.global invalidateUnifiedTLB_IS
.type invalidateUnifiedTLB_IS,function
@@ -306,7 +306,7 @@ invalidateUnifiedTLB_IS:
MOV r0, #1
MCR p15, 0, r0, c8, c3, 0 // TLBIALLIS - Invalidate entire unified TLB Inner Shareable
BX lr
-
+
// ------------------------------------------------------------
// Branch Prediction
@@ -319,7 +319,7 @@ flushBranchTargetCache:
MOV r0, #0
MCR p15, 0, r0, c7, c5, 6 // BPIALL - Invalidate entire branch predictor array
BX lr
-
+
.global flushBranchTargetCache_IS
.type flushBranchTargetCache_IS,function
@@ -328,7 +328,7 @@ flushBranchTargetCache_IS:
MOV r0, #0
MCR p15, 0, r0, c7, c1, 6 // BPIALLIS - Invalidate entire branch predictor array Inner Shareable
BX lr
-
+
// ------------------------------------------------------------
// High Vecs
@@ -343,7 +343,7 @@ enableHighVecs:
MCR p15, 0, r0, c1, c0, 0 // Write Control Register
ISB
BX lr
-
+
.global disableHighVecs
.type disableHighVecs,function
@@ -354,7 +354,7 @@ disableHighVecs:
MCR p15, 0, r0, c1, c0, 0 // Write Control Register
ISB
BX lr
-
+
// ------------------------------------------------------------
// Context ID
@@ -366,7 +366,7 @@ disableHighVecs:
getContextID:
MRC p15, 0, r0, c13, c0, 1 // Read Context ID Register
BX lr
-
+
.global setContextID
.type setContextID,function
@@ -374,7 +374,7 @@ getContextID:
setContextID:
MCR p15, 0, r0, c13, c0, 1 // Write Context ID Register
BX lr
-
+
// ------------------------------------------------------------
// ID registers
@@ -386,7 +386,7 @@ setContextID:
getMIDR:
MRC p15, 0, r0, c0, c0, 0 // Read Main ID Register (MIDR)
BX lr
-
+
.global getMPIDR
.type getMPIDR,function
@@ -394,7 +394,7 @@ getMIDR:
getMPIDR:
MRC p15, 0, r0, c0 ,c0, 5// Read Multiprocessor ID register (MPIDR)
BX lr
-
+
// ------------------------------------------------------------
// CP15 SMP related
@@ -407,7 +407,7 @@ getMPIDR:
getBaseAddr:
MRC p15, 4, r0, c15, c0, 0 // Read peripheral base address
BX lr
-
+
// ------------------------------------------------------------
@@ -419,7 +419,7 @@ getCPUID:
MRC p15, 0, r0, c0, c0, 5 // Read CPU ID register
AND r0, r0, #0x03 // Mask off, leaving the CPU ID field
BX lr
-
+
// ------------------------------------------------------------
@@ -431,7 +431,7 @@ goToSleep:
WFI // Go into standby
B goToSleep // Catch in case of rogue events
BX lr
-
+
// ------------------------------------------------------------
@@ -451,7 +451,7 @@ joinSMP:
ISB
BX lr
-
+
// ------------------------------------------------------------
@@ -469,7 +469,7 @@ leaveSMP:
ISB
BX lr
-
+
// ------------------------------------------------------------
// End of v7.s
diff --git a/ports/cortex_a12/gnu/inc/tx_port.h b/ports/cortex_a12/gnu/inc/tx_port.h
index d80ddec1..f0153046 100644
--- a/ports/cortex_a12/gnu/inc/tx_port.h
+++ b/ports/cortex_a12/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,20 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -320,7 +307,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv7-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv7-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a12/gnu/src/tx_thread_context_restore.S b/ports/cortex_a12/gnu/src/tx_thread_context_restore.S
index 6b4a561d..41b0b0d0 100644
--- a/ports/cortex_a12/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a12/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,23 +80,6 @@ IRQ_MODE = 0x12 // IRQ mode
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_restore
.type _tx_thread_context_restore,function
diff --git a/ports/cortex_a12/gnu/src/tx_thread_context_save.S b/ports/cortex_a12/gnu/src/tx_thread_context_save.S
index eff06283..d2d29d34 100644
--- a/ports/cortex_a12/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a12/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,23 +72,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_save
.type _tx_thread_context_save,function
diff --git a/ports/cortex_a12/gnu/src/tx_thread_fiq_context_restore.S b/ports/cortex_a12/gnu/src/tx_thread_fiq_context_restore.S
index d2fbebe1..921c322c 100644
--- a/ports/cortex_a12/gnu/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_a12/gnu/src/tx_thread_fiq_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,20 +79,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* FIQ ISR Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_restore
.type _tx_thread_fiq_context_restore,function
diff --git a/ports/cortex_a12/gnu/src/tx_thread_fiq_context_save.S b/ports/cortex_a12/gnu/src/tx_thread_fiq_context_save.S
index 88472a3d..2f1a6c40 100644
--- a/ports/cortex_a12/gnu/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_a12/gnu/src/tx_thread_fiq_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_save
.type _tx_thread_fiq_context_save,function
diff --git a/ports/cortex_a12/gnu/src/tx_thread_fiq_nesting_end.S b/ports/cortex_a12/gnu/src/tx_thread_fiq_nesting_end.S
index fa3886b8..a7ce701e 100644
--- a/ports/cortex_a12/gnu/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_a12/gnu/src/tx_thread_fiq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ FIQ_MODE_BITS = 0x11 // FIQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/gnu/src/tx_thread_fiq_nesting_start.S b/ports/cortex_a12/gnu/src/tx_thread_fiq_nesting_start.S
index dbed1cf2..4f095dde 100644
--- a/ports/cortex_a12/gnu/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_a12/gnu/src/tx_thread_fiq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a12/gnu/src/tx_thread_interrupt_control.S
index d1223cb8..a5bc47f7 100644
--- a/ports/cortex_a12/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a12/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,20 +69,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a12/gnu/src/tx_thread_interrupt_disable.S
index a87d1a06..d7b53bc2 100644
--- a/ports/cortex_a12/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a12/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,20 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a12/gnu/src/tx_thread_interrupt_restore.S
index 53ff2813..3c31e94b 100644
--- a/ports/cortex_a12/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a12/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,20 +68,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/gnu/src/tx_thread_irq_nesting_end.S b/ports/cortex_a12/gnu/src/tx_thread_irq_nesting_end.S
index 18aebc7c..cc4db3a7 100644
--- a/ports/cortex_a12/gnu/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_a12/gnu/src/tx_thread_irq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/gnu/src/tx_thread_irq_nesting_start.S b/ports/cortex_a12/gnu/src/tx_thread_irq_nesting_start.S
index a2ffd35d..3635874d 100644
--- a/ports/cortex_a12/gnu/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_a12/gnu/src/tx_thread_irq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/gnu/src/tx_thread_schedule.S b/ports/cortex_a12/gnu/src/tx_thread_schedule.S
index 07dd6f7f..a74e2050 100644
--- a/ports/cortex_a12/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a12/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,6 +40,14 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode
+#ifdef TX_ENABLE_VFP_SUPPORT
+#define IRQ_MASK 0x80
+#endif
+
+#ifdef TX_ENABLE_FIQ_SUPPORT
+#define FIQ_MASK 0x40
+#endif
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
@@ -73,23 +82,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
@@ -259,3 +251,4 @@ no_fiq:
BX lr
#endif
+
diff --git a/ports/cortex_a12/gnu/src/tx_thread_stack_build.S b/ports/cortex_a12/gnu/src/tx_thread_stack_build.S
index 3876225a..827554a7 100644
--- a/ports/cortex_a12/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a12/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,20 +75,6 @@ CPSR_MASK = 0xBF // Mask initial CPSR, T, IRQ int
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/gnu/src/tx_thread_system_return.S b/ports/cortex_a12/gnu/src/tx_thread_system_return.S
index 0eed478d..1a17446b 100644
--- a/ports/cortex_a12/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a12/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,23 +69,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a12/gnu/src/tx_thread_vectored_context_save.S b/ports/cortex_a12/gnu/src/tx_thread_vectored_context_save.S
index fe8a98e8..91653b75 100644
--- a/ports/cortex_a12/gnu/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_a12/gnu/src/tx_thread_vectored_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_vectored_context_save
.type _tx_thread_vectored_context_save,function
diff --git a/ports/cortex_a12/gnu/src/tx_timer_interrupt.S b/ports/cortex_a12/gnu/src/tx_timer_interrupt.S
index cb0c1fa2..179ac894 100644
--- a/ports/cortex_a12/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a12/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,20 +78,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a15/ac6/example_build/sample_threadx/.cproject
index 9a96fceb..abd7ce5b 100644
--- a/ports/cortex_a15/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a15/ac6/example_build/sample_threadx/.cproject
@@ -1,176 +1,176 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a15/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a15/ac6/example_build/sample_threadx/sample_threadx.scat
index d23881cd..66d0d95a 100644
--- a/ports/cortex_a15/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a15/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -1,7 +1,7 @@
;*******************************************************
; Copyright (c) 2011-2016 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;*******************************************************
diff --git a/ports/cortex_a15/ac6/example_build/sample_threadx/tx_initialize_low_level.S b/ports/cortex_a15/ac6/example_build/sample_threadx/tx_initialize_low_level.S
index 083a57a7..76395459 100644
--- a/ports/cortex_a15/ac6/example_build/sample_threadx/tx_initialize_low_level.S
+++ b/ports/cortex_a15/ac6/example_build/sample_threadx/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -91,14 +92,6 @@ $_tx_initialize_low_level:
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* */
/**************************************************************************/
.global _tx_initialize_low_level
.type _tx_initialize_low_level,function
diff --git a/ports/cortex_a15/ac6/example_build/tx/.cproject b/ports/cortex_a15/ac6/example_build/tx/.cproject
index e8ca6dd7..8b16e939 100644
--- a/ports/cortex_a15/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a15/ac6/example_build/tx/.cproject
@@ -1,146 +1,146 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a15/ac6/inc/tx_port.h b/ports/cortex_a15/ac6/inc/tx_port.h
index d80ddec1..f0153046 100644
--- a/ports/cortex_a15/ac6/inc/tx_port.h
+++ b/ports/cortex_a15/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,20 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -320,7 +307,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv7-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv7-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a15/ac6/readme_threadx.txt b/ports/cortex_a15/ac6/readme_threadx.txt
index 8d81625a..dbe89478 100644
--- a/ports/cortex_a15/ac6/readme_threadx.txt
+++ b/ports/cortex_a15/ac6/readme_threadx.txt
@@ -1,18 +1,18 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A15
+ Microsoft's Azure RTOS ThreadX for Cortex-A15
Using the AC6 Tools
1. Import the ThreadX Projects
-In order to build the ThreadX library and the ThreadX demonstration, first import
-the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
+In order to build the ThreadX library and the ThreadX demonstration, first import
+the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
into your DS workspace.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply right-click the Eclipse project
-"tx" and then select the "Build Project" button. You should now observe the compilation
+Building the ThreadX library is easy; simply right-click the Eclipse project
+"tx" and then select the "Build Project" button. You should now observe the compilation
and assembly of the ThreadX library. This project build produces the ThreadX
library file tx.a.
@@ -22,44 +22,44 @@ library file tx.a.
The ThreadX demonstration is designed to execute under the DS debugger on the
VE_Cortex-A15 Bare Metal simulator.
-Building the demonstration is easy; simply right-click the Eclipse project
-"sample_threadx" and then select the "Build Project" button. You should now observe
-the compilation and assembly of the ThreadX demonstration. This project build produces
-the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
+Building the demonstration is easy; simply right-click the Eclipse project
+"sample_threadx" and then select the "Build Project" button. You should now observe
+the compilation and assembly of the ThreadX demonstration. This project build produces
+the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
in the Project Explorer window, right-click on the 'cortex-a15_tx.launch' file, click
'Debug As', and then click 'cortex-a15_tx' from the submenu. This will cause the
-debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
+debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
to execute the ThreadX demonstration.
4. System Initialization
-The entry point in ThreadX for the Cortex-A15 using ARM tools is at label
-"Vectors". This is defined within startup.S in the sample_threadx project. In addition,
-this is where all static and global pre-set C variable initialization processing
+The entry point in ThreadX for the Cortex-A15 using ARM tools is at label
+"Vectors". This is defined within startup.S in the sample_threadx project. In addition,
+this is where all static and global pre-set C variable initialization processing
takes place.
-This is also where initialization of a periodic timer interrupt source should take
+This is also where initialization of a periodic timer interrupt source should take
place.
-In addition, _tx_initialize_low_level defines the first available address
-for use by the application, which is supplied as the sole input parameter
+In addition, _tx_initialize_low_level defines the first available address
+for use by the application, which is supplied as the sole input parameter
to your application definition function, tx_application_define.
5. Register Usage and Stack Frames
-The AC6 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The AC6 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -77,52 +77,52 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A15
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A15 vectors start at address zero. The demonstration system startup
-reset.S file contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+reset.S file contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
-ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
+ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
nested IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.S:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -130,7 +130,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -143,7 +143,7 @@ __tx_irq_processing_return:
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.S:
.global __tx_irq_example_handler
@@ -153,12 +153,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} @ Save some scratch registers
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
BL _tx_thread_vectored_context_save @ Call the vectored IRQ context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -175,22 +175,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -198,10 +198,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* Enable nested IRQ interrupts. NOTE: Since this service returns
-@ with IRQ interrupts enabled, all IRQ interrupt sources must be
+@ with IRQ interrupts enabled, all IRQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-@
+@
@ /* Application ISR call(s) go here! */
@
@ /* Disable nested IRQ interrupts. The mode is switched back to
@@ -214,12 +214,12 @@ __tx_irq_processing_return:
7.3 FIQ Interrupts
-By default, FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.S.
@@ -228,7 +228,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.S.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.S:
@@ -256,18 +256,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.S. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -283,7 +283,7 @@ __tx_fiq_processing_return:
@ interrupt, and all C scratch registers are available for use. */
@
@ /* Enable nested FIQ interrupts. NOTE: Since this service returns
-@ with FIQ interrupts enabled, all FIQ interrupt sources must be
+@ with FIQ interrupts enabled, all FIQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@
@@ -299,12 +299,12 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
-interrupt source, these services are not functional but the remainder of
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
+interrupt source, these services are not functional but the remainder of
ThreadX will still run.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.S for the demonstration system.
@@ -312,7 +312,7 @@ found in the file tx_initialize_low_level.S for the demonstration system.
9. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a15/ac6/src/tx_thread_context_restore.S b/ports/cortex_a15/ac6/src/tx_thread_context_restore.S
index 6b4a561d..41b0b0d0 100644
--- a/ports/cortex_a15/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a15/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,23 +80,6 @@ IRQ_MODE = 0x12 // IRQ mode
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_restore
.type _tx_thread_context_restore,function
diff --git a/ports/cortex_a15/ac6/src/tx_thread_context_save.S b/ports/cortex_a15/ac6/src/tx_thread_context_save.S
index eff06283..d2d29d34 100644
--- a/ports/cortex_a15/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a15/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,23 +72,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_save
.type _tx_thread_context_save,function
diff --git a/ports/cortex_a15/ac6/src/tx_thread_fiq_context_restore.S b/ports/cortex_a15/ac6/src/tx_thread_fiq_context_restore.S
index d2fbebe1..921c322c 100644
--- a/ports/cortex_a15/ac6/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_a15/ac6/src/tx_thread_fiq_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,20 +79,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* FIQ ISR Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_restore
.type _tx_thread_fiq_context_restore,function
diff --git a/ports/cortex_a15/ac6/src/tx_thread_fiq_context_save.S b/ports/cortex_a15/ac6/src/tx_thread_fiq_context_save.S
index 88472a3d..2f1a6c40 100644
--- a/ports/cortex_a15/ac6/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_a15/ac6/src/tx_thread_fiq_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_save
.type _tx_thread_fiq_context_save,function
diff --git a/ports/cortex_a15/ac6/src/tx_thread_fiq_nesting_end.S b/ports/cortex_a15/ac6/src/tx_thread_fiq_nesting_end.S
index fa3886b8..a7ce701e 100644
--- a/ports/cortex_a15/ac6/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_a15/ac6/src/tx_thread_fiq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ FIQ_MODE_BITS = 0x11 // FIQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/ac6/src/tx_thread_fiq_nesting_start.S b/ports/cortex_a15/ac6/src/tx_thread_fiq_nesting_start.S
index dbed1cf2..4f095dde 100644
--- a/ports/cortex_a15/ac6/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_a15/ac6/src/tx_thread_fiq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a15/ac6/src/tx_thread_interrupt_control.S
index d1223cb8..a5bc47f7 100644
--- a/ports/cortex_a15/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a15/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,20 +69,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a15/ac6/src/tx_thread_interrupt_disable.S
index a87d1a06..d7b53bc2 100644
--- a/ports/cortex_a15/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a15/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,20 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a15/ac6/src/tx_thread_interrupt_restore.S
index 53ff2813..3c31e94b 100644
--- a/ports/cortex_a15/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a15/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,20 +68,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/ac6/src/tx_thread_irq_nesting_end.S b/ports/cortex_a15/ac6/src/tx_thread_irq_nesting_end.S
index 18aebc7c..cc4db3a7 100644
--- a/ports/cortex_a15/ac6/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_a15/ac6/src/tx_thread_irq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/ac6/src/tx_thread_irq_nesting_start.S b/ports/cortex_a15/ac6/src/tx_thread_irq_nesting_start.S
index a2ffd35d..3635874d 100644
--- a/ports/cortex_a15/ac6/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_a15/ac6/src/tx_thread_irq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/ac6/src/tx_thread_schedule.S b/ports/cortex_a15/ac6/src/tx_thread_schedule.S
index 07dd6f7f..a74e2050 100644
--- a/ports/cortex_a15/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a15/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,6 +40,14 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode
+#ifdef TX_ENABLE_VFP_SUPPORT
+#define IRQ_MASK 0x80
+#endif
+
+#ifdef TX_ENABLE_FIQ_SUPPORT
+#define FIQ_MASK 0x40
+#endif
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
@@ -73,23 +82,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
@@ -259,3 +251,4 @@ no_fiq:
BX lr
#endif
+
diff --git a/ports/cortex_a15/ac6/src/tx_thread_stack_build.S b/ports/cortex_a15/ac6/src/tx_thread_stack_build.S
index 3876225a..827554a7 100644
--- a/ports/cortex_a15/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a15/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,20 +75,6 @@ CPSR_MASK = 0xBF // Mask initial CPSR, T, IRQ int
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/ac6/src/tx_thread_system_return.S b/ports/cortex_a15/ac6/src/tx_thread_system_return.S
index 0eed478d..1a17446b 100644
--- a/ports/cortex_a15/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a15/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,23 +69,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/ac6/src/tx_thread_vectored_context_save.S b/ports/cortex_a15/ac6/src/tx_thread_vectored_context_save.S
index fe8a98e8..91653b75 100644
--- a/ports/cortex_a15/ac6/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_a15/ac6/src/tx_thread_vectored_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_vectored_context_save
.type _tx_thread_vectored_context_save,function
diff --git a/ports/cortex_a15/ac6/src/tx_timer_interrupt.S b/ports/cortex_a15/ac6/src/tx_timer_interrupt.S
index cb0c1fa2..179ac894 100644
--- a/ports/cortex_a15/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a15/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,20 +78,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/gnu/example_build/reset.S b/ports/cortex_a15/gnu/example_build/reset.S
index 3ce9efb7..f2e0522b 100644
--- a/ports/cortex_a15/gnu/example_build/reset.S
+++ b/ports/cortex_a15/gnu/example_build/reset.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a15/gnu/example_build/sample_threadx.ld b/ports/cortex_a15/gnu/example_build/sample_threadx.ld
index cb42c11c..d43e28f1 100644
--- a/ports/cortex_a15/gnu/example_build/sample_threadx.ld
+++ b/ports/cortex_a15/gnu/example_build/sample_threadx.ld
@@ -7,7 +7,7 @@ OUTPUT_ARCH(arm)
SECTIONS
{
. = 0x00000000;
-
+
.vectors : {reset.o(.text) }
/* Read-only sections, merged into text segment: */
@@ -94,8 +94,8 @@ SECTIONS
*(.gnu.linkonce.t*)
*(.glue_7t) *(.glue_7)
} =0
- .init :
- {
+ .init :
+ {
KEEP (*(.init))
} =0
_etext = .;
@@ -120,7 +120,7 @@ SECTIONS
.data1 : { *(.data1) }
.eh_frame : { KEEP (*(.eh_frame)) }
.gcc_except_table : { *(.gcc_except_table) }
- .ctors :
+ .ctors :
{
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
@@ -153,9 +153,9 @@ SECTIONS
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata :
+ .sdata :
{
- *(.sdata)
+ *(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
}
@@ -191,7 +191,7 @@ SECTIONS
_stack_bottom = ABSOLUTE(.) ;
- /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
+ /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
SYS stack if nested interrupts are enabled. */
. = ALIGN(8) ;
. += 4096 ;
diff --git a/ports/cortex_a15/gnu/example_build/tx_initialize_low_level.S b/ports/cortex_a15/gnu/example_build/tx_initialize_low_level.S
index 88777dfd..f9a57216 100644
--- a/ports/cortex_a15/gnu/example_build/tx_initialize_low_level.S
+++ b/ports/cortex_a15/gnu/example_build/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -95,17 +96,6 @@ $_tx_initialize_low_level:
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_initialize_low_level
.type _tx_initialize_low_level,function
diff --git a/ports/cortex_a15/gnu/example_build/v7.h b/ports/cortex_a15/gnu/example_build/v7.h
index 5a08b43f..1133b0ac 100644
--- a/ports/cortex_a15/gnu/example_build/v7.h
+++ b/ports/cortex_a15/gnu/example_build/v7.h
@@ -4,7 +4,7 @@
//
// Copyright (c) 2011-2016 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
@@ -37,7 +37,6 @@ void disableInterrupts(void);
void invalidateCaches_IS(void);
void cleanInvalidateDCache(void);
-void invalidateCaches_IS(void);
void enableCaches(void);
void disableCaches(void);
void invalidateCaches(void);
diff --git a/ports/cortex_a15/gnu/example_build/v7.s b/ports/cortex_a15/gnu/example_build/v7.s
index 82c9ab1e..9487ddde 100644
--- a/ports/cortex_a15/gnu/example_build/v7.s
+++ b/ports/cortex_a15/gnu/example_build/v7.s
@@ -3,7 +3,7 @@
//
// Copyright (c) 2011-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
@@ -20,7 +20,7 @@
enableInterrupts:
CPSIE i
BX lr
-
+
.global disableInterrupts
.type disableInterrupts,function
@@ -28,7 +28,7 @@ enableInterrupts:
disableInterrupts:
CPSID i
BX lr
-
+
// ------------------------------------------------------------
// Cache Maintenance
@@ -44,7 +44,7 @@ enableCaches:
MCR p15, 0, r0, c1, c0, 0 // Write System Control Register
ISB
BX lr
-
+
.global disableCaches
@@ -57,7 +57,7 @@ disableCaches:
MCR p15, 0, r0, c1, c0, 0 // Write System Control Register
ISB
BX lr
-
+
.global cleanDCache
@@ -114,7 +114,7 @@ clean_dcache_finished:
POP {r4-r12}
BX lr
-
+
.global cleanInvalidateDCache
.type cleanInvalidateDCache,function
@@ -170,7 +170,7 @@ clean_invalidate_dcache_finished:
POP {r4-r12}
BX lr
-
+
.global invalidateCaches
@@ -229,7 +229,7 @@ invalidate_caches_skip:
invalidate_caches_finished:
POP {r4-r12}
BX lr
-
+
.global invalidateCaches_IS
@@ -284,7 +284,7 @@ invalidate_caches_is_skip:
invalidate_caches_is_finished:
POP {r4-r12}
BX lr
-
+
// ------------------------------------------------------------
// TLB
@@ -297,7 +297,7 @@ invalidateUnifiedTLB:
MOV r0, #0
MCR p15, 0, r0, c8, c7, 0 // TLBIALL - Invalidate entire unified TLB
BX lr
-
+
.global invalidateUnifiedTLB_IS
.type invalidateUnifiedTLB_IS,function
@@ -306,7 +306,7 @@ invalidateUnifiedTLB_IS:
MOV r0, #1
MCR p15, 0, r0, c8, c3, 0 // TLBIALLIS - Invalidate entire unified TLB Inner Shareable
BX lr
-
+
// ------------------------------------------------------------
// Branch Prediction
@@ -319,7 +319,7 @@ flushBranchTargetCache:
MOV r0, #0
MCR p15, 0, r0, c7, c5, 6 // BPIALL - Invalidate entire branch predictor array
BX lr
-
+
.global flushBranchTargetCache_IS
.type flushBranchTargetCache_IS,function
@@ -328,7 +328,7 @@ flushBranchTargetCache_IS:
MOV r0, #0
MCR p15, 0, r0, c7, c1, 6 // BPIALLIS - Invalidate entire branch predictor array Inner Shareable
BX lr
-
+
// ------------------------------------------------------------
// High Vecs
@@ -343,7 +343,7 @@ enableHighVecs:
MCR p15, 0, r0, c1, c0, 0 // Write Control Register
ISB
BX lr
-
+
.global disableHighVecs
.type disableHighVecs,function
@@ -354,7 +354,7 @@ disableHighVecs:
MCR p15, 0, r0, c1, c0, 0 // Write Control Register
ISB
BX lr
-
+
// ------------------------------------------------------------
// Context ID
@@ -366,7 +366,7 @@ disableHighVecs:
getContextID:
MRC p15, 0, r0, c13, c0, 1 // Read Context ID Register
BX lr
-
+
.global setContextID
.type setContextID,function
@@ -374,7 +374,7 @@ getContextID:
setContextID:
MCR p15, 0, r0, c13, c0, 1 // Write Context ID Register
BX lr
-
+
// ------------------------------------------------------------
// ID registers
@@ -386,7 +386,7 @@ setContextID:
getMIDR:
MRC p15, 0, r0, c0, c0, 0 // Read Main ID Register (MIDR)
BX lr
-
+
.global getMPIDR
.type getMPIDR,function
@@ -394,7 +394,7 @@ getMIDR:
getMPIDR:
MRC p15, 0, r0, c0 ,c0, 5// Read Multiprocessor ID register (MPIDR)
BX lr
-
+
// ------------------------------------------------------------
// CP15 SMP related
@@ -407,7 +407,7 @@ getMPIDR:
getBaseAddr:
MRC p15, 4, r0, c15, c0, 0 // Read peripheral base address
BX lr
-
+
// ------------------------------------------------------------
@@ -419,7 +419,7 @@ getCPUID:
MRC p15, 0, r0, c0, c0, 5 // Read CPU ID register
AND r0, r0, #0x03 // Mask off, leaving the CPU ID field
BX lr
-
+
// ------------------------------------------------------------
@@ -431,7 +431,7 @@ goToSleep:
WFI // Go into standby
B goToSleep // Catch in case of rogue events
BX lr
-
+
// ------------------------------------------------------------
@@ -451,7 +451,7 @@ joinSMP:
ISB
BX lr
-
+
// ------------------------------------------------------------
@@ -469,7 +469,7 @@ leaveSMP:
ISB
BX lr
-
+
// ------------------------------------------------------------
// End of v7.s
diff --git a/ports/cortex_a15/gnu/inc/tx_port.h b/ports/cortex_a15/gnu/inc/tx_port.h
index d80ddec1..f0153046 100644
--- a/ports/cortex_a15/gnu/inc/tx_port.h
+++ b/ports/cortex_a15/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,20 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -320,7 +307,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv7-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv7-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a15/gnu/readme_threadx.txt b/ports/cortex_a15/gnu/readme_threadx.txt
index 5bd5eb7c..80a0cf6a 100644
--- a/ports/cortex_a15/gnu/readme_threadx.txt
+++ b/ports/cortex_a15/gnu/readme_threadx.txt
@@ -1,55 +1,55 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A15
+ Microsoft's Azure RTOS ThreadX for Cortex-A15
Using the GNU Tools
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the GNU
-development environment.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the GNU
+development environment.
-At this point you may run the build_threadx.bat batch file. This will build the
-ThreadX run-time environment in the "example_build" directory.
+At this point you may run the build_threadx.bat batch file. This will build the
+ThreadX run-time environment in the "example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
2. Demonstration System
-Building the demonstration is easy; simply execute the build_threadx_sample.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_sample.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with TX.A. The resulting file DEMO is a binary file
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with TX.A. The resulting file DEMO is a binary file
that can be downloaded and executed.
3. System Initialization
-The entry point in ThreadX for the Cortex-A15 using GNU tools is at label _start.
+The entry point in ThreadX for the Cortex-A15 using GNU tools is at label _start.
This is defined within the modified version of the GNU startup code - crt0.S.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up various
-system data structures, the interrupt vectors, and a periodic timer interrupt source.
-By default, the vector area is defined to be located at the "__vectors" label,
-which is defined in reset.S. This area is typically located at 0. In situations
-where this is impossible, the vectors at the "__vectors" label should be copied
+The ThreadX tx_initialize_low_level.S file is responsible for setting up various
+system data structures, the interrupt vectors, and a periodic timer interrupt source.
+By default, the vector area is defined to be located at the "__vectors" label,
+which is defined in reset.S. This area is typically located at 0. In situations
+where this is impossible, the vectors at the "__vectors" label should be copied
to address 0.
-This is also where initialization of a periodic timer interrupt source should take
+This is also where initialization of a periodic timer interrupt source should take
place.
-In addition, _tx_initialize_low_level defines the first available address
-for use by the application, which is supplied as the sole input parameter
+In addition, _tx_initialize_low_level defines the first available address
+for use by the application, which is supplied as the sole input parameter
to your application definition function, tx_application_define.
4. Assembler / Compiler Switches
-The following are compiler switches used in building the demonstration
+The following are compiler switches used in building the demonstration
system:
Compiler/Assembler Meaning
@@ -73,164 +73,164 @@ Application Defines ( -D option)
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S.
TX_ENABLE_FIQ_NESTING This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S. In addition,
IRQ nesting should also be enabled.
TX_ENABLE_FIQ_SUPPORT This compiler define enables FIQ
interrupt handling in the ThreadX
- generic C source. This define
+ generic C source. This define
should also be used in conjunction
with the corresponding assembler
- define.
+ define.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
5. Register Usage and Stack Frames
-The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -248,52 +248,52 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A15
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A15 vectors start at address zero. The demonstration system startup
-reset.S file contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+reset.S file contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
-ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
+ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
nested IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.S:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -301,7 +301,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -314,7 +314,7 @@ __tx_irq_processing_return:
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.S:
.global __tx_irq_example_handler
@@ -324,12 +324,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} @ Save some scratch registers
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
BL _tx_thread_vectored_context_save @ Call the vectored IRQ context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -346,22 +346,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -369,10 +369,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* Enable nested IRQ interrupts. NOTE: Since this service returns
-@ with IRQ interrupts enabled, all IRQ interrupt sources must be
+@ with IRQ interrupts enabled, all IRQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-@
+@
@ /* Application ISR call(s) go here! */
@
@ /* Disable nested IRQ interrupts. The mode is switched back to
@@ -385,12 +385,12 @@ __tx_irq_processing_return:
7.3 FIQ Interrupts
-By default, FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.S.
@@ -399,7 +399,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.S.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.S:
@@ -427,18 +427,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.S. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -454,7 +454,7 @@ __tx_fiq_processing_return:
@ interrupt, and all C scratch registers are available for use. */
@
@ /* Enable nested FIQ interrupts. NOTE: Since this service returns
-@ with FIQ interrupts enabled, all FIQ interrupt sources must be
+@ with FIQ interrupts enabled, all FIQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@
@@ -470,12 +470,12 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
-interrupt source, these services are not functional but the remainder of
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
+interrupt source, these services are not functional but the remainder of
ThreadX will still run.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.S for the demonstration system.
@@ -483,7 +483,7 @@ found in the file tx_initialize_low_level.S for the demonstration system.
9. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a15/gnu/src/tx_thread_context_restore.S b/ports/cortex_a15/gnu/src/tx_thread_context_restore.S
index 6b4a561d..41b0b0d0 100644
--- a/ports/cortex_a15/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a15/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,23 +80,6 @@ IRQ_MODE = 0x12 // IRQ mode
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_restore
.type _tx_thread_context_restore,function
diff --git a/ports/cortex_a15/gnu/src/tx_thread_context_save.S b/ports/cortex_a15/gnu/src/tx_thread_context_save.S
index eff06283..d2d29d34 100644
--- a/ports/cortex_a15/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a15/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,23 +72,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_save
.type _tx_thread_context_save,function
diff --git a/ports/cortex_a15/gnu/src/tx_thread_fiq_context_restore.S b/ports/cortex_a15/gnu/src/tx_thread_fiq_context_restore.S
index d2fbebe1..921c322c 100644
--- a/ports/cortex_a15/gnu/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_a15/gnu/src/tx_thread_fiq_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,20 +79,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* FIQ ISR Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_restore
.type _tx_thread_fiq_context_restore,function
diff --git a/ports/cortex_a15/gnu/src/tx_thread_fiq_context_save.S b/ports/cortex_a15/gnu/src/tx_thread_fiq_context_save.S
index 88472a3d..2f1a6c40 100644
--- a/ports/cortex_a15/gnu/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_a15/gnu/src/tx_thread_fiq_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_save
.type _tx_thread_fiq_context_save,function
diff --git a/ports/cortex_a15/gnu/src/tx_thread_fiq_nesting_end.S b/ports/cortex_a15/gnu/src/tx_thread_fiq_nesting_end.S
index fa3886b8..a7ce701e 100644
--- a/ports/cortex_a15/gnu/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_a15/gnu/src/tx_thread_fiq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ FIQ_MODE_BITS = 0x11 // FIQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/gnu/src/tx_thread_fiq_nesting_start.S b/ports/cortex_a15/gnu/src/tx_thread_fiq_nesting_start.S
index dbed1cf2..4f095dde 100644
--- a/ports/cortex_a15/gnu/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_a15/gnu/src/tx_thread_fiq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a15/gnu/src/tx_thread_interrupt_control.S
index d1223cb8..a5bc47f7 100644
--- a/ports/cortex_a15/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a15/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,20 +69,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a15/gnu/src/tx_thread_interrupt_disable.S
index a87d1a06..d7b53bc2 100644
--- a/ports/cortex_a15/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a15/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,20 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a15/gnu/src/tx_thread_interrupt_restore.S
index 53ff2813..3c31e94b 100644
--- a/ports/cortex_a15/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a15/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,20 +68,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/gnu/src/tx_thread_irq_nesting_end.S b/ports/cortex_a15/gnu/src/tx_thread_irq_nesting_end.S
index 18aebc7c..cc4db3a7 100644
--- a/ports/cortex_a15/gnu/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_a15/gnu/src/tx_thread_irq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/gnu/src/tx_thread_irq_nesting_start.S b/ports/cortex_a15/gnu/src/tx_thread_irq_nesting_start.S
index a2ffd35d..3635874d 100644
--- a/ports/cortex_a15/gnu/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_a15/gnu/src/tx_thread_irq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/gnu/src/tx_thread_schedule.S b/ports/cortex_a15/gnu/src/tx_thread_schedule.S
index 07dd6f7f..a74e2050 100644
--- a/ports/cortex_a15/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a15/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,6 +40,14 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode
+#ifdef TX_ENABLE_VFP_SUPPORT
+#define IRQ_MASK 0x80
+#endif
+
+#ifdef TX_ENABLE_FIQ_SUPPORT
+#define FIQ_MASK 0x40
+#endif
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
@@ -73,23 +82,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
@@ -259,3 +251,4 @@ no_fiq:
BX lr
#endif
+
diff --git a/ports/cortex_a15/gnu/src/tx_thread_stack_build.S b/ports/cortex_a15/gnu/src/tx_thread_stack_build.S
index 3876225a..827554a7 100644
--- a/ports/cortex_a15/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a15/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,20 +75,6 @@ CPSR_MASK = 0xBF // Mask initial CPSR, T, IRQ int
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/gnu/src/tx_thread_system_return.S b/ports/cortex_a15/gnu/src/tx_thread_system_return.S
index 0eed478d..1a17446b 100644
--- a/ports/cortex_a15/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a15/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,23 +69,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/gnu/src/tx_thread_vectored_context_save.S b/ports/cortex_a15/gnu/src/tx_thread_vectored_context_save.S
index fe8a98e8..91653b75 100644
--- a/ports/cortex_a15/gnu/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_a15/gnu/src/tx_thread_vectored_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_vectored_context_save
.type _tx_thread_vectored_context_save,function
diff --git a/ports/cortex_a15/gnu/src/tx_timer_interrupt.S b/ports/cortex_a15/gnu/src/tx_timer_interrupt.S
index cb0c1fa2..179ac894 100644
--- a/ports/cortex_a15/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a15/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,20 +78,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a15/iar/example_build/cstartup.s b/ports/cortex_a15/iar/example_build/cstartup.s
index 647de2e8..b4ed8f87 100644
--- a/ports/cortex_a15/iar/example_build/cstartup.s
+++ b/ports/cortex_a15/iar/example_build/cstartup.s
@@ -1,7 +1,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; Part one of the system initialization code,
+;; Part one of the system initialization code,
;; contains low-level
;; initialization.
;;
@@ -71,13 +71,13 @@ FIQ_Addr: DCD __tx_fiq_handler
SECTION .text:CODE:NOROOT(2)
-; PUBLIC ?cstartup
+; PUBLIC ?cstartup
EXTERN ?main
REQUIRE __vector
- ARM
-
-__iar_program_start:
+ ARM
+
+__iar_program_start:
?cstartup:
;
diff --git a/ports/cortex_a15/iar/example_build/sample_threadx.c b/ports/cortex_a15/iar/example_build/sample_threadx.c
index c7c300cb..afbd4ea8 100644
--- a/ports/cortex_a15/iar/example_build/sample_threadx.c
+++ b/ports/cortex_a15/iar/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -83,42 +83,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -126,23 +126,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -245,11 +245,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -308,7 +308,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -361,7 +361,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_a15/iar/example_build/tx_initialize_low_level.s b/ports/cortex_a15/iar/example_build/tx_initialize_low_level.s
index 6b32af58..13bb51f0 100644
--- a/ports/cortex_a15/iar/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_a15/iar/example_build/tx_initialize_low_level.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -52,7 +52,7 @@ SYS_STACK_SIZE DEFINE 1024 ; System stack size
;
;
;
-;/* Define the FREE_MEM segment that will specify where free memory is
+;/* Define the FREE_MEM segment that will specify where free memory is
; defined. This must also be located in at the end of other RAM segments
; in the linker control file. The value of this segment is what is passed
; to tx_application_define. */
@@ -65,45 +65,39 @@ __tx_free_memory_start
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level Cortex-A15/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level Cortex-A15/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -136,7 +130,7 @@ _tx_initialize_low_level
;
LDR r2, =_tx_initialize_unused_memory ; Pickup unused memory ptr address
STR r0, [r2, #0] ; Save first free memory address
-;
+;
; /* Setup Timer for periodic interrupts. */
;
; /* Done, return to caller. */
@@ -187,17 +181,17 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -211,7 +205,7 @@ __tx_irq_processing_return
;
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -227,28 +221,28 @@ __tx_irq_processing_return
;__tx_example_vectored_irq_handler:
;
;
-; /* Save initial context and call context save to prepare for
+; /* Save initial context and call context save to prepare for
; vectored ISR execution. */
;
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
; BL _tx_thread_vectored_context_save ; Vectored context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -257,7 +251,7 @@ __tx_irq_processing_return
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
@@ -281,11 +275,11 @@ __tx_fiq_processing_return
; /* At this point execution is still in the FIQ mode. The CPSR, point of
; interrupt, and all C scratch registers are available for use. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
; from FIQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with FIQ interrupts enabled.
+; system mode and returns with FIQ interrupts enabled.
;
-; NOTE: It is very important to ensure all FIQ interrupts are cleared
+; NOTE: It is very important to ensure all FIQ interrupts are cleared
; prior to enabling nested FIQ interrupts. */
#ifdef TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/cortex_a15/iar/inc/tx_port.h b/ports/cortex_a15/iar/inc/tx_port.h
index a492d81e..ca868f64 100644
--- a/ports/cortex_a15/iar/inc/tx_port.h
+++ b/ports/cortex_a15/iar/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-A15/IAR */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-A15/IAR */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -79,7 +71,7 @@
#endif
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -115,12 +107,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -130,8 +122,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -189,7 +181,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -203,18 +195,18 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable; \
- VOID *tx_thread_iar_tls_pointer;
+ VOID *tx_thread_iar_tls_pointer;
#else
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable;
#endif
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -228,11 +220,11 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -242,23 +234,23 @@ ULONG _tx_misra_time_stamp_get(VOID);
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#if (__VER__ < 8000000)
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {_tx_iar_destroy_per_thread_tls_area(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
-#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
+#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#endif
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -286,8 +278,8 @@ void __iar_Initlocks(void);
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef TX_DISABLE_INLINE
@@ -298,22 +290,22 @@ void __iar_Initlocks(void);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (UINT) __CLZ(m); \
- b = 31 - b;
+ b = 31 - b;
#endif
#endif
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
/* First, check and see what mode the file is being compiled in. The IAR compiler
- defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
+ defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
is present. If ARM 32-bit mode is present, the fast CPSR manipulation macros
are available. Otherwise, if Thumb mode is present, we must use function calls. */
@@ -383,8 +375,8 @@ void tx_thread_vfp_disable(void);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-A15/IAR Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-A15/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_a15/iar/readme_threadx.txt b/ports/cortex_a15/iar/readme_threadx.txt
index 151c5253..e087351f 100644
--- a/ports/cortex_a15/iar/readme_threadx.txt
+++ b/ports/cortex_a15/iar/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A15
+ Microsoft's Azure RTOS ThreadX for Cortex-A15
Thumb & 32-bit Mode
@@ -7,10 +7,10 @@
1. Building the ThreadX run-time Library
Building the ThreadX library is easy. First, open the Azure RTOS workspace
-azure_rtos.eww. Next, make the TX project the "active project" in the
-IAR Embedded Workbench and select the "Make" button. You should observe
-assembly and compilation of a series of ThreadX source files. This
-results in the ThreadX run-time library file tx.a, which is needed by
+azure_rtos.eww. Next, make the TX project the "active project" in the
+IAR Embedded Workbench and select the "Make" button. You should observe
+assembly and compilation of a series of ThreadX source files. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
@@ -20,47 +20,47 @@ The ThreadX demonstration is designed to execute under the IAR
Windows-based Cortex-A15 simulator.
Building the demonstration is easy; simply make the sample_threadx.ewp project
-the "active project" in the IAR Embedded Workbench and select the
+the "active project" in the IAR Embedded Workbench and select the
"Make" button.
-You should observe the compilation of sample_threadx.c (which is the demonstration
+You should observe the compilation of sample_threadx.c (which is the demonstration
application) and linking with tx.a. The resulting file sample_threadx.out is a
binary file that can be downloaded and executed on IAR's Cortex-A15 simulator.
3. System Initialization
-The entry point in ThreadX for the Cortex-A15 using IAR tools is at label
-?cstartup. This is defined within the IAR compiler's startup code. In
-addition, this is where all static and global preset C variable
+The entry point in ThreadX for the Cortex-A15 using IAR tools is at label
+?cstartup. This is defined within the IAR compiler's startup code. In
+addition, this is where all static and global preset C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, and a periodic timer interrupt source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, and a periodic timer interrupt source.
By default, the vector area is defined at the top of cstartup.s, which is
-a slightly modified from the base IAR file.
+a slightly modified from the base IAR file.
The _tx_initialize_low_level function inside of tx_initialize_low_level.s
-also determines the first available address for use by the application, which
-is supplied as the sole input parameter to your application definition function,
-tx_application_define. To accomplish this, a section is created in
-tx_initialize_low_level.s called FREE_MEM, which must be located after all
+also determines the first available address for use by the application, which
+is supplied as the sole input parameter to your application definition function,
+tx_application_define. To accomplish this, a section is created in
+tx_initialize_low_level.s called FREE_MEM, which must be located after all
other RAM sections in memory.
4. Register Usage and Stack Frames
-The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
-scratch registers for each function. All other registers used by a C function
-must be preserved by the function. ThreadX takes advantage of this in
-situations where a context switch happens as a result of making a ThreadX
-service call (which is itself a C function). In such cases, the saved
+The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
+scratch registers for each function. All other registers used by a C function
+must be preserved by the function. ThreadX takes advantage of this in
+situations where a context switch happens as a result of making a ThreadX
+service call (which is itself a C function). In such cases, the saved
context of a thread is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -78,12 +78,12 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
5. Conditional Compilation Switches
@@ -92,146 +92,146 @@ The following are conditional compilation options for building the ThreadX libra
and application:
- TX_ENABLE_FIQ_SUPPORT This assembler/compiler define enables
+ TX_ENABLE_FIQ_SUPPORT This assembler/compiler define enables
FIQ interrupt handling support in the
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s.
TX_ENABLE_FIQ_NESTING This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s. In addition,
IRQ nesting should also be enabled.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
TX_THUMB Defined, this option enables the BX LR calling return sequence
@@ -245,29 +245,29 @@ and application:
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
-project to enable various compiler optimizations.
+project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A15
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A15 vectors start at address zero. The demonstration system startup
-cstartup.s file contains the vectors and is loaded at address zero.
-On actual hardware platforms, this area might have to be copied to address 0.
+cstartup.s file contains the vectors and is loaded at address zero.
+On actual hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -278,12 +278,12 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
PUBLIC __tx_irq_handler
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -291,7 +291,7 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -304,7 +304,7 @@ __tx_irq_processing_return
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.s:
@@ -315,12 +315,12 @@ __tx_example_vectored_irq_handler
; /* Jump to context save to save system context. */
STMDB sp!, {r0-r3} ; Save some scratch registers
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -337,24 +337,24 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
RSEG .text:CODE:NOROOT(2)
PUBLIC __tx_irq_handler
RSEG .text:CODE:NOROOT(2)
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -362,15 +362,15 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;
BL _tx_thread_irq_nesting_start
@@ -378,7 +378,7 @@ __tx_irq_processing_return
; /* Application ISR dispatch call goes here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;
BL _tx_thread_irq_nesting_end
@@ -389,12 +389,12 @@ __tx_irq_processing_return
7.3 FIQ Interrupts
-By default, Cortex-A15 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, Cortex-A15 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -403,7 +403,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.s.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.s:
@@ -434,18 +434,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.s. When nested FIQ interrupts are no
-longer required, calling the _tx_thread_fiq_nesting_end service disables
-nesting by disabling FIQ interrupts and switching back to FIQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.s. When nested FIQ interrupts are no
+longer required, calling the _tx_thread_fiq_nesting_end service disables
+nesting by disabling FIQ interrupts and switching back to FIQ mode in
preparation for the FIQ context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -463,7 +463,7 @@ __tx_fiq_processing_return:
; interrupt, and all C scratch registers are available for use. */
;
; /* Enable nested FIQ interrupts. NOTE: Since this service returns
-; with FIQ interrupts enabled, all FIQ interrupt sources must be
+; with FIQ interrupts enabled, all FIQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
;
@@ -479,22 +479,22 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
+To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
in the IRQ processing.
9. Thumb/Cortex-A15 Mixed Mode
-By default, ThreadX is setup for running in Cortex-A15 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
+By default, ThreadX is setup for running in Cortex-A15 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
ThreadX file and/or the application in Thumb mode. The only exception
-to this is the file tx_thread_shell_entry.c. This file must always be
-built in 32-bit mode. In addition, if any Thumb code is used the entire
+to this is the file tx_thread_shell_entry.c. This file must always be
+built in 32-bit mode. In addition, if any Thumb code is used the entire
ThreadX assembly source should be built with TX_THUMB defined.
@@ -506,14 +506,14 @@ should have the following line added (if not already in place):
initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
-The project options "General Options -> Library Configuration" should also have the
+The project options "General Options -> Library Configuration" should also have the
"Enable thread support in library" box selected.
11. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a15/iar/src/tx_iar.c b/ports/cortex_a15/iar/src/tx_iar.c
index a37231c8..238b485e 100644
--- a/ports/cortex_a15/iar/src/tx_iar.c
+++ b/ports/cortex_a15/iar/src/tx_iar.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** IAR Multithreaded Library Support */
/** */
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,24 +423,24 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#include
+#include
void * __aeabi_read_tp();
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports/cortex_a15/iar/src/tx_thread_context_restore.s b/ports/cortex_a15/iar/src/tx_thread_context_restore.s
index 64584101..d88b3e38 100644
--- a/ports/cortex_a15/iar/src/tx_thread_context_restore.s
+++ b/ports/cortex_a15/iar/src/tx_thread_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -47,47 +47,38 @@ IRQ_MODE DEFINE 0x92 ; Disable IRQ, IRQ mode
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore Cortex-A15/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore Cortex-A15/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -119,13 +110,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state variable
LDR r2, [r3, #0] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3, #0] ; Store the counter
+ STR r2, [r3, #0] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
diff --git a/ports/cortex_a15/iar/src/tx_thread_context_save.s b/ports/cortex_a15/iar/src/tx_thread_context_save.s
index 09d94175..799cf55b 100644
--- a/ports/cortex_a15/iar/src/tx_thread_context_save.s
+++ b/ports/cortex_a15/iar/src/tx_thread_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -37,46 +37,37 @@
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save Cortex-A15/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save Cortex-A15/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
@@ -93,7 +84,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
#ifdef TX_ENABLE_FIQ_SUPPORT
CPSID if ; Disable FIQ interrupts
#endif
@@ -111,7 +102,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -127,7 +118,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -141,13 +132,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -167,7 +158,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -177,7 +168,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -192,7 +183,7 @@ __tx_thread_idle_system_save
#endif
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports/cortex_a15/iar/src/tx_thread_fiq_context_restore.s b/ports/cortex_a15/iar/src/tx_thread_fiq_context_restore.s
index bbbf8cf1..38259b01 100644
--- a/ports/cortex_a15/iar/src/tx_thread_fiq_context_restore.s
+++ b/ports/cortex_a15/iar/src/tx_thread_fiq_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -32,7 +32,7 @@
;
SVC_MODE DEFINE 0xD3 ; SVC mode
FIQ_MODE DEFINE 0xD1 ; FIQ mode
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
THUMB_MASK DEFINE 0x20 ; Thumb bit mask
IRQ_MODE_BITS DEFINE 0x12 ; IRQ mode bits
;
@@ -48,47 +48,38 @@ IRQ_MODE_BITS DEFINE 0x12 ; IRQ mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_restore Cortex-A15/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_restore Cortex-A15/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the fiq interrupt context when processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* FIQ ISR Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function restores the fiq interrupt context when processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* FIQ ISR Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_context_restore(VOID)
@@ -116,13 +107,13 @@ _tx_thread_fiq_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state variable
LDR r2, [r3, #0] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3, #0] ; Store the counter
+ STR r2, [r3, #0] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -223,7 +214,7 @@ _tx_skip_fiq_vfp_save
BEQ __tx_thread_fiq_dont_save_ts ; No, don't save it
;
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-; _tx_timer_time_slice = 0;
+; _tx_timer_time_slice = 0;
;
STR r2, [r0, #24] ; Save thread's time-slice
MOV r2, #0 ; Clear value
diff --git a/ports/cortex_a15/iar/src/tx_thread_fiq_context_save.s b/ports/cortex_a15/iar/src/tx_thread_fiq_context_save.s
index b8828834..8e205668 100644
--- a/ports/cortex_a15/iar/src/tx_thread_fiq_context_save.s
+++ b/ports/cortex_a15/iar/src/tx_thread_fiq_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,46 +36,37 @@
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_save Cortex-A15/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_save Cortex-A15/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
; VOID _tx_thread_fiq_context_save(VOID)
@@ -92,7 +83,7 @@ _tx_thread_fiq_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state variable
LDR r2, [r3, #0] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -107,7 +98,7 @@ _tx_thread_fiq_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -123,38 +114,38 @@ _tx_thread_fiq_context_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
__tx_thread_fiq_not_nested_save
-; }
+; }
;
; /* Otherwise, not nested, check to see if a thread was running. */
; else if (_tx_thread_current_ptr)
-; {
+; {
;
ADD r2, r2, #1 ; Increment the interrupt counter
STR r2, [r3, #0] ; Store it back in the variable
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
-; ; scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
+; ; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, lr} ; Store other registers, Note that we don't
-; ; need to save sl and ip since FIQ has
-; ; copies of these registers. Nested
+; ; need to save sl and ip since FIQ has
+; ; copies of these registers. Nested
; ; interrupt processing does need to save
; ; these registers.
;
; /* Save the current stack pointer in the thread's control block. */
-; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
;
; /* Switch to the system stack. */
-; sp = _tx_thread_system_stack_ptr;
+; sp = _tx_thread_system_stack_ptr;
;
MOV r10, #0 ; Clear stack limit
@@ -167,7 +158,7 @@ __tx_thread_fiq_not_nested_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
; else
@@ -187,18 +178,18 @@ __tx_thread_fiq_idle_system_save
#endif
;
; /* Not much to do here, save the current SPSR and LR for possible
-; use in IRQ interrupted in idle system conditions, and return to
+; use in IRQ interrupted in idle system conditions, and return to
; FIQ interrupt processing. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, lr} ; Store other registers that will get used
-; ; or stripped off the stack in context
-; ; restore
- B __tx_fiq_processing_return ; Continue FIQ processing
+; ; or stripped off the stack in context
+; ; restore
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
-;}
+;}
END
diff --git a/ports/cortex_a15/iar/src/tx_thread_fiq_nesting_end.s b/ports/cortex_a15/iar/src/tx_thread_fiq_nesting_end.s
index f8a73cbc..272bb745 100644
--- a/ports/cortex_a15/iar/src/tx_thread_fiq_nesting_end.s
+++ b/ports/cortex_a15/iar/src/tx_thread_fiq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ/FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
FIQ_MODE_BITS DEFINE 0x11 ; FIQ mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_end Cortex-A15/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_end Cortex-A15/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-;/* processing from system mode back to FIQ mode prior to the ISR */
-;/* calling _tx_thread_fiq_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+;/* processing from system mode back to FIQ mode prior to the ISR */
+;/* calling _tx_thread_fiq_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_end(VOID)
@@ -96,7 +90,7 @@ _tx_thread_fiq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #FIQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/cortex_a15/iar/src/tx_thread_fiq_nesting_start.s b/ports/cortex_a15/iar/src/tx_thread_fiq_nesting_start.s
index 497d7421..afa1ae05 100644
--- a/ports/cortex_a15/iar/src/tx_thread_fiq_nesting_start.s
+++ b/ports/cortex_a15/iar/src/tx_thread_fiq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS DEFINE 0x1F ; System mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_start Cortex-A15/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_start Cortex-A15/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-;/* processing to the system mode so nested FIQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+;/* processing to the system mode so nested FIQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/cortex_a15/iar/src/tx_thread_interrupt_control.s b/ports/cortex_a15/iar/src/tx_thread_interrupt_control.s
index ce9d08a7..c7432fcb 100644
--- a/ports/cortex_a15/iar/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_a15/iar/src/tx_thread_interrupt_control.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -30,42 +30,36 @@
INT_MASK = 0x03F
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control Cortex-A15/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control Cortex-A15/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/cortex_a15/iar/src/tx_thread_interrupt_disable.s b/ports/cortex_a15/iar/src/tx_thread_interrupt_disable.s
index 19c70c89..97b13aab 100644
--- a/ports/cortex_a15/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_a15/iar/src/tx_thread_interrupt_disable.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -27,41 +27,35 @@
;#include "tx_api.h"
;#include "tx_thread.h"
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable Cortex-A15/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable Cortex-A15/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(void)
@@ -80,7 +74,7 @@ _tx_thread_interrupt_disable
#ifdef TX_ENABLE_FIQ_SUPPORT
CPSID if ; Disable IRQ and FIQ
#else
- CPSID i ; Disable IRQ
+ CPSID i ; Disable IRQ
#endif
#ifdef TX_THUMB
diff --git a/ports/cortex_a15/iar/src/tx_thread_interrupt_restore.s b/ports/cortex_a15/iar/src/tx_thread_interrupt_restore.s
index 70c949b3..b2765483 100644
--- a/ports/cortex_a15/iar/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_a15/iar/src/tx_thread_interrupt_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -27,42 +27,36 @@
;#include "tx_api.h"
;#include "tx_thread.h"
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore Cortex-A15/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore Cortex-A15/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function is responsible for restoring interrupts to the state */
;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/cortex_a15/iar/src/tx_thread_irq_nesting_end.s b/ports/cortex_a15/iar/src/tx_thread_irq_nesting_end.s
index f1662aba..33c018f4 100644
--- a/ports/cortex_a15/iar/src/tx_thread_irq_nesting_end.s
+++ b/ports/cortex_a15/iar/src/tx_thread_irq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ/FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
IRQ_MODE_BITS DEFINE 0x12 ; IRQ mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end Cortex-A15/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end Cortex-A15/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
@@ -96,7 +90,7 @@ _tx_thread_irq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #IRQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/cortex_a15/iar/src/tx_thread_irq_nesting_start.s b/ports/cortex_a15/iar/src/tx_thread_irq_nesting_start.s
index 21151129..0cc03356 100644
--- a/ports/cortex_a15/iar/src/tx_thread_irq_nesting_start.s
+++ b/ports/cortex_a15/iar/src/tx_thread_irq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS DEFINE 0x1F ; System mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start Cortex-A15/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start Cortex-A15/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/cortex_a15/iar/src/tx_thread_schedule.s b/ports/cortex_a15/iar/src/tx_thread_schedule.s
index c98087aa..2a36cc42 100644
--- a/ports/cortex_a15/iar/src/tx_thread_schedule.s
+++ b/ports/cortex_a15/iar/src/tx_thread_schedule.s
@@ -1,18 +1,19 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +36,39 @@
EXTERN _tx_timer_time_slice
EXTERN _tx_execution_thread_enter
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule Cortex-A15/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule Cortex-A15/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
@@ -107,7 +99,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -120,7 +112,7 @@ __tx_thread_schedule_loop
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
;
- LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
STR r0, [r1, #0] ; Setup current thread pointer
;
; /* Increment the run count for this thread. */
@@ -134,7 +126,7 @@ __tx_thread_schedule_loop
; /* Setup time-slice, if present. */
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
;
- LDR r2, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r2, =_tx_timer_time_slice ; Pickup address of time-slice
; variable
LDR sp, [r0, #8] ; Switch stack pointers
STR r3, [r2, #0] ; Setup time-slice
@@ -239,3 +231,4 @@ __tx_no_thread_to_disable
END
+
diff --git a/ports/cortex_a15/iar/src/tx_thread_stack_build.s b/ports/cortex_a15/iar/src/tx_thread_stack_build.s
index 141a49bd..bfde0340 100644
--- a/ports/cortex_a15/iar/src/tx_thread_stack_build.s
+++ b/ports/cortex_a15/iar/src/tx_thread_stack_build.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -38,44 +38,38 @@ CPSR_MASK DEFINE 0x9F ; Mask initial CPSR, IRQ interrupts ena
EXTERN _tx_thread_schedule
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build Cortex-A15/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build Cortex-A15/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function builds a stack frame on the supplied thread's stack. */
;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
;/* thread_ptr Pointer to thread control blk */
;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -85,10 +79,10 @@ CPSR_MASK DEFINE 0x9F ; Mask initial CPSR, IRQ interrupts ena
CODE32
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-A15 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports/cortex_a15/iar/src/tx_thread_system_return.s b/ports/cortex_a15/iar/src/tx_thread_system_return.s
index 3a1d2ba6..bd58b76c 100644
--- a/ports/cortex_a15/iar/src/tx_thread_system_return.s
+++ b/ports/cortex_a15/iar/src/tx_thread_system_return.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,47 +36,38 @@
EXTERN _tx_execution_thread_exit
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return Cortex-A15/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return Cortex-A15/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
@@ -92,7 +83,7 @@ _tx_thread_system_return
LDR r4, =_tx_thread_current_ptr ; Pickup address of current ptr
LDR r5, [r4, #0] ; Pickup current thread pointer
-
+
#ifdef __ARMVFP__
LDR r1, [r5, #144] ; Pickup the VFP enabled flag
CMP r1, #0 ; Is the VFP enabled?
@@ -107,7 +98,7 @@ _tx_skip_solicited_vfp_save
MOV r0, #0 ; Build a solicited stack type
MRS r1, CPSR ; Pickup the CPSR
STMDB sp!, {r0-r1} ; Save type and CPSR
-;
+;
; /* Lockout interrupts. */
;
#ifdef TX_ENABLE_FIQ_SUPPORT
@@ -115,7 +106,7 @@ _tx_skip_solicited_vfp_save
#else
CPSID i ; Disable IRQ interrupts
#endif
-
+
#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
;
; /* Call the thread exit function to indicate the thread is no longer executing. */
diff --git a/ports/cortex_a15/iar/src/tx_thread_vectored_context_save.s b/ports/cortex_a15/iar/src/tx_thread_vectored_context_save.s
index 8d05bd80..67ffb6cd 100644
--- a/ports/cortex_a15/iar/src/tx_thread_vectored_context_save.s
+++ b/ports/cortex_a15/iar/src/tx_thread_vectored_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,46 +36,37 @@
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save Cortex-A15/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save Cortex-A15/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_vectored_context_save(VOID)
@@ -134,7 +125,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -166,7 +157,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports/cortex_a15/iar/src/tx_timer_interrupt.s b/ports/cortex_a15/iar/src/tx_timer_interrupt.s
index 9a37d02a..b013cadd 100644
--- a/ports/cortex_a15/iar/src/tx_timer_interrupt.s
+++ b/ports/cortex_a15/iar/src/tx_timer_interrupt.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Timer */
;/** */
@@ -43,46 +43,40 @@
EXTERN _tx_thread_time_slice
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt Cortex-A15/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt Cortex-A15/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_time_slice Time slice interrupted thread */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_time_slice Time slice interrupted thread */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -108,7 +102,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -226,7 +220,7 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup address of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup address of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
diff --git a/ports/cortex_a17/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a17/ac6/example_build/sample_threadx/.cproject
index 6eef9a7b..80b9670c 100644
--- a/ports/cortex_a17/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a17/ac6/example_build/sample_threadx/.cproject
@@ -1,176 +1,176 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a17/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a17/ac6/example_build/sample_threadx/sample_threadx.scat
index d23881cd..66d0d95a 100644
--- a/ports/cortex_a17/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a17/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -1,7 +1,7 @@
;*******************************************************
; Copyright (c) 2011-2016 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;*******************************************************
diff --git a/ports/cortex_a17/ac6/example_build/sample_threadx/tx_initialize_low_level.S b/ports/cortex_a17/ac6/example_build/sample_threadx/tx_initialize_low_level.S
index 083a57a7..76395459 100644
--- a/ports/cortex_a17/ac6/example_build/sample_threadx/tx_initialize_low_level.S
+++ b/ports/cortex_a17/ac6/example_build/sample_threadx/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -91,14 +92,6 @@ $_tx_initialize_low_level:
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* */
/**************************************************************************/
.global _tx_initialize_low_level
.type _tx_initialize_low_level,function
diff --git a/ports/cortex_a17/ac6/example_build/tx/.cproject b/ports/cortex_a17/ac6/example_build/tx/.cproject
index 93fc2931..89a6951a 100644
--- a/ports/cortex_a17/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a17/ac6/example_build/tx/.cproject
@@ -1,146 +1,146 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a17/ac6/inc/tx_port.h b/ports/cortex_a17/ac6/inc/tx_port.h
index d80ddec1..f0153046 100644
--- a/ports/cortex_a17/ac6/inc/tx_port.h
+++ b/ports/cortex_a17/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,20 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -320,7 +307,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv7-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv7-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a17/ac6/src/tx_thread_context_restore.S b/ports/cortex_a17/ac6/src/tx_thread_context_restore.S
index 6b4a561d..41b0b0d0 100644
--- a/ports/cortex_a17/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a17/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,23 +80,6 @@ IRQ_MODE = 0x12 // IRQ mode
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_restore
.type _tx_thread_context_restore,function
diff --git a/ports/cortex_a17/ac6/src/tx_thread_context_save.S b/ports/cortex_a17/ac6/src/tx_thread_context_save.S
index eff06283..d2d29d34 100644
--- a/ports/cortex_a17/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a17/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,23 +72,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_save
.type _tx_thread_context_save,function
diff --git a/ports/cortex_a17/ac6/src/tx_thread_fiq_context_restore.S b/ports/cortex_a17/ac6/src/tx_thread_fiq_context_restore.S
index d2fbebe1..921c322c 100644
--- a/ports/cortex_a17/ac6/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_a17/ac6/src/tx_thread_fiq_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,20 +79,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* FIQ ISR Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_restore
.type _tx_thread_fiq_context_restore,function
diff --git a/ports/cortex_a17/ac6/src/tx_thread_fiq_context_save.S b/ports/cortex_a17/ac6/src/tx_thread_fiq_context_save.S
index 88472a3d..2f1a6c40 100644
--- a/ports/cortex_a17/ac6/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_a17/ac6/src/tx_thread_fiq_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_save
.type _tx_thread_fiq_context_save,function
diff --git a/ports/cortex_a17/ac6/src/tx_thread_fiq_nesting_end.S b/ports/cortex_a17/ac6/src/tx_thread_fiq_nesting_end.S
index fa3886b8..a7ce701e 100644
--- a/ports/cortex_a17/ac6/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_a17/ac6/src/tx_thread_fiq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ FIQ_MODE_BITS = 0x11 // FIQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/ac6/src/tx_thread_fiq_nesting_start.S b/ports/cortex_a17/ac6/src/tx_thread_fiq_nesting_start.S
index dbed1cf2..4f095dde 100644
--- a/ports/cortex_a17/ac6/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_a17/ac6/src/tx_thread_fiq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a17/ac6/src/tx_thread_interrupt_control.S
index d1223cb8..a5bc47f7 100644
--- a/ports/cortex_a17/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a17/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,20 +69,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a17/ac6/src/tx_thread_interrupt_disable.S
index a87d1a06..d7b53bc2 100644
--- a/ports/cortex_a17/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a17/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,20 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a17/ac6/src/tx_thread_interrupt_restore.S
index 53ff2813..3c31e94b 100644
--- a/ports/cortex_a17/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a17/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,20 +68,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/ac6/src/tx_thread_irq_nesting_end.S b/ports/cortex_a17/ac6/src/tx_thread_irq_nesting_end.S
index 18aebc7c..cc4db3a7 100644
--- a/ports/cortex_a17/ac6/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_a17/ac6/src/tx_thread_irq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/ac6/src/tx_thread_irq_nesting_start.S b/ports/cortex_a17/ac6/src/tx_thread_irq_nesting_start.S
index a2ffd35d..3635874d 100644
--- a/ports/cortex_a17/ac6/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_a17/ac6/src/tx_thread_irq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/ac6/src/tx_thread_schedule.S b/ports/cortex_a17/ac6/src/tx_thread_schedule.S
index 07dd6f7f..a74e2050 100644
--- a/ports/cortex_a17/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a17/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,6 +40,14 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode
+#ifdef TX_ENABLE_VFP_SUPPORT
+#define IRQ_MASK 0x80
+#endif
+
+#ifdef TX_ENABLE_FIQ_SUPPORT
+#define FIQ_MASK 0x40
+#endif
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
@@ -73,23 +82,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
@@ -259,3 +251,4 @@ no_fiq:
BX lr
#endif
+
diff --git a/ports/cortex_a17/ac6/src/tx_thread_stack_build.S b/ports/cortex_a17/ac6/src/tx_thread_stack_build.S
index 3876225a..827554a7 100644
--- a/ports/cortex_a17/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a17/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,20 +75,6 @@ CPSR_MASK = 0xBF // Mask initial CPSR, T, IRQ int
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/ac6/src/tx_thread_system_return.S b/ports/cortex_a17/ac6/src/tx_thread_system_return.S
index 0eed478d..1a17446b 100644
--- a/ports/cortex_a17/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a17/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,23 +69,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/ac6/src/tx_thread_vectored_context_save.S b/ports/cortex_a17/ac6/src/tx_thread_vectored_context_save.S
index fe8a98e8..91653b75 100644
--- a/ports/cortex_a17/ac6/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_a17/ac6/src/tx_thread_vectored_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_vectored_context_save
.type _tx_thread_vectored_context_save,function
diff --git a/ports/cortex_a17/ac6/src/tx_timer_interrupt.S b/ports/cortex_a17/ac6/src/tx_timer_interrupt.S
index cb0c1fa2..179ac894 100644
--- a/ports/cortex_a17/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a17/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,20 +78,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/gnu/example_build/reset.S b/ports/cortex_a17/gnu/example_build/reset.S
index 3ce9efb7..f2e0522b 100644
--- a/ports/cortex_a17/gnu/example_build/reset.S
+++ b/ports/cortex_a17/gnu/example_build/reset.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a17/gnu/example_build/sample_threadx.ld b/ports/cortex_a17/gnu/example_build/sample_threadx.ld
index cb42c11c..d43e28f1 100644
--- a/ports/cortex_a17/gnu/example_build/sample_threadx.ld
+++ b/ports/cortex_a17/gnu/example_build/sample_threadx.ld
@@ -7,7 +7,7 @@ OUTPUT_ARCH(arm)
SECTIONS
{
. = 0x00000000;
-
+
.vectors : {reset.o(.text) }
/* Read-only sections, merged into text segment: */
@@ -94,8 +94,8 @@ SECTIONS
*(.gnu.linkonce.t*)
*(.glue_7t) *(.glue_7)
} =0
- .init :
- {
+ .init :
+ {
KEEP (*(.init))
} =0
_etext = .;
@@ -120,7 +120,7 @@ SECTIONS
.data1 : { *(.data1) }
.eh_frame : { KEEP (*(.eh_frame)) }
.gcc_except_table : { *(.gcc_except_table) }
- .ctors :
+ .ctors :
{
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
@@ -153,9 +153,9 @@ SECTIONS
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata :
+ .sdata :
{
- *(.sdata)
+ *(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
}
@@ -191,7 +191,7 @@ SECTIONS
_stack_bottom = ABSOLUTE(.) ;
- /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
+ /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
SYS stack if nested interrupts are enabled. */
. = ALIGN(8) ;
. += 4096 ;
diff --git a/ports/cortex_a17/gnu/example_build/tx_initialize_low_level.S b/ports/cortex_a17/gnu/example_build/tx_initialize_low_level.S
index 88777dfd..f9a57216 100644
--- a/ports/cortex_a17/gnu/example_build/tx_initialize_low_level.S
+++ b/ports/cortex_a17/gnu/example_build/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -95,17 +96,6 @@ $_tx_initialize_low_level:
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_initialize_low_level
.type _tx_initialize_low_level,function
diff --git a/ports/cortex_a17/gnu/example_build/v7.h b/ports/cortex_a17/gnu/example_build/v7.h
index 5a08b43f..1133b0ac 100644
--- a/ports/cortex_a17/gnu/example_build/v7.h
+++ b/ports/cortex_a17/gnu/example_build/v7.h
@@ -4,7 +4,7 @@
//
// Copyright (c) 2011-2016 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
@@ -37,7 +37,6 @@ void disableInterrupts(void);
void invalidateCaches_IS(void);
void cleanInvalidateDCache(void);
-void invalidateCaches_IS(void);
void enableCaches(void);
void disableCaches(void);
void invalidateCaches(void);
diff --git a/ports/cortex_a17/gnu/example_build/v7.s b/ports/cortex_a17/gnu/example_build/v7.s
index 82c9ab1e..9487ddde 100644
--- a/ports/cortex_a17/gnu/example_build/v7.s
+++ b/ports/cortex_a17/gnu/example_build/v7.s
@@ -3,7 +3,7 @@
//
// Copyright (c) 2011-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
@@ -20,7 +20,7 @@
enableInterrupts:
CPSIE i
BX lr
-
+
.global disableInterrupts
.type disableInterrupts,function
@@ -28,7 +28,7 @@ enableInterrupts:
disableInterrupts:
CPSID i
BX lr
-
+
// ------------------------------------------------------------
// Cache Maintenance
@@ -44,7 +44,7 @@ enableCaches:
MCR p15, 0, r0, c1, c0, 0 // Write System Control Register
ISB
BX lr
-
+
.global disableCaches
@@ -57,7 +57,7 @@ disableCaches:
MCR p15, 0, r0, c1, c0, 0 // Write System Control Register
ISB
BX lr
-
+
.global cleanDCache
@@ -114,7 +114,7 @@ clean_dcache_finished:
POP {r4-r12}
BX lr
-
+
.global cleanInvalidateDCache
.type cleanInvalidateDCache,function
@@ -170,7 +170,7 @@ clean_invalidate_dcache_finished:
POP {r4-r12}
BX lr
-
+
.global invalidateCaches
@@ -229,7 +229,7 @@ invalidate_caches_skip:
invalidate_caches_finished:
POP {r4-r12}
BX lr
-
+
.global invalidateCaches_IS
@@ -284,7 +284,7 @@ invalidate_caches_is_skip:
invalidate_caches_is_finished:
POP {r4-r12}
BX lr
-
+
// ------------------------------------------------------------
// TLB
@@ -297,7 +297,7 @@ invalidateUnifiedTLB:
MOV r0, #0
MCR p15, 0, r0, c8, c7, 0 // TLBIALL - Invalidate entire unified TLB
BX lr
-
+
.global invalidateUnifiedTLB_IS
.type invalidateUnifiedTLB_IS,function
@@ -306,7 +306,7 @@ invalidateUnifiedTLB_IS:
MOV r0, #1
MCR p15, 0, r0, c8, c3, 0 // TLBIALLIS - Invalidate entire unified TLB Inner Shareable
BX lr
-
+
// ------------------------------------------------------------
// Branch Prediction
@@ -319,7 +319,7 @@ flushBranchTargetCache:
MOV r0, #0
MCR p15, 0, r0, c7, c5, 6 // BPIALL - Invalidate entire branch predictor array
BX lr
-
+
.global flushBranchTargetCache_IS
.type flushBranchTargetCache_IS,function
@@ -328,7 +328,7 @@ flushBranchTargetCache_IS:
MOV r0, #0
MCR p15, 0, r0, c7, c1, 6 // BPIALLIS - Invalidate entire branch predictor array Inner Shareable
BX lr
-
+
// ------------------------------------------------------------
// High Vecs
@@ -343,7 +343,7 @@ enableHighVecs:
MCR p15, 0, r0, c1, c0, 0 // Write Control Register
ISB
BX lr
-
+
.global disableHighVecs
.type disableHighVecs,function
@@ -354,7 +354,7 @@ disableHighVecs:
MCR p15, 0, r0, c1, c0, 0 // Write Control Register
ISB
BX lr
-
+
// ------------------------------------------------------------
// Context ID
@@ -366,7 +366,7 @@ disableHighVecs:
getContextID:
MRC p15, 0, r0, c13, c0, 1 // Read Context ID Register
BX lr
-
+
.global setContextID
.type setContextID,function
@@ -374,7 +374,7 @@ getContextID:
setContextID:
MCR p15, 0, r0, c13, c0, 1 // Write Context ID Register
BX lr
-
+
// ------------------------------------------------------------
// ID registers
@@ -386,7 +386,7 @@ setContextID:
getMIDR:
MRC p15, 0, r0, c0, c0, 0 // Read Main ID Register (MIDR)
BX lr
-
+
.global getMPIDR
.type getMPIDR,function
@@ -394,7 +394,7 @@ getMIDR:
getMPIDR:
MRC p15, 0, r0, c0 ,c0, 5// Read Multiprocessor ID register (MPIDR)
BX lr
-
+
// ------------------------------------------------------------
// CP15 SMP related
@@ -407,7 +407,7 @@ getMPIDR:
getBaseAddr:
MRC p15, 4, r0, c15, c0, 0 // Read peripheral base address
BX lr
-
+
// ------------------------------------------------------------
@@ -419,7 +419,7 @@ getCPUID:
MRC p15, 0, r0, c0, c0, 5 // Read CPU ID register
AND r0, r0, #0x03 // Mask off, leaving the CPU ID field
BX lr
-
+
// ------------------------------------------------------------
@@ -431,7 +431,7 @@ goToSleep:
WFI // Go into standby
B goToSleep // Catch in case of rogue events
BX lr
-
+
// ------------------------------------------------------------
@@ -451,7 +451,7 @@ joinSMP:
ISB
BX lr
-
+
// ------------------------------------------------------------
@@ -469,7 +469,7 @@ leaveSMP:
ISB
BX lr
-
+
// ------------------------------------------------------------
// End of v7.s
diff --git a/ports/cortex_a17/gnu/inc/tx_port.h b/ports/cortex_a17/gnu/inc/tx_port.h
index d80ddec1..f0153046 100644
--- a/ports/cortex_a17/gnu/inc/tx_port.h
+++ b/ports/cortex_a17/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,20 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -320,7 +307,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv7-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv7-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a17/gnu/src/tx_thread_context_restore.S b/ports/cortex_a17/gnu/src/tx_thread_context_restore.S
index 6b4a561d..41b0b0d0 100644
--- a/ports/cortex_a17/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a17/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,23 +80,6 @@ IRQ_MODE = 0x12 // IRQ mode
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_restore
.type _tx_thread_context_restore,function
diff --git a/ports/cortex_a17/gnu/src/tx_thread_context_save.S b/ports/cortex_a17/gnu/src/tx_thread_context_save.S
index eff06283..d2d29d34 100644
--- a/ports/cortex_a17/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a17/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,23 +72,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_save
.type _tx_thread_context_save,function
diff --git a/ports/cortex_a17/gnu/src/tx_thread_fiq_context_restore.S b/ports/cortex_a17/gnu/src/tx_thread_fiq_context_restore.S
index d2fbebe1..921c322c 100644
--- a/ports/cortex_a17/gnu/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_a17/gnu/src/tx_thread_fiq_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,20 +79,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* FIQ ISR Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_restore
.type _tx_thread_fiq_context_restore,function
diff --git a/ports/cortex_a17/gnu/src/tx_thread_fiq_context_save.S b/ports/cortex_a17/gnu/src/tx_thread_fiq_context_save.S
index 88472a3d..2f1a6c40 100644
--- a/ports/cortex_a17/gnu/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_a17/gnu/src/tx_thread_fiq_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_save
.type _tx_thread_fiq_context_save,function
diff --git a/ports/cortex_a17/gnu/src/tx_thread_fiq_nesting_end.S b/ports/cortex_a17/gnu/src/tx_thread_fiq_nesting_end.S
index fa3886b8..a7ce701e 100644
--- a/ports/cortex_a17/gnu/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_a17/gnu/src/tx_thread_fiq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ FIQ_MODE_BITS = 0x11 // FIQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/gnu/src/tx_thread_fiq_nesting_start.S b/ports/cortex_a17/gnu/src/tx_thread_fiq_nesting_start.S
index dbed1cf2..4f095dde 100644
--- a/ports/cortex_a17/gnu/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_a17/gnu/src/tx_thread_fiq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a17/gnu/src/tx_thread_interrupt_control.S
index d1223cb8..a5bc47f7 100644
--- a/ports/cortex_a17/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a17/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,20 +69,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a17/gnu/src/tx_thread_interrupt_disable.S
index a87d1a06..d7b53bc2 100644
--- a/ports/cortex_a17/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a17/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,20 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a17/gnu/src/tx_thread_interrupt_restore.S
index 53ff2813..3c31e94b 100644
--- a/ports/cortex_a17/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a17/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,20 +68,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/gnu/src/tx_thread_irq_nesting_end.S b/ports/cortex_a17/gnu/src/tx_thread_irq_nesting_end.S
index 18aebc7c..cc4db3a7 100644
--- a/ports/cortex_a17/gnu/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_a17/gnu/src/tx_thread_irq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/gnu/src/tx_thread_irq_nesting_start.S b/ports/cortex_a17/gnu/src/tx_thread_irq_nesting_start.S
index a2ffd35d..3635874d 100644
--- a/ports/cortex_a17/gnu/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_a17/gnu/src/tx_thread_irq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/gnu/src/tx_thread_schedule.S b/ports/cortex_a17/gnu/src/tx_thread_schedule.S
index 07dd6f7f..a74e2050 100644
--- a/ports/cortex_a17/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a17/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,6 +40,14 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode
+#ifdef TX_ENABLE_VFP_SUPPORT
+#define IRQ_MASK 0x80
+#endif
+
+#ifdef TX_ENABLE_FIQ_SUPPORT
+#define FIQ_MASK 0x40
+#endif
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
@@ -73,23 +82,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
@@ -259,3 +251,4 @@ no_fiq:
BX lr
#endif
+
diff --git a/ports/cortex_a17/gnu/src/tx_thread_stack_build.S b/ports/cortex_a17/gnu/src/tx_thread_stack_build.S
index 3876225a..827554a7 100644
--- a/ports/cortex_a17/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a17/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,20 +75,6 @@ CPSR_MASK = 0xBF // Mask initial CPSR, T, IRQ int
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/gnu/src/tx_thread_system_return.S b/ports/cortex_a17/gnu/src/tx_thread_system_return.S
index 0eed478d..1a17446b 100644
--- a/ports/cortex_a17/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a17/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,23 +69,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a17/gnu/src/tx_thread_vectored_context_save.S b/ports/cortex_a17/gnu/src/tx_thread_vectored_context_save.S
index fe8a98e8..91653b75 100644
--- a/ports/cortex_a17/gnu/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_a17/gnu/src/tx_thread_vectored_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_vectored_context_save
.type _tx_thread_vectored_context_save,function
diff --git a/ports/cortex_a17/gnu/src/tx_timer_interrupt.S b/ports/cortex_a17/gnu/src/tx_timer_interrupt.S
index cb0c1fa2..179ac894 100644
--- a/ports/cortex_a17/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a17/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,20 +78,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a34/ac6/example_build/sample_threadx/.cproject
index 587034cd..7310f92f 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/.cproject
@@ -1,158 +1,158 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/GICv3.h b/ports/cortex_a34/ac6/example_build/sample_threadx/GICv3.h
index 23bc7fd8..dfe37586 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/GICv3.h
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/GICv3.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef GICV3_h
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/GICv3_gicc.h b/ports/cortex_a34/ac6/example_build/sample_threadx/GICv3_gicc.h
index 8e6f0acc..beaa9157 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/GICv3_gicc.h
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/GICv3_gicc.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef GICV3_gicc_h
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/GICv3_gicd.c b/ports/cortex_a34/ac6/example_build/sample_threadx/GICv3_gicd.c
index 3bfb4a93..2cf1553b 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/GICv3_gicd.c
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/GICv3_gicd.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#include
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/GICv3_gicr.c b/ports/cortex_a34/ac6/example_build/sample_threadx/GICv3_gicr.c
index 7b437b18..912ab2e4 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/GICv3_gicr.c
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/GICv3_gicr.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2014-2019 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#include "GICv3.h"
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a34/ac6/example_build/sample_threadx/MP_Mutexes.S
index e7f95aa7..e8a87f0b 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/MP_Mutexes.S
@@ -4,7 +4,7 @@
//
// Copyright (c) 2012-2019 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
//
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a34/ac6/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/PPM_AEM.h b/ports/cortex_a34/ac6/example_build/sample_threadx/PPM_AEM.h
index 52c9a0fe..f7501eeb 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/PPM_AEM.h
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/PPM_AEM.h
@@ -3,7 +3,7 @@
//
// Copyright (c) 2012-2017 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
//
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a34/ac6/example_build/sample_threadx/sample_threadx.scat
index e5783c7c..d8dfde69 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -2,7 +2,7 @@
; Scatter file for Armv8-A Startup code on FVP Base model
; Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;********************************************************
@@ -25,7 +25,7 @@ LOAD 0x80000000
; in source code for this to work correctly
;
ARM_LIB_HEAP +0 ALIGN 64 EMPTY 0xA0000 {}
-
+
;
; Handler stacks for all CPUs
; All stacks and heap are aligned to a cache-line boundary
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/sp804_timer.c b/ports/cortex_a34/ac6/example_build/sample_threadx/sp804_timer.c
index 4dc009b2..c2ce6faa 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/sp804_timer.c
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/sp804_timer.c
@@ -3,7 +3,7 @@
//
// Copyright (c) 2009-2017 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/sp804_timer.h b/ports/cortex_a34/ac6/example_build/sample_threadx/sp804_timer.h
index 777062cc..4d423904 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/sp804_timer.h
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/sp804_timer.h
@@ -4,7 +4,7 @@
//
// Copyright (c) 2009-2017 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/startup.S b/ports/cortex_a34/ac6/example_build/sample_threadx/startup.S
index de100e56..9f0fc211 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/startup.S
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/startup.S
@@ -7,7 +7,7 @@
//
// Copyright (c) 2014-2019 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
@@ -328,7 +328,7 @@ el1_entry_aarch64:
//
// Cortex-A processors automatically invalidate their caches on reset
// (unless suppressed with the DBGL1RSTDISABLE or L2RSTDISABLE pins).
- // It is therefore not necessary for software to invalidate the caches
+ // It is therefore not necessary for software to invalidate the caches
// on startup, however, this is done here in case of a warm reset.
bl InvalidateUDCaches
tlbi VMALLE1
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/v8_aarch64.S b/ports/cortex_a34/ac6/example_build/sample_threadx/v8_aarch64.S
index f8db3bfe..45445a98 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/v8_aarch64.S
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/v8_aarch64.S
@@ -3,7 +3,7 @@
//
// Copyright (c) 2012-2019 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a34/ac6/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a34/ac6/example_build/sample_threadx/v8_mmu.h
index ee8834fa..d0c51601 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/v8_mmu.h
@@ -3,7 +3,7 @@
//
// Copyright (c) 2012-2019 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
//
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/v8_system.h b/ports/cortex_a34/ac6/example_build/sample_threadx/v8_system.h
index ff96deff..a62d2a33 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/v8_system.h
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/v8_system.h
@@ -3,7 +3,7 @@
//
// Copyright (c) 2012-2016 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
//
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/v8_utils.S b/ports/cortex_a34/ac6/example_build/sample_threadx/v8_utils.S
index f0fcef26..888892a0 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/v8_utils.S
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/v8_utils.S
@@ -3,7 +3,7 @@
//
// Copyright (c) 2013-2017 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
//
diff --git a/ports/cortex_a34/ac6/example_build/sample_threadx/vectors.S b/ports/cortex_a34/ac6/example_build/sample_threadx/vectors.S
index 9e60e001..7784f98e 100644
--- a/ports/cortex_a34/ac6/example_build/sample_threadx/vectors.S
+++ b/ports/cortex_a34/ac6/example_build/sample_threadx/vectors.S
@@ -3,7 +3,7 @@
//
// Copyright (c) 2014-2016 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
diff --git a/ports/cortex_a34/ac6/example_build/tx/.cproject b/ports/cortex_a34/ac6/example_build/tx/.cproject
index 21675fd6..a7e80321 100644
--- a/ports/cortex_a34/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a34/ac6/example_build/tx/.cproject
@@ -1,148 +1,148 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a34/ac6/inc/tx_port.h b/ports/cortex_a34/ac6/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a34/ac6/inc/tx_port.h
+++ b/ports/cortex_a34/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a34/ac6/src/tx_initialize_low_level.S b/ports/cortex_a34/ac6/src/tx_initialize_low_level.S
index da9e9467..55bcfaa8 100644
--- a/ports/cortex_a34/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_a34/ac6/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,12 +56,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_a34/ac6/src/tx_thread_context_restore.S b/ports/cortex_a34/ac6/src/tx_thread_context_restore.S
index e5357e5c..3870de0d 100644
--- a/ports/cortex_a34/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a34/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,12 +56,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a34/ac6/src/tx_thread_context_save.S b/ports/cortex_a34/ac6/src/tx_thread_context_save.S
index d292cce7..8bc7e21b 100644
--- a/ports/cortex_a34/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a34/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,12 +55,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a34/ac6/src/tx_thread_fp_disable.c b/ports/cortex_a34/ac6/src/tx_thread_fp_disable.c
index cccf96c8..c69f6de5 100644
--- a/ports/cortex_a34/ac6/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a34/ac6/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a34/ac6/src/tx_thread_fp_enable.c b/ports/cortex_a34/ac6/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a34/ac6/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a34/ac6/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a34/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a34/ac6/src/tx_thread_interrupt_control.S
index efc10724..d4235180 100644
--- a/ports/cortex_a34/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a34/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,14 +54,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a34/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a34/ac6/src/tx_thread_interrupt_disable.S
index 508562ff..08f0e7e1 100644
--- a/ports/cortex_a34/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a34/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -52,14 +53,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a34/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a34/ac6/src/tx_thread_interrupt_restore.S
index 3572c1a2..69a859da 100644
--- a/ports/cortex_a34/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a34/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,14 +54,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a34/ac6/src/tx_thread_schedule.S b/ports/cortex_a34/ac6/src/tx_thread_schedule.S
index 4612d4b5..4d3763eb 100644
--- a/ports/cortex_a34/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a34/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -225,3 +217,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a34/ac6/src/tx_thread_stack_build.S b/ports/cortex_a34/ac6/src/tx_thread_stack_build.S
index 9cd954f5..d1002b2c 100644
--- a/ports/cortex_a34/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a34/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,14 +56,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a34/ac6/src/tx_thread_system_return.S b/ports/cortex_a34/ac6/src/tx_thread_system_return.S
index 0ec7cdb5..112e1454 100644
--- a/ports/cortex_a34/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a34/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,12 +56,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a34/ac6/src/tx_timer_interrupt.S b/ports/cortex_a34/ac6/src/tx_timer_interrupt.S
index 92bdef3d..ac61450b 100644
--- a/ports/cortex_a34/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a34/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,12 +58,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/.cproject b/ports/cortex_a34/gnu/example_build/sample_threadx/.cproject
index d801e51a..eae50159 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/.cproject
@@ -1,242 +1,242 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3.h b/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3.h
index 23bc7fd8..dfe37586 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3.h
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef GICV3_h
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3_aliases.h b/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3_aliases.h
index 0928d14c..826ba973 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3_aliases.h
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3_aliases.h
@@ -3,7 +3,7 @@
//
// Copyright (c) 2016-2017 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
//
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3_gicc.h b/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3_gicc.h
index 2b8a2d3e..998d92b5 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3_gicc.h
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3_gicc.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef GICV3_gicc_h
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3_gicd.c b/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3_gicd.c
index 2cf9e843..464ecced 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3_gicd.c
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3_gicd.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#include
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3_gicr.c b/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3_gicr.c
index b0d22c40..61addaef 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3_gicr.c
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/GICv3_gicr.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2014-2019 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#include "GICv3.h"
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a34/gnu/example_build/sample_threadx/MP_Mutexes.S
index e7f95aa7..e8a87f0b 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/MP_Mutexes.S
@@ -4,7 +4,7 @@
//
// Copyright (c) 2012-2019 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
//
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a34/gnu/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/PPM_AEM.h b/ports/cortex_a34/gnu/example_build/sample_threadx/PPM_AEM.h
index 52c9a0fe..f7501eeb 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/PPM_AEM.h
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/PPM_AEM.h
@@ -3,7 +3,7 @@
//
// Copyright (c) 2012-2017 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
//
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/sample_threadx.ld b/ports/cortex_a34/gnu/example_build/sample_threadx/sample_threadx.ld
index eec8f12b..3bf47736 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/sample_threadx.ld
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/sample_threadx.ld
@@ -1,7 +1,7 @@
/* Linker script to place sections and symbol values.
* It references following symbols, which must be defined in code:
* start64 : Entry point
- *
+ *
* It defines following symbols, which code can use without definition:
* __cs3_peripherals
* __code_start
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/sp804_timer.c b/ports/cortex_a34/gnu/example_build/sample_threadx/sp804_timer.c
index 4dc009b2..c2ce6faa 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/sp804_timer.c
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/sp804_timer.c
@@ -3,7 +3,7 @@
//
// Copyright (c) 2009-2017 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/sp804_timer.h b/ports/cortex_a34/gnu/example_build/sample_threadx/sp804_timer.h
index 777062cc..4d423904 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/sp804_timer.h
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/sp804_timer.h
@@ -4,7 +4,7 @@
//
// Copyright (c) 2009-2017 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/startup.S b/ports/cortex_a34/gnu/example_build/sample_threadx/startup.S
index 67dd8a6a..b44806fe 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/startup.S
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/startup.S
@@ -7,7 +7,7 @@
//
// Copyright (c) 2014-2019 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
@@ -328,7 +328,7 @@ el1_entry_aarch64:
//
// Cortex-A processors automatically invalidate their caches on reset
// (unless suppressed with the DBGL1RSTDISABLE or L2RSTDISABLE pins).
- // It is therefore not necessary for software to invalidate the caches
+ // It is therefore not necessary for software to invalidate the caches
// on startup, however, this is done here in case of a warm reset.
bl InvalidateUDCaches
tlbi VMALLE1
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/v8_aarch64.S b/ports/cortex_a34/gnu/example_build/sample_threadx/v8_aarch64.S
index f8db3bfe..45445a98 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/v8_aarch64.S
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/v8_aarch64.S
@@ -3,7 +3,7 @@
//
// Copyright (c) 2012-2019 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a34/gnu/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a34/gnu/example_build/sample_threadx/v8_mmu.h
index ee8834fa..d0c51601 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/v8_mmu.h
@@ -3,7 +3,7 @@
//
// Copyright (c) 2012-2019 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
//
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/v8_system.h b/ports/cortex_a34/gnu/example_build/sample_threadx/v8_system.h
index ff96deff..a62d2a33 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/v8_system.h
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/v8_system.h
@@ -3,7 +3,7 @@
//
// Copyright (c) 2012-2016 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
//
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/v8_utils.S b/ports/cortex_a34/gnu/example_build/sample_threadx/v8_utils.S
index f0fcef26..888892a0 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/v8_utils.S
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/v8_utils.S
@@ -3,7 +3,7 @@
//
// Copyright (c) 2013-2017 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
//
diff --git a/ports/cortex_a34/gnu/example_build/sample_threadx/vectors.S b/ports/cortex_a34/gnu/example_build/sample_threadx/vectors.S
index 9e60e001..7784f98e 100644
--- a/ports/cortex_a34/gnu/example_build/sample_threadx/vectors.S
+++ b/ports/cortex_a34/gnu/example_build/sample_threadx/vectors.S
@@ -3,7 +3,7 @@
//
// Copyright (c) 2014-2016 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
diff --git a/ports/cortex_a34/gnu/example_build/tx/.cproject b/ports/cortex_a34/gnu/example_build/tx/.cproject
index e5ff05f4..4d9d34ca 100644
--- a/ports/cortex_a34/gnu/example_build/tx/.cproject
+++ b/ports/cortex_a34/gnu/example_build/tx/.cproject
@@ -1,234 +1,234 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a34/gnu/inc/tx_port.h b/ports/cortex_a34/gnu/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a34/gnu/inc/tx_port.h
+++ b/ports/cortex_a34/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a34/gnu/src/tx_initialize_low_level.S b/ports/cortex_a34/gnu/src/tx_initialize_low_level.S
index 9ee098ab..aa3f04cd 100644
--- a/ports/cortex_a34/gnu/src/tx_initialize_low_level.S
+++ b/ports/cortex_a34/gnu/src/tx_initialize_low_level.S
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Initialize */
/** */
@@ -58,15 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 03-08-2023 Cindy Deng Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
@@ -96,4 +88,4 @@ _tx_initialize_low_level:
/* Done, return to caller. */
RET // Return to caller
-// }
+// }
diff --git a/ports/cortex_a34/gnu/src/tx_thread_context_restore.S b/ports/cortex_a34/gnu/src/tx_thread_context_restore.S
index 0830026d..54ebca65 100644
--- a/ports/cortex_a34/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a34/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,15 +59,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 03-08-2023 Cindy Deng Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a34/gnu/src/tx_thread_context_save.S b/ports/cortex_a34/gnu/src/tx_thread_context_save.S
index 3a533f62..ae416079 100644
--- a/ports/cortex_a34/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a34/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 03-08-2023 Cindy Deng Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a34/gnu/src/tx_thread_fp_disable.c b/ports/cortex_a34/gnu/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a34/gnu/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a34/gnu/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a34/gnu/src/tx_thread_fp_enable.c b/ports/cortex_a34/gnu/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a34/gnu/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a34/gnu/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a34/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a34/gnu/src/tx_thread_interrupt_control.S
index 14cc0cbd..465e7bb1 100644
--- a/ports/cortex_a34/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a34/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,17 +57,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 03-08-2023 Cindy Deng Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a34/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a34/gnu/src/tx_thread_interrupt_disable.S
index f88bc834..f2d30435 100644
--- a/ports/cortex_a34/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a34/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 03-08-2023 Cindy Deng Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a34/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a34/gnu/src/tx_thread_interrupt_restore.S
index 51f3b00f..9f703456 100644
--- a/ports/cortex_a34/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a34/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,17 +57,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 03-08-2023 Cindy Deng Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a34/gnu/src/tx_thread_schedule.S b/ports/cortex_a34/gnu/src/tx_thread_schedule.S
index 8b1bbee2..3d9d215c 100644
--- a/ports/cortex_a34/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a34/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,18 +60,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 03-08-2023 Cindy Deng Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -231,3 +220,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a34/gnu/src/tx_thread_stack_build.S b/ports/cortex_a34/gnu/src/tx_thread_stack_build.S
index c4ffd3f8..116a2a3c 100644
--- a/ports/cortex_a34/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a34/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 03-08-2023 Cindy Deng Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a34/gnu/src/tx_thread_system_return.S b/ports/cortex_a34/gnu/src/tx_thread_system_return.S
index 2fee3c65..0db113d5 100644
--- a/ports/cortex_a34/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a34/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,15 +59,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 03-08-2023 Cindy Deng Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a34/gnu/src/tx_timer_interrupt.S b/ports/cortex_a34/gnu/src/tx_timer_interrupt.S
index 70bf5d3a..2e6c8f8f 100644
--- a/ports/cortex_a34/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a34/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,15 +61,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 03-08-2023 Cindy Deng Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a35/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a35/ac6/example_build/sample_threadx/.cproject
index 42240200..7e53b3fd 100644
--- a/ports/cortex_a35/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a35/ac6/example_build/sample_threadx/.cproject
@@ -1,158 +1,158 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a35/ac6/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a35/ac6/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a35/ac6/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a35/ac6/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a35/ac6/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a35/ac6/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a35/ac6/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a35/ac6/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a35/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a35/ac6/example_build/sample_threadx/sample_threadx.scat
index e5783c7c..d8dfde69 100644
--- a/ports/cortex_a35/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a35/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -2,7 +2,7 @@
; Scatter file for Armv8-A Startup code on FVP Base model
; Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;********************************************************
@@ -25,7 +25,7 @@ LOAD 0x80000000
; in source code for this to work correctly
;
ARM_LIB_HEAP +0 ALIGN 64 EMPTY 0xA0000 {}
-
+
;
; Handler stacks for all CPUs
; All stacks and heap are aligned to a cache-line boundary
diff --git a/ports/cortex_a35/ac6/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a35/ac6/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a35/ac6/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a35/ac6/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a35/ac6/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a35/ac6/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a35/ac6/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a35/ac6/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a35/ac6/example_build/tx/.cproject b/ports/cortex_a35/ac6/example_build/tx/.cproject
index 3be714ea..e0d1dda5 100644
--- a/ports/cortex_a35/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a35/ac6/example_build/tx/.cproject
@@ -1,148 +1,148 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a35/ac6/inc/tx_port.h b/ports/cortex_a35/ac6/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a35/ac6/inc/tx_port.h
+++ b/ports/cortex_a35/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a35/ac6/readme_threadx.txt b/ports/cortex_a35/ac6/readme_threadx.txt
index fafe435c..3abb7d8e 100644
--- a/ports/cortex_a35/ac6/readme_threadx.txt
+++ b/ports/cortex_a35/ac6/readme_threadx.txt
@@ -1,19 +1,19 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A35
+ Microsoft's Azure RTOS ThreadX for Cortex-A35
Using the ARM Compiler 6 & DS
1. Import the ThreadX Projects
-In order to build the ThreadX library and the ThreadX SMP demonstration, first import
-the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
+In order to build the ThreadX library and the ThreadX SMP demonstration, first import
+the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
into your DS workspace.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply select the Eclipse project file
-"tx" and then select the build button. You should now observe the compilation
-and assembly of the ThreadX library. This project build produces the ThreadX
+Building the ThreadX library is easy; simply select the Eclipse project file
+"tx" and then select the build button. You should now observe the compilation
+and assembly of the ThreadX library. This project build produces the ThreadX
library file tx.a.
@@ -32,29 +32,29 @@ the ThreadX SMP demonstration.
4. System Initialization
-The entry point in ThreadX for the Cortex-A35 using AC6 tools is at label
-start64. This is defined within the AC6 compiler's startup code. In addition,
-this is where all static and global pre-set C variable initialization processing
+The entry point in ThreadX for the Cortex-A35 using AC6 tools is at label
+start64. This is defined within the AC6 compiler's startup code. In addition,
+this is where all static and global pre-set C variable initialization processing
takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for determining the
-first available RAM address for use by the application, which is supplied as the
+The ThreadX tx_initialize_low_level.s file is responsible for determining the
+first available RAM address for use by the application, which is supplied as the
sole input parameter to your application definition function, tx_application_define.
5. Register Usage and Stack Frames
-The 64-bit AC6 compiler assumes that registers x0-x18 are scratch registers
-for each function. All other registers used by a C function must be preserved
-by the function. ThreadX takes advantage of this in situations where a context
-switch happens as a result of making a ThreadX service call (which is itself a
-C function). In such cases, the saved context of a thread is only the
+The 64-bit AC6 compiler assumes that registers x0-x18 are scratch registers
+for each function. All other registers used by a C function must be preserved
+by the function. ThreadX takes advantage of this in situations where a context
+switch happens as a result of making a ThreadX service call (which is itself a
+C function). In such cases, the saved context of a thread is only the
non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -73,10 +73,10 @@ FP not enabled and TX_THREAD.tx_thread_fp_enable == 0:
0x040 x22 x21
0x048 x23 x22
0x050 x20 x19
- 0x058 x21 x20
- 0x060 x18 x29
- 0x068 x19 x30
- 0x070 x16
+ 0x058 x21 x20
+ 0x060 x18 x29
+ 0x068 x19 x30
+ 0x070 x16
0x078 x17
0x080 x14
0x088 x15
@@ -95,7 +95,7 @@ FP not enabled and TX_THREAD.tx_thread_fp_enable == 0:
0x0F0 x0
0x0F8 x1
0x100 x29
- 0x108 x30
+ 0x108 x30
FP enabled and TX_THREAD.tx_thread_fp_enable == 1:
@@ -144,19 +144,19 @@ FP enabled and TX_THREAD.tx_thread_fp_enable == 1:
0x1F0 q3
0x200 q0
0x210 q1
- 0x220 x28
- 0x228 reserved
- 0x230 x26
- 0x238 x27
- 0x240 x24
- 0x248 x25
- 0x250 x22
- 0x258 x23
- 0x260 x20
- 0x268 x21
- 0x270 x18
- 0x278 x19
- 0x280 x16
+ 0x220 x28
+ 0x228 reserved
+ 0x230 x26
+ 0x238 x27
+ 0x240 x24
+ 0x248 x25
+ 0x250 x22
+ 0x258 x23
+ 0x260 x20
+ 0x268 x21
+ 0x270 x18
+ 0x278 x19
+ 0x280 x16
0x288 x17
0x290 x14
0x298 x15
@@ -175,20 +175,20 @@ FP enabled and TX_THREAD.tx_thread_fp_enable == 1:
0x300 x0
0x308 x1
0x310 x29
- 0x318 x30
+ 0x318 x30
6. Improving Performance
-The distribution version of ThreadX is built without any compiler optimizations.
-This makes it easy to debug because you can trace or set breakpoints inside of
-ThreadX itself. Of course, this costs some performance. To make it run faster,
+The distribution version of ThreadX is built without any compiler optimizations.
+This makes it easy to debug because you can trace or set breakpoints inside of
+ThreadX itself. Of course, this costs some performance. To make it run faster,
you can change the project settings to the desired compiler optimization level.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
@@ -208,22 +208,22 @@ irq_handler:
B _tx_thread_context_restore
-By default, ThreadX assumes EL3 level of execution. Running and taking exceptions in EL1
+By default, ThreadX assumes EL3 level of execution. Running and taking exceptions in EL1
and EL2 can be done by simply building the ThreadX library with either EL1 or EL2 defined.
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing, thread sleeps,
-timeouts, and application timers. Without such a timer interrupt source, these services
-are not functional. However, all other ThreadX services are operational without a
+ThreadX requires a periodic interrupt source to manage all time-slicing, thread sleeps,
+timeouts, and application timers. Without such a timer interrupt source, these services
+are not functional. However, all other ThreadX services are operational without a
periodic timer source.
9. ARM FP Support
By default, FP support is disabled for each thread. If saving the context of the FP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the FP usage:
void tx_thread_fp_enable(void);
diff --git a/ports/cortex_a35/ac6/src/tx_initialize_low_level.S b/ports/cortex_a35/ac6/src/tx_initialize_low_level.S
index f456574e..7d2a4be3 100644
--- a/ports/cortex_a35/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_a35/ac6/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_a35/ac6/src/tx_thread_context_restore.S b/ports/cortex_a35/ac6/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a35/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a35/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a35/ac6/src/tx_thread_context_save.S b/ports/cortex_a35/ac6/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a35/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a35/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a35/ac6/src/tx_thread_fp_disable.c b/ports/cortex_a35/ac6/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a35/ac6/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a35/ac6/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a35/ac6/src/tx_thread_fp_enable.c b/ports/cortex_a35/ac6/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a35/ac6/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a35/ac6/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a35/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a35/ac6/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a35/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a35/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a35/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a35/ac6/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a35/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a35/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a35/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a35/ac6/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a35/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a35/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a35/ac6/src/tx_thread_schedule.S b/ports/cortex_a35/ac6/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a35/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a35/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a35/ac6/src/tx_thread_stack_build.S b/ports/cortex_a35/ac6/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a35/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a35/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a35/ac6/src/tx_thread_system_return.S b/ports/cortex_a35/ac6/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a35/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a35/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a35/ac6/src/tx_timer_interrupt.S b/ports/cortex_a35/ac6/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a35/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a35/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a35/gnu/example_build/sample_threadx/.cproject b/ports/cortex_a35/gnu/example_build/sample_threadx/.cproject
index 1c32cb32..40d4912d 100644
--- a/ports/cortex_a35/gnu/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a35/gnu/example_build/sample_threadx/.cproject
@@ -1,170 +1,170 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a35/gnu/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a35/gnu/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a35/gnu/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a35/gnu/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a35/gnu/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a35/gnu/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a35/gnu/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a35/gnu/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a35/gnu/example_build/sample_threadx/sample_threadx.ld b/ports/cortex_a35/gnu/example_build/sample_threadx/sample_threadx.ld
index eec8f12b..3bf47736 100644
--- a/ports/cortex_a35/gnu/example_build/sample_threadx/sample_threadx.ld
+++ b/ports/cortex_a35/gnu/example_build/sample_threadx/sample_threadx.ld
@@ -1,7 +1,7 @@
/* Linker script to place sections and symbol values.
* It references following symbols, which must be defined in code:
* start64 : Entry point
- *
+ *
* It defines following symbols, which code can use without definition:
* __cs3_peripherals
* __code_start
diff --git a/ports/cortex_a35/gnu/example_build/sample_threadx/startup.S b/ports/cortex_a35/gnu/example_build/sample_threadx/startup.S
index b71b45f8..b44806fe 100644
--- a/ports/cortex_a35/gnu/example_build/sample_threadx/startup.S
+++ b/ports/cortex_a35/gnu/example_build/sample_threadx/startup.S
@@ -328,7 +328,7 @@ el1_entry_aarch64:
//
// Cortex-A processors automatically invalidate their caches on reset
// (unless suppressed with the DBGL1RSTDISABLE or L2RSTDISABLE pins).
- // It is therefore not necessary for software to invalidate the caches
+ // It is therefore not necessary for software to invalidate the caches
// on startup, however, this is done here in case of a warm reset.
bl InvalidateUDCaches
tlbi VMALLE1
diff --git a/ports/cortex_a35/gnu/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a35/gnu/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a35/gnu/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a35/gnu/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a35/gnu/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a35/gnu/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a35/gnu/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a35/gnu/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a35/gnu/example_build/tx/.cproject b/ports/cortex_a35/gnu/example_build/tx/.cproject
index f1b8ed5b..9e5a975e 100644
--- a/ports/cortex_a35/gnu/example_build/tx/.cproject
+++ b/ports/cortex_a35/gnu/example_build/tx/.cproject
@@ -1,164 +1,164 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a35/gnu/inc/tx_port.h b/ports/cortex_a35/gnu/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a35/gnu/inc/tx_port.h
+++ b/ports/cortex_a35/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a35/gnu/readme_threadx.txt b/ports/cortex_a35/gnu/readme_threadx.txt
index bab64522..17895ee5 100644
--- a/ports/cortex_a35/gnu/readme_threadx.txt
+++ b/ports/cortex_a35/gnu/readme_threadx.txt
@@ -1,19 +1,19 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A35
+ Microsoft's Azure RTOS ThreadX for Cortex-A35
Using the ARM GNU Compiler & DS
1. Import the ThreadX Projects
-In order to build the ThreadX library and the ThreadX SMP demonstration, first import
-the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
+In order to build the ThreadX library and the ThreadX SMP demonstration, first import
+the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
into your DS workspace.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply select the Eclipse project file
-"tx" and then select the build button. You should now observe the compilation
-and assembly of the ThreadX library. This project build produces the ThreadX
+Building the ThreadX library is easy; simply select the Eclipse project file
+"tx" and then select the build button. You should now observe the compilation
+and assembly of the ThreadX library. This project build produces the ThreadX
library file tx.a.
@@ -32,29 +32,29 @@ the ThreadX SMP demonstration.
4. System Initialization
-The entry point in ThreadX for the Cortex-A35 using GCC tools is at label
-"start64". This is defined within the GCC compiler's startup code. In addition,
-this is where all static and global pre-set C variable initialization processing
+The entry point in ThreadX for the Cortex-A35 using GCC tools is at label
+"start64". This is defined within the GCC compiler's startup code. In addition,
+this is where all static and global pre-set C variable initialization processing
takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for determining the
-first available RAM address for use by the application, which is supplied as the
+The ThreadX tx_initialize_low_level.s file is responsible for determining the
+first available RAM address for use by the application, which is supplied as the
sole input parameter to your application definition function, tx_application_define.
5. Register Usage and Stack Frames
-The 64-bit GCC compiler assumes that registers x0-x18 are scratch registers
-for each function. All other registers used by a C function must be preserved
-by the function. ThreadX takes advantage of this in situations where a context
-switch happens as a result of making a ThreadX service call (which is itself a
-C function). In such cases, the saved context of a thread is only the
+The 64-bit GCC compiler assumes that registers x0-x18 are scratch registers
+for each function. All other registers used by a C function must be preserved
+by the function. ThreadX takes advantage of this in situations where a context
+switch happens as a result of making a ThreadX service call (which is itself a
+C function). In such cases, the saved context of a thread is only the
non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -73,10 +73,10 @@ FP not enabled and TX_THREAD.tx_thread_fp_enable == 0:
0x040 x22 x21
0x048 x23 x22
0x050 x20 x19
- 0x058 x21 x20
- 0x060 x18 x29
- 0x068 x19 x30
- 0x070 x16
+ 0x058 x21 x20
+ 0x060 x18 x29
+ 0x068 x19 x30
+ 0x070 x16
0x078 x17
0x080 x14
0x088 x15
@@ -95,7 +95,7 @@ FP not enabled and TX_THREAD.tx_thread_fp_enable == 0:
0x0F0 x0
0x0F8 x1
0x100 x29
- 0x108 x30
+ 0x108 x30
FP enabled and TX_THREAD.tx_thread_fp_enable == 1:
@@ -144,19 +144,19 @@ FP enabled and TX_THREAD.tx_thread_fp_enable == 1:
0x1F0 q3
0x200 q0
0x210 q1
- 0x220 x28
- 0x228 reserved
- 0x230 x26
- 0x238 x27
- 0x240 x24
- 0x248 x25
- 0x250 x22
- 0x258 x23
- 0x260 x20
- 0x268 x21
- 0x270 x18
- 0x278 x19
- 0x280 x16
+ 0x220 x28
+ 0x228 reserved
+ 0x230 x26
+ 0x238 x27
+ 0x240 x24
+ 0x248 x25
+ 0x250 x22
+ 0x258 x23
+ 0x260 x20
+ 0x268 x21
+ 0x270 x18
+ 0x278 x19
+ 0x280 x16
0x288 x17
0x290 x14
0x298 x15
@@ -175,20 +175,20 @@ FP enabled and TX_THREAD.tx_thread_fp_enable == 1:
0x300 x0
0x308 x1
0x310 x29
- 0x318 x30
+ 0x318 x30
6. Improving Performance
-The distribution version of ThreadX is built without any compiler optimizations.
-This makes it easy to debug because you can trace or set breakpoints inside of
-ThreadX itself. Of course, this costs some performance. To make it run faster,
+The distribution version of ThreadX is built without any compiler optimizations.
+This makes it easy to debug because you can trace or set breakpoints inside of
+ThreadX itself. Of course, this costs some performance. To make it run faster,
you can change the project settings to the desired compiler optimization level.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
@@ -208,22 +208,22 @@ irq_handler:
B _tx_thread_context_restore
-By default, ThreadX assumes EL3 level of execution. Running and taking exceptions in EL1
+By default, ThreadX assumes EL3 level of execution. Running and taking exceptions in EL1
and EL2 can be done by simply building the ThreadX library with either EL1 or EL2 defined.
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing, thread sleeps,
-timeouts, and application timers. Without such a timer interrupt source, these services
-are not functional. However, all other ThreadX services are operational without a
+ThreadX requires a periodic interrupt source to manage all time-slicing, thread sleeps,
+timeouts, and application timers. Without such a timer interrupt source, these services
+are not functional. However, all other ThreadX services are operational without a
periodic timer source.
9. ARM FP Support
By default, FP support is disabled for each thread. If saving the context of the FP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the FP usage:
void tx_thread_fp_enable(void);
diff --git a/ports/cortex_a35/gnu/src/tx_initialize_low_level.S b/ports/cortex_a35/gnu/src/tx_initialize_low_level.S
index 3dce3cea..3025f12b 100644
--- a/ports/cortex_a35/gnu/src/tx_initialize_low_level.S
+++ b/ports/cortex_a35/gnu/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
@@ -99,4 +89,4 @@ _tx_initialize_low_level:
/* Done, return to caller. */
RET // Return to caller
-// }
+// }
diff --git a/ports/cortex_a35/gnu/src/tx_thread_context_restore.S b/ports/cortex_a35/gnu/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a35/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a35/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a35/gnu/src/tx_thread_context_save.S b/ports/cortex_a35/gnu/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a35/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a35/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a35/gnu/src/tx_thread_fp_disable.c b/ports/cortex_a35/gnu/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a35/gnu/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a35/gnu/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a35/gnu/src/tx_thread_fp_enable.c b/ports/cortex_a35/gnu/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a35/gnu/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a35/gnu/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a35/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a35/gnu/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a35/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a35/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a35/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a35/gnu/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a35/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a35/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a35/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a35/gnu/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a35/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a35/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a35/gnu/src/tx_thread_schedule.S b/ports/cortex_a35/gnu/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a35/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a35/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a35/gnu/src/tx_thread_stack_build.S b/ports/cortex_a35/gnu/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a35/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a35/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a35/gnu/src/tx_thread_system_return.S b/ports/cortex_a35/gnu/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a35/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a35/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a35/gnu/src/tx_timer_interrupt.S b/ports/cortex_a35/gnu/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a35/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a35/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a5/ac5/example_build/sample_threadx.c b/ports/cortex_a5/ac5/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/cortex_a5/ac5/example_build/sample_threadx.c
+++ b/ports/cortex_a5/ac5/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_a5/ac5/example_build/tx_initialize_low_level.s b/ports/cortex_a5/ac5/example_build/tx_initialize_low_level.s
index af7e965c..5808714c 100644
--- a/ports/cortex_a5/ac5/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_a5/ac5/example_build/tx_initialize_low_level.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -90,45 +90,39 @@ __vectors
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level Cortex-A5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level Cortex-A5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -179,7 +173,7 @@ _tx_initialize_low_level
; _tx_thread_system_stack_ptr = (VOID_PTR) (sp);
;
LDR r1, =_tx_thread_system_stack_ptr ; Pickup address of system stack ptr
- LDR r0, [r1, #0] ; Pickup system stack
+ LDR r0, [r1, #0] ; Pickup system stack
ADD r0, r0, #4 ; Increment to next free word
;
; /* Save the first available memory address. */
@@ -201,7 +195,7 @@ _tx_initialize_low_level
;
;
;/* Define initial heap/stack routine for the ARM RealView (and ADS) startup code. This
-; routine will set the initial stack to use the ThreadX IRQ & FIQ &
+; routine will set the initial stack to use the ThreadX IRQ & FIQ &
; (optionally SYS) stack areas. */
;
EXPORT __user_initial_stackheap
@@ -253,7 +247,7 @@ __tx_reserved_handler
;
;
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -261,21 +255,21 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
BL _tx_timer_interrupt ; Timer interrupt handler
_tx_not_timer_interrupt
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -285,7 +279,7 @@ _tx_not_timer_interrupt
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -301,28 +295,28 @@ _tx_not_timer_interrupt
__tx_example_vectored_irq_handler
;
;
-; /* Save initial context and call context save to prepare for
+; /* Save initial context and call context save to prepare for
; vectored ISR execution. */
;
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
; BL _tx_thread_vectored_context_save ; Vectored context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -331,7 +325,7 @@ __tx_example_vectored_irq_handler
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
@@ -353,11 +347,11 @@ __tx_fiq_processing_return
; /* At this point execution is still in the FIQ mode. The CPSR, point of
; interrupt, and all C scratch registers are available for use. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
; from FIQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with FIQ interrupts enabled.
+; system mode and returns with FIQ interrupts enabled.
;
-; NOTE: It is very important to ensure all FIQ interrupts are cleared
+; NOTE: It is very important to ensure all FIQ interrupts are cleared
; prior to enabling nested FIQ interrupts. */
IF :DEF:TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/cortex_a5/ac5/inc/tx_port.h b/ports/cortex_a5/ac5/inc/tx_port.h
index 9ccd1480..3c046e95 100644
--- a/ports/cortex_a5/ac5/inc/tx_port.h
+++ b/ports/cortex_a5/ac5/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-A5/AC5 */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-A5/AC5 */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -75,7 +67,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -111,12 +103,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -126,8 +118,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -174,7 +166,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -186,13 +178,13 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable;
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -206,11 +198,11 @@ typedef unsigned short USHORT;
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -218,8 +210,8 @@ typedef unsigned short USHORT;
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -246,21 +238,21 @@ typedef unsigned short USHORT;
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef __thumb
-
+
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (ULONG) __clz((unsigned int) m); \
- b = 31 - b;
+ b = 31 - b;
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -280,7 +272,7 @@ typedef unsigned short USHORT;
{ \
__enable_irq(); \
__enable_fiq(); \
- }
+ }
#else
@@ -289,7 +281,7 @@ typedef unsigned short USHORT;
#define TX_RESTORE if (!interrupt_save_disabled) \
{ \
__enable_irq(); \
- }
+ }
#endif
#else
@@ -325,8 +317,8 @@ void tx_thread_vfp_disable(void);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-A5/AC5 Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-A5/AC5 Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a5/ac5/readme_threadx.txt b/ports/cortex_a5/ac5/readme_threadx.txt
index 12962be2..35e50220 100644
--- a/ports/cortex_a5/ac5/readme_threadx.txt
+++ b/ports/cortex_a5/ac5/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A5
+ Microsoft's Azure RTOS ThreadX for Cortex-A5
Thumb & 32-bit Mode
@@ -6,21 +6,21 @@
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the ARM
-AC5 development environment. At this point you may run the build_threadx.bat
-batch file. This will build the ThreadX run-time environment in the
-"example_build" directory.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the ARM
+AC5 development environment. At this point you may run the build_threadx.bat
+batch file. This will build the ThreadX run-time environment in the
+"example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
1.1 Building with Project Files
-The ThreadX library can also be built via project files. Simply open
-the tx.mcp file with project builder and select make. This will place
+The ThreadX library can also be built via project files. Simply open
+the tx.mcp file with project builder and select make. This will place
the tx.a library file into the Debug sub-directory.
@@ -29,45 +29,45 @@ the tx.a library file into the Debug sub-directory.
The ThreadX demonstration is designed to execute under the ARM
Windows-based simulator.
-Building the demonstration is easy; simply execute the build_threadx_demo.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_demo.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.axf
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.axf
is a binary file that can be downloaded and executed on the ARM simulator.
2.0.1 Building with Project Files
-The ThreadX demonstration can also be built via project files. Simply open
-the sample_threadx.mcp file with project builder and select make. This will place
+The ThreadX demonstration can also be built via project files. Simply open
+the sample_threadx.mcp file with project builder and select make. This will place
the sample_threadx.axf output image into the Debug sub-directory.
3. System Initialization
-The entry point in ThreadX for the Cortex-A5 using AC5 tools is at label
-__main. This is defined within the AC5 compiler's startup code. In
-addition, this is where all static and global pre-set C variable
+The entry point in ThreadX for the Cortex-A5 using AC5 tools is at label
+__main. This is defined within the AC5 compiler's startup code. In
+addition, this is where all static and global pre-set C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source. By default, the vector area is defined to be located in the Init area,
-which is defined at the top of tx_initialize_low_level.s. This area is typically
-located at 0. In situations where this is impossible, the vectors at the beginning
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source. By default, the vector area is defined to be located in the Init area,
+which is defined at the top of tx_initialize_low_level.s. This area is typically
+located at 0. In situations where this is impossible, the vectors at the beginning
of the Init area should be copied to address 0.
This is also where initialization of a periodic timer interrupt source
should take place.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
4. Assembler / Compiler Switches
-The following are compiler switches used in building the demonstration
+The following are compiler switches used in building the demonstration
system:
Compiler Switch Meaning
@@ -83,10 +83,10 @@ Linker Switch Meaning
-o demo.axf Specifies demo output file name
--elf Specifies elf output file format
--ro Specifies that Read-Only memory starts at address 0
- --first tx_initialize_low_level.o(Init)
+ --first tx_initialize_low_level.o(Init)
Specifies that the first area loaded is Init
--remove Remove unused areas
- --list Specifies map file name
+ --list Specifies map file name
--symbols Specifies symbols for map file
--map Creates a map file
@@ -97,161 +97,161 @@ Application Defines
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
--PD "TX_ENABLE_IRQ_NESTING SETL {TRUE}" This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s.
--PD "TX_ENABLE_FIQ_NESTING SETL {TRUE}" This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s. In addition,
IRQ nesting should also be enabled.
-DTX_ENABLE_FIQ_SUPPORT This compiler define enables FIQ
interrupt handling in the ThreadX
- generic C source. This define
+ generic C source. This define
should also be used in conjunction
with the corresponding assembler
- define.
+ define.
-DTX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- -DTX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ -DTX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- -DTX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ -DTX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- -DTX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ -DTX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- -DTX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ -DTX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- -DTX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ -DTX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- -DTX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ -DTX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- -DTX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ -DTX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- -DTX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ -DTX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- -DTX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ -DTX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- -DTX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ -DTX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- -DTX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ -DTX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- -DTX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ -DTX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- -DTX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ -DTX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- -DTX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ -DTX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- -DTX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ -DTX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- -DTX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ -DTX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- -DTX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ -DTX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- -DTX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ -DTX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- -DTX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ -DTX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
-DTX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- -DTX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ -DTX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- -DTX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ -DTX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
5. Register Usage and Stack Frames
-The AC5 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The AC5 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -269,39 +269,39 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
-performance. To make it run faster, you can change the build_threadx.bat file to
-remove the -g option and enable all compiler optimizations.
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
+performance. To make it run faster, you can change the build_threadx.bat file to
+remove the -g option and enable all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A5
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A5 vectors start at address zero. The demonstration system startup
-Init area contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+Init area contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -312,12 +312,12 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -325,7 +325,7 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -338,7 +338,7 @@ __tx_irq_processing_return
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.s:
EXPORT __tx_irq_example_handler
@@ -348,12 +348,12 @@ __tx_irq_example_handler
STMDB sp!, {r0-r3} ; Save some scratch registers
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
BL _tx_thread_vectored_context_save ; Call the vectored IRQ context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -370,22 +370,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested IRQ interrupts are no longer required,
calling the _tx_thread_irq_nesting_end service disables nesting by disabling
-IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
+IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -393,10 +393,10 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* Enable nested IRQ interrupts. NOTE: Since this service returns
-; with IRQ interrupts enabled, all IRQ interrupt sources must be
+; with IRQ interrupts enabled, all IRQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-;
+;
; /* Application ISR call(s) go here! */
;
; /* Disable nested IRQ interrupts. The mode is switched back to
@@ -409,12 +409,12 @@ __tx_irq_processing_return
7.3 FIQ Interrupts
-By default, Cortex-A5 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, Cortex-A5 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -423,7 +423,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.s.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.s:
@@ -451,18 +451,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -478,7 +478,7 @@ __tx_fiq_processing_return
; interrupt, and all C scratch registers are available for use. */
;
; /* Enable nested FIQ interrupts. NOTE: Since this service returns
-; with FIQ interrupts enabled, all FIQ interrupt sources must be
+; with FIQ interrupts enabled, all FIQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
;
@@ -494,28 +494,28 @@ __tx_fiq_processing_return
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.s in the Integrator sub-directories.
9. Thumb/Cortex-A5 Mixed Mode
-By default, ThreadX is setup for running in Cortex-A5 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
-ThreadX file and/or the application in Thumb mode. If any Thumb code
-is used the entire ThreadX source- both C and assembly - should be built
+By default, ThreadX is setup for running in Cortex-A5 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
+ThreadX file and/or the application in Thumb mode. If any Thumb code
+is used the entire ThreadX source- both C and assembly - should be built
with the "-apcs /interwork" option.
11. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a5/ac5/src/tx_thread_context_restore.s b/ports/cortex_a5/ac5/src/tx_thread_context_restore.s
index 35652d4f..6c3632e1 100644
--- a/ports/cortex_a5/ac5/src/tx_thread_context_restore.s
+++ b/ports/cortex_a5/ac5/src/tx_thread_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -54,44 +54,38 @@ SVC_MODE EQU 0x93 ; SVC mode
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore Cortex-A5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore Cortex-A5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -121,13 +115,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3, #0] ; Store the counter
+ STR r2, [r3, #0] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
diff --git a/ports/cortex_a5/ac5/src/tx_thread_context_save.s b/ports/cortex_a5/ac5/src/tx_thread_context_save.s
index 20630974..df4e96a8 100644
--- a/ports/cortex_a5/ac5/src/tx_thread_context_save.s
+++ b/ports/cortex_a5/ac5/src/tx_thread_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -39,43 +39,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save Cortex-A5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save Cortex-A5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
@@ -90,7 +84,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
IF :DEF:TX_ENABLE_FIQ_SUPPORT
CPSID if ; Disable FIQ interrupts
ENDIF
@@ -109,7 +103,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -125,7 +119,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -139,13 +133,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -165,7 +159,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -175,7 +169,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -190,7 +184,7 @@ __tx_thread_idle_system_save
ENDIF
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports/cortex_a5/ac5/src/tx_thread_fiq_context_restore.s b/ports/cortex_a5/ac5/src/tx_thread_fiq_context_restore.s
index fd513c2c..fd0cb587 100644
--- a/ports/cortex_a5/ac5/src/tx_thread_fiq_context_restore.s
+++ b/ports/cortex_a5/ac5/src/tx_thread_fiq_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -32,7 +32,7 @@
;
SVC_MODE EQU 0xD3 ; SVC mode
FIQ_MODE EQU 0xD1 ; FIQ mode
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
;
@@ -50,44 +50,38 @@ IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_restore Cortex-A5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_restore Cortex-A5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the fiq interrupt context when processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* FIQ ISR Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the fiq interrupt context when processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* FIQ ISR Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_context_restore(VOID)
@@ -113,13 +107,13 @@ _tx_thread_fiq_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -164,7 +158,7 @@ __tx_thread_fiq_no_preempt_restore
; /* Restore interrupted thread or ISR. */
;
; /* Pickup the saved stack pointer. */
-; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
+; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
;
; /* Recover the saved context and return to the point of interrupt. */
;
@@ -209,7 +203,7 @@ _tx_skip_fiq_vfp_save
MOV r3, #1 ; Build interrupt stack type
STMDB sp!, {r3, r4} ; Save interrupt stack type and SPSR
STR sp, [r0, #8] ; Save stack pointer in thread control
- ; block
+ ; block
;
; /* Save the remaining time-slice and disable it. */
; if (_tx_timer_time_slice)
@@ -221,7 +215,7 @@ _tx_skip_fiq_vfp_save
BEQ __tx_thread_fiq_dont_save_ts ; No, don't save it
;
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-; _tx_timer_time_slice = 0;
+; _tx_timer_time_slice = 0;
;
STR r2, [r0, #24] ; Save thread's time-slice
MOV r2, #0 ; Clear value
diff --git a/ports/cortex_a5/ac5/src/tx_thread_fiq_context_save.s b/ports/cortex_a5/ac5/src/tx_thread_fiq_context_save.s
index e45574f3..21e920ae 100644
--- a/ports/cortex_a5/ac5/src/tx_thread_fiq_context_save.s
+++ b/ports/cortex_a5/ac5/src/tx_thread_fiq_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -39,43 +39,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_save Cortex-A5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_save Cortex-A5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
; VOID _tx_thread_fiq_context_save(VOID)
@@ -90,7 +84,7 @@ _tx_thread_fiq_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -105,7 +99,7 @@ _tx_thread_fiq_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -121,38 +115,38 @@ _tx_thread_fiq_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
__tx_thread_fiq_not_nested_save
-; }
+; }
;
; /* Otherwise, not nested, check to see if a thread was running. */
; else if (_tx_thread_current_ptr)
-; {
+; {
;
ADD r2, r2, #1 ; Increment the interrupt counter
STR r2, [r3] ; Store it back in the variable
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
-; ; scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
+; ; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, lr} ; Store other registers, Note that we don't
-; ; need to save sl and ip since FIQ has
-; ; copies of these registers. Nested
+; ; need to save sl and ip since FIQ has
+; ; copies of these registers. Nested
; ; interrupt processing does need to save
; ; these registers.
;
; /* Save the current stack pointer in the thread's control block. */
-; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
;
; /* Switch to the system stack. */
-; sp = _tx_thread_system_stack_ptr;
+; sp = _tx_thread_system_stack_ptr;
;
MOV r10, #0 ; Clear stack limit
@@ -165,7 +159,7 @@ __tx_thread_fiq_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
; else
@@ -185,18 +179,18 @@ __tx_thread_fiq_idle_system_save
ENDIF
;
; /* Not much to do here, save the current SPSR and LR for possible
-; use in IRQ interrupted in idle system conditions, and return to
+; use in IRQ interrupted in idle system conditions, and return to
; FIQ interrupt processing. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, lr} ; Store other registers that will get used
-; ; or stripped off the stack in context
-; ; restore
- B __tx_fiq_processing_return ; Continue FIQ processing
+; ; or stripped off the stack in context
+; ; restore
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
-;}
+;}
;
END
diff --git a/ports/cortex_a5/ac5/src/tx_thread_fiq_nesting_end.s b/ports/cortex_a5/ac5/src/tx_thread_fiq_nesting_end.s
index d5d9f51a..4e6699a7 100644
--- a/ports/cortex_a5/ac5/src/tx_thread_fiq_nesting_end.s
+++ b/ports/cortex_a5/ac5/src/tx_thread_fiq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
FIQ_MODE_BITS EQU 0x11 ; FIQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_end Cortex-A5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_end Cortex-A5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-;/* processing from system mode back to FIQ mode prior to the ISR */
-;/* calling _tx_thread_fiq_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+;/* processing from system mode back to FIQ mode prior to the ISR */
+;/* calling _tx_thread_fiq_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_fiq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #FIQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/cortex_a5/ac5/src/tx_thread_fiq_nesting_start.s b/ports/cortex_a5/ac5/src/tx_thread_fiq_nesting_start.s
index b12d14da..91a3164f 100644
--- a/ports/cortex_a5/ac5/src/tx_thread_fiq_nesting_start.s
+++ b/ports/cortex_a5/ac5/src/tx_thread_fiq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_start Cortex-A5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_start Cortex-A5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-;/* processing to the system mode so nested FIQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+;/* processing to the system mode so nested FIQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/cortex_a5/ac5/src/tx_thread_interrupt_control.s b/ports/cortex_a5/ac5/src/tx_thread_interrupt_control.s
index c8056c39..ded46918 100644
--- a/ports/cortex_a5/ac5/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_a5/ac5/src/tx_thread_interrupt_control.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,42 +36,36 @@ INT_MASK EQU 0x80 ; Interrupt bit mask
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control Cortex-A5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control Cortex-A5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/cortex_a5/ac5/src/tx_thread_interrupt_disable.s b/ports/cortex_a5/ac5/src/tx_thread_interrupt_disable.s
index 8a59297c..8c922f00 100644
--- a/ports/cortex_a5/ac5/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_a5/ac5/src/tx_thread_interrupt_disable.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -29,41 +29,35 @@
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable Cortex-A5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable Cortex-A5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(void)
@@ -80,7 +74,7 @@ _tx_thread_interrupt_disable
IF :DEF:TX_ENABLE_FIQ_SUPPORT
CPSID if ; Disable IRQ and FIQ
ELSE
- CPSID i ; Disable IRQ
+ CPSID i ; Disable IRQ
ENDIF
IF {INTER} = {TRUE}
diff --git a/ports/cortex_a5/ac5/src/tx_thread_interrupt_restore.s b/ports/cortex_a5/ac5/src/tx_thread_interrupt_restore.s
index aa83ad27..ef515f0e 100644
--- a/ports/cortex_a5/ac5/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_a5/ac5/src/tx_thread_interrupt_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -29,42 +29,36 @@
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore Cortex-A5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore Cortex-A5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function is responsible for restoring interrupts to the state */
;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/cortex_a5/ac5/src/tx_thread_irq_nesting_end.s b/ports/cortex_a5/ac5/src/tx_thread_irq_nesting_end.s
index ae508e4a..be0bb7a5 100644
--- a/ports/cortex_a5/ac5/src/tx_thread_irq_nesting_end.s
+++ b/ports/cortex_a5/ac5/src/tx_thread_irq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end Cortex-A5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end Cortex-A5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_irq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #IRQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/cortex_a5/ac5/src/tx_thread_irq_nesting_start.s b/ports/cortex_a5/ac5/src/tx_thread_irq_nesting_start.s
index c326590b..b2f554a7 100644
--- a/ports/cortex_a5/ac5/src/tx_thread_irq_nesting_start.s
+++ b/ports/cortex_a5/ac5/src/tx_thread_irq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start Cortex-A5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start Cortex-A5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/cortex_a5/ac5/src/tx_thread_schedule.s b/ports/cortex_a5/ac5/src/tx_thread_schedule.s
index 4ff4083c..025a6966 100644
--- a/ports/cortex_a5/ac5/src/tx_thread_schedule.s
+++ b/ports/cortex_a5/ac5/src/tx_thread_schedule.s
@@ -1,18 +1,19 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -40,45 +41,39 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule Cortex-A5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule Cortex-A5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
@@ -107,7 +102,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -120,7 +115,7 @@ __tx_thread_schedule_loop
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
;
- LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
STR r0, [r1, #0] ; Setup current thread pointer
;
; /* Increment the run count for this thread. */
@@ -134,7 +129,7 @@ __tx_thread_schedule_loop
; /* Setup time-slice, if present. */
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
;
- LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
+ LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
; variable
LDR sp, [r0, #8] ; Switch stack pointers
STR r3, [r2, #0] ; Setup time-slice
@@ -233,3 +228,4 @@ __tx_no_thread_to_disable
END
+
diff --git a/ports/cortex_a5/ac5/src/tx_thread_stack_build.s b/ports/cortex_a5/ac5/src/tx_thread_stack_build.s
index b006a943..cfba7634 100644
--- a/ports/cortex_a5/ac5/src/tx_thread_stack_build.s
+++ b/ports/cortex_a5/ac5/src/tx_thread_stack_build.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -41,44 +41,38 @@ THUMB_BIT EQU 0x20 ; Thumb-bit
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build Cortex-A5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build Cortex-A5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function builds a stack frame on the supplied thread's stack. */
;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
;/* thread_ptr Pointer to thread control blk */
;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -86,10 +80,10 @@ THUMB_BIT EQU 0x20 ; Thumb-bit
EXPORT _tx_thread_stack_build
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-A5 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports/cortex_a5/ac5/src/tx_thread_system_return.s b/ports/cortex_a5/ac5/src/tx_thread_system_return.s
index 26925f8a..afca3f69 100644
--- a/ports/cortex_a5/ac5/src/tx_thread_system_return.s
+++ b/ports/cortex_a5/ac5/src/tx_thread_system_return.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -33,50 +33,44 @@
IMPORT _tx_timer_time_slice
IMPORT _tx_thread_schedule
IF :DEF:TX_ENABLE_EXECUTION_CHANGE_NOTIFY
- IMPORT _tx_execution_thread_exit
+ IMPORT _tx_execution_thread_exit
ENDIF
;
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return Cortex-A5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return Cortex-A5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
@@ -104,7 +98,7 @@ _tx_skip_solicited_vfp_save
MOV r0, #0 ; Build a solicited stack type
MRS r1, CPSR ; Pickup the CPSR
STMDB sp!, {r0-r1} ; Save type and CPSR
-;
+;
; /* Lockout interrupts. */
;
IF :DEF:TX_ENABLE_FIQ_SUPPORT
diff --git a/ports/cortex_a5/ac5/src/tx_thread_vectored_context_save.s b/ports/cortex_a5/ac5/src/tx_thread_vectored_context_save.s
index 53b988a0..a902142c 100644
--- a/ports/cortex_a5/ac5/src/tx_thread_vectored_context_save.s
+++ b/ports/cortex_a5/ac5/src/tx_thread_vectored_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -38,43 +38,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save Cortex-A5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save Cortex-A5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_vectored_context_save(VOID)
@@ -135,7 +129,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -171,7 +165,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports/cortex_a5/ac5/src/tx_timer_interrupt.s b/ports/cortex_a5/ac5/src/tx_timer_interrupt.s
index 052b590d..975911e4 100644
--- a/ports/cortex_a5/ac5/src/tx_timer_interrupt.s
+++ b/ports/cortex_a5/ac5/src/tx_timer_interrupt.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Timer */
;/** */
@@ -44,46 +44,40 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt Cortex-A5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt Cortex-A5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -107,7 +101,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -225,13 +219,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports/cortex_a5/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a5/ac6/example_build/sample_threadx/.cproject
index 27463deb..86a4d2d6 100644
--- a/ports/cortex_a5/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a5/ac6/example_build/sample_threadx/.cproject
@@ -1,176 +1,176 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a5/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a5/ac6/example_build/sample_threadx/sample_threadx.scat
index d23881cd..66d0d95a 100644
--- a/ports/cortex_a5/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a5/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -1,7 +1,7 @@
;*******************************************************
; Copyright (c) 2011-2016 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;*******************************************************
diff --git a/ports/cortex_a5/ac6/example_build/sample_threadx/tx_initialize_low_level.S b/ports/cortex_a5/ac6/example_build/sample_threadx/tx_initialize_low_level.S
index 083a57a7..76395459 100644
--- a/ports/cortex_a5/ac6/example_build/sample_threadx/tx_initialize_low_level.S
+++ b/ports/cortex_a5/ac6/example_build/sample_threadx/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -91,14 +92,6 @@ $_tx_initialize_low_level:
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* */
/**************************************************************************/
.global _tx_initialize_low_level
.type _tx_initialize_low_level,function
diff --git a/ports/cortex_a5/ac6/example_build/tx/.cproject b/ports/cortex_a5/ac6/example_build/tx/.cproject
index 22e5a64c..f50b881e 100644
--- a/ports/cortex_a5/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a5/ac6/example_build/tx/.cproject
@@ -1,146 +1,146 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a5/ac6/inc/tx_port.h b/ports/cortex_a5/ac6/inc/tx_port.h
index d80ddec1..f0153046 100644
--- a/ports/cortex_a5/ac6/inc/tx_port.h
+++ b/ports/cortex_a5/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,20 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -320,7 +307,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv7-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv7-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a5/ac6/src/tx_thread_context_restore.S b/ports/cortex_a5/ac6/src/tx_thread_context_restore.S
index 6b4a561d..41b0b0d0 100644
--- a/ports/cortex_a5/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a5/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,23 +80,6 @@ IRQ_MODE = 0x12 // IRQ mode
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_restore
.type _tx_thread_context_restore,function
diff --git a/ports/cortex_a5/ac6/src/tx_thread_context_save.S b/ports/cortex_a5/ac6/src/tx_thread_context_save.S
index eff06283..d2d29d34 100644
--- a/ports/cortex_a5/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a5/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,23 +72,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_save
.type _tx_thread_context_save,function
diff --git a/ports/cortex_a5/ac6/src/tx_thread_fiq_context_restore.S b/ports/cortex_a5/ac6/src/tx_thread_fiq_context_restore.S
index d2fbebe1..921c322c 100644
--- a/ports/cortex_a5/ac6/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_a5/ac6/src/tx_thread_fiq_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,20 +79,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* FIQ ISR Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_restore
.type _tx_thread_fiq_context_restore,function
diff --git a/ports/cortex_a5/ac6/src/tx_thread_fiq_context_save.S b/ports/cortex_a5/ac6/src/tx_thread_fiq_context_save.S
index 88472a3d..2f1a6c40 100644
--- a/ports/cortex_a5/ac6/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_a5/ac6/src/tx_thread_fiq_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_save
.type _tx_thread_fiq_context_save,function
diff --git a/ports/cortex_a5/ac6/src/tx_thread_fiq_nesting_end.S b/ports/cortex_a5/ac6/src/tx_thread_fiq_nesting_end.S
index fa3886b8..a7ce701e 100644
--- a/ports/cortex_a5/ac6/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_a5/ac6/src/tx_thread_fiq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ FIQ_MODE_BITS = 0x11 // FIQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/ac6/src/tx_thread_fiq_nesting_start.S b/ports/cortex_a5/ac6/src/tx_thread_fiq_nesting_start.S
index dbed1cf2..4f095dde 100644
--- a/ports/cortex_a5/ac6/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_a5/ac6/src/tx_thread_fiq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a5/ac6/src/tx_thread_interrupt_control.S
index d1223cb8..a5bc47f7 100644
--- a/ports/cortex_a5/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a5/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,20 +69,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a5/ac6/src/tx_thread_interrupt_disable.S
index a87d1a06..d7b53bc2 100644
--- a/ports/cortex_a5/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a5/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,20 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a5/ac6/src/tx_thread_interrupt_restore.S
index 53ff2813..3c31e94b 100644
--- a/ports/cortex_a5/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a5/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,20 +68,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/ac6/src/tx_thread_irq_nesting_end.S b/ports/cortex_a5/ac6/src/tx_thread_irq_nesting_end.S
index 18aebc7c..cc4db3a7 100644
--- a/ports/cortex_a5/ac6/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_a5/ac6/src/tx_thread_irq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/ac6/src/tx_thread_irq_nesting_start.S b/ports/cortex_a5/ac6/src/tx_thread_irq_nesting_start.S
index a2ffd35d..3635874d 100644
--- a/ports/cortex_a5/ac6/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_a5/ac6/src/tx_thread_irq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/ac6/src/tx_thread_schedule.S b/ports/cortex_a5/ac6/src/tx_thread_schedule.S
index 07dd6f7f..a74e2050 100644
--- a/ports/cortex_a5/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a5/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,6 +40,14 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode
+#ifdef TX_ENABLE_VFP_SUPPORT
+#define IRQ_MASK 0x80
+#endif
+
+#ifdef TX_ENABLE_FIQ_SUPPORT
+#define FIQ_MASK 0x40
+#endif
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
@@ -73,23 +82,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
@@ -259,3 +251,4 @@ no_fiq:
BX lr
#endif
+
diff --git a/ports/cortex_a5/ac6/src/tx_thread_stack_build.S b/ports/cortex_a5/ac6/src/tx_thread_stack_build.S
index 3876225a..827554a7 100644
--- a/ports/cortex_a5/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a5/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,20 +75,6 @@ CPSR_MASK = 0xBF // Mask initial CPSR, T, IRQ int
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/ac6/src/tx_thread_system_return.S b/ports/cortex_a5/ac6/src/tx_thread_system_return.S
index 0eed478d..1a17446b 100644
--- a/ports/cortex_a5/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a5/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,23 +69,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/ac6/src/tx_thread_vectored_context_save.S b/ports/cortex_a5/ac6/src/tx_thread_vectored_context_save.S
index fe8a98e8..91653b75 100644
--- a/ports/cortex_a5/ac6/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_a5/ac6/src/tx_thread_vectored_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_vectored_context_save
.type _tx_thread_vectored_context_save,function
diff --git a/ports/cortex_a5/ac6/src/tx_timer_interrupt.S b/ports/cortex_a5/ac6/src/tx_timer_interrupt.S
index cb0c1fa2..179ac894 100644
--- a/ports/cortex_a5/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a5/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,20 +78,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/ghs/example_build/tx_initialize_low_level.arm b/ports/cortex_a5/ghs/example_build/tx_initialize_low_level.arm
index 1c7b035e..fe924b61 100644
--- a/ports/cortex_a5/ghs/example_build/tx_initialize_low_level.arm
+++ b/ports/cortex_a5/ghs/example_build/tx_initialize_low_level.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/ghs/inc/tx_el.h b/ports/cortex_a5/ghs/inc/tx_el.h
index b8926921..72e5bbe3 100644
--- a/ports/cortex_a5/ghs/inc/tx_el.h
+++ b/ports/cortex_a5/ghs/inc/tx_el.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,12 +37,6 @@
/* EventAnalyzer. It is assumed that tx_api.h and tx_port.h have */
/* already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_EL_H
diff --git a/ports/cortex_a5/ghs/inc/tx_port.h b/ports/cortex_a5/ghs/inc/tx_port.h
index 0ea0eaaf..e9e0b876 100644
--- a/ports/cortex_a5/ghs/inc/tx_port.h
+++ b/ports/cortex_a5/ghs/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -394,7 +386,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-A5/Green Hills Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-A5/Green Hills Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a5/ghs/readme_threadx.txt b/ports/cortex_a5/ghs/readme_threadx.txt
index 28e59b78..154ffc25 100644
--- a/ports/cortex_a5/ghs/readme_threadx.txt
+++ b/ports/cortex_a5/ghs/readme_threadx.txt
@@ -1,19 +1,19 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A5
+ Microsoft's Azure RTOS ThreadX for Cortex-A5
Using the Green Hills Software Tools
1. Open the ThreadX Project Workspace
-In order to build the ThreadX library and the ThreadX demonstration first load
-the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
-"example_build" directory.
+In order to build the ThreadX library and the ThreadX demonstration first load
+the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
+"example_build" directory.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply select the MULTI project file
-tx.gpj and then select the build button. You should now observe the
-compilation and assembly of the ThreadX library. This project build produces
+Building the ThreadX library is easy; simply select the MULTI project file
+tx.gpj and then select the build button. You should now observe the
+compilation and assembly of the ThreadX library. This project build produces
the ThreadX library file tx.a.
@@ -21,55 +21,55 @@ the ThreadX library file tx.a.
The ThreadX demonstration is designed to execute under the MULTI environment
on the Green Hills Cortex-A5 simulator. The instructions that follow describe
-how to get the ThreadX evaluation running under the MULTI Cortex-A5 simulation
+how to get the ThreadX evaluation running under the MULTI Cortex-A5 simulation
environment.
-Building the demonstration is easy; simply select the MULTI project file
-sample_threadx.gpj. At this point, select the "Project Build" button and observe
-the compilation, assembly, and linkage of the ThreadX demonstration application.
+Building the demonstration is easy; simply select the MULTI project file
+sample_threadx.gpj. At this point, select the "Project Build" button and observe
+the compilation, assembly, and linkage of the ThreadX demonstration application.
-After the demonstration is built, invoke the MULTI ARM simulator by selecting
-the simulator connection from within the sample_threadx.con connection file.
-Once connected to the simulator, select the "Debug" button. You should now
-observe the main function of sample_threadx.c.
+After the demonstration is built, invoke the MULTI ARM simulator by selecting
+the simulator connection from within the sample_threadx.con connection file.
+Once connected to the simulator, select the "Debug" button. You should now
+observe the main function of sample_threadx.c.
At this point, you should setup a simulated timer interrupt for ThreadX
by entering "timer 9999 irq" in the "target" window of the debugger.
-You are now ready to execute the ThreadX demonstration system. Select
-breakpoints and data watches to observe the execution of the sample_threadx.c
+You are now ready to execute the ThreadX demonstration system. Select
+breakpoints and data watches to observe the execution of the sample_threadx.c
application.
4. EventAnalyzer Demonstration
-To build a demonstration system that also logs events for the MULTI EventAnalyzer,
-perform the same steps as the regular demo, except build the ThreadX library with
-txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
-The resulting image will log all system events, which can then be displayed by the
+To build a demonstration system that also logs events for the MULTI EventAnalyzer,
+perform the same steps as the regular demo, except build the ThreadX library with
+txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
+The resulting image will log all system events, which can then be displayed by the
MULTI EventAnalyzer.
5. System Initialization
-The system entry point using the Green Hills tools is at the label _start.
-This is defined within the crt0.arm file supplied by Green Hills. In addition,
-this is where all static and global preset C variable initialization
+The system entry point using the Green Hills tools is at the label _start.
+This is defined within the crt0.arm file supplied by Green Hills. In addition,
+this is where all static and global preset C variable initialization
processing is called from.
After the Green Hills startup function returns, ThreadX initialization is
called. The main initialization function is _tx_initialize_low_level and
-is located in the file tx_initialize_low_level.arm. This function is responsible
-for setting up various system data structures, interrupt vectors, and the
+is located in the file tx_initialize_low_level.arm. This function is responsible
+for setting up various system data structures, interrupt vectors, and the
periodic timer interrupt source of ThreadX.
-In addition, _tx_initialize_low_level determines where the first available
+In addition, _tx_initialize_low_level determines where the first available
RAM memory address is located. This address is supplied to tx_application_define.
-By default, the first available RAM memory address is assumed to start at the
-beginning of the ThreadX section .free_mem. If changes are made to the
-sample_threadx.ld file, the .free_mem section should remain the last allocated
-section in the main RAM area. The starting address of this section is passed
+By default, the first available RAM memory address is assumed to start at the
+beginning of the ThreadX section .free_mem. If changes are made to the
+sample_threadx.ld file, the .free_mem section should remain the last allocated
+section in the main RAM area. The starting address of this section is passed
to tx_application_define.
@@ -87,27 +87,27 @@ The following defines and their associated action are as follows:
TX_ENABLE_FIQ_NESTING If defined, this brings in special FIQ
interrupt nesting logic into the ThreadX
library. This define should be applied
- to the entire ThreadX library and the
+ to the entire ThreadX library and the
define TX_ENABLE_FIQ_SUPPORT should also
be defined.
TX_ENABLE_FIQ_SUPPORT If defined, this brings in FIQ context
save and restore logic necessary for
applications to call ThreadX services from
- FIQ interrupt handlers. This define
- should be applied to the entire ThreadX
+ FIQ interrupt handlers. This define
+ should be applied to the entire ThreadX
library.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 4 in the "ThreadX User Guide"
+ Chapter 4 in the "ThreadX User Guide"
for more details.
TX_ENABLE_EVENT_LOGGING This define enables event logging for any
or all of the ThreadX source code. If this
- option is used anywhere, the tx_initialize_high_level.c
+ option is used anywhere, the tx_initialize_high_level.c
file must be compiled with it as well, since this
is where the event log is initialized.
@@ -119,121 +119,121 @@ The following defines and their associated action are as follows:
If this is enabled, run-time filtering logic
is added to the event logging code.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
7. Register Usage and Stack Frames
-The Green Hills compiler assumes that registers r0-r3 (a1-a4) and r12 (ip)
-are scratch registers for each function. All other registers used by a C
-function must be preserved by the function. ThreadX takes advantage of this
-in situations where a context switch happens as a result of making a ThreadX
-service call (which is itself a C function). In such cases, the saved
+The Green Hills compiler assumes that registers r0-r3 (a1-a4) and r12 (ip)
+are scratch registers for each function. All other registers used by a C
+function must be preserved by the function. ThreadX takes advantage of this
+in situations where a context switch happens as a result of making a ThreadX
+service call (which is itself a C function). In such cases, the saved
context of a thread is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -251,40 +251,40 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
8. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make ThreadX run faster, you can change the tx.gpj project
-to disable debug information and enable the desired optimizations.
+to disable debug information and enable the desired optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined before tx_api.h is included.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined before tx_api.h is included.
9. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A5
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
9.1 Vector Area
The Cortex-A5 vectors start at address zero. The demonstration system reset.arm
-file contains the reset section (which contains all the ARM vectors) and is
+file contains the reset section (which contains all the ARM vectors) and is
typically loaded at address zero. On actual hardware platforms, this section
-might have to be copied to address 0.
+might have to be copied to address 0.
9.2 IRQ ISRs
@@ -294,13 +294,13 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
9.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.arm:
.globl __tx_irq_handler
- .globl __tx_irq_processing_return
+ .globl __tx_irq_processing_return
__tx_irq_handler:
/* Jump to context save to save system context. */
@@ -308,7 +308,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
/* At this point execution is still in the IRQ mode. The CPSR, point of
- interrupt, and all C scratch registers are available for use. Note
+ interrupt, and all C scratch registers are available for use. Note
that IRQ interrupts are still disabled upon return from the context
save function. */
@@ -321,7 +321,7 @@ __tx_irq_processing_return:
9.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.arm:
.globl __tx_irq_example_handler
@@ -331,12 +331,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} # Save some scratch registers
MRS r0, SPSR # Pickup saved SPSR
- SUB lr, lr, #4 # Adjust point of interrupt
+ SUB lr, lr, #4 # Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} # Store other scratch registers
BL _tx_thread_vectored_context_save # Call the vectored IRQ context save
/* At this point execution is still in the IRQ mode. The CPSR, point of
- interrupt, and all C scratch registers are available for use. Note
+ interrupt, and all C scratch registers are available for use. Note
that IRQ interrupts are still disabled upon return from the context
save function. */
@@ -353,22 +353,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.arm. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables nesting
-by disabling IRQ interrupts and switching back to IRQ mode in preparation for
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.arm. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables nesting
+by disabling IRQ interrupts and switching back to IRQ mode in preparation for
the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in the
+The following is an example of enabling IRQ nested interrupts in the
typical IRQ handler:
.globl __tx_irq_handler
- .globl __tx_irq_processing_return
+ .globl __tx_irq_processing_return
__tx_irq_handler:
/* Jump to context save to save system context. */
@@ -376,10 +376,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
/* Enable nested IRQ interrupts. NOTE: Since this service returns
- with IRQ interrupts enabled, all IRQ interrupt sources must be
+ with IRQ interrupts enabled, all IRQ interrupt sources must be
cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-
+
/* Application ISR call(s) go here! */
/* Disable nested IRQ interrupts. The mode is switched back to
@@ -392,9 +392,9 @@ __tx_irq_processing_return:
9.3 FIQ Interrupts
-By default, Cortex-A5 FIQ interrupts are left completely enabled by ThreadX.
-Of course, this means that the application is fully responsible for
-saving/restoring any registers used in the FIQ ISR processing. In addition,
+By default, Cortex-A5 FIQ interrupts are left completely enabled by ThreadX.
+Of course, this means that the application is fully responsible for
+saving/restoring any registers used in the FIQ ISR processing. In addition,
no ThreadX service calls are allowed from the default FIQ ISRs. The default
FIQ interrupt shell is located in tx_initialize_low_level.arm.
@@ -403,7 +403,7 @@ FIQ interrupt shell is located in tx_initialize_low_level.arm.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.arm:
@@ -431,18 +431,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.arm. When nested FIQ interrupts are no longer
-required, calling the _tx_thread_fiq_nesting_end service disables nesting by
-disabling FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.arm. When nested FIQ interrupts are no longer
+required, calling the _tx_thread_fiq_nesting_end service disables nesting by
+disabling FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -458,7 +458,7 @@ __tx_fiq_processing_return:
interrupt, and all C scratch registers are available for use. */
/* Enable nested FIQ interrupts. NOTE: Since this service returns
- with FIQ interrupts enabled, all FIQ interrupt sources must be
+ with FIQ interrupts enabled, all FIQ interrupt sources must be
cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@@ -475,29 +475,29 @@ __tx_fiq_processing_return:
10. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.arm.
11. Thumb/Cortex-A5 Mixed Mode
-By default, ThreadX is setup for running in Cortex-A5 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
+By default, ThreadX is setup for running in Cortex-A5 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
ThreadX file and/or the application in Thumb mode. The only exception
-to this is the file tx_thread_shell_entry.c. This file must always be
+to this is the file tx_thread_shell_entry.c. This file must always be
built in 32-bit mode.
12. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
@@ -520,7 +520,7 @@ information associated with this specific port of ThreadX:
04-02-2021 Release 6.1.6 changes:
tx_port.h Updated macro definition
-05/19/2020 Initial ThreadX version of Cortex-A5/Green Hills port.
+05/19/2020 Initial ThreadX version of Cortex-A5/Green Hills port.
Copyright(c) 1996-2020 Microsoft Corporation
diff --git a/ports/cortex_a5/ghs/src/tx_el.c b/ports/cortex_a5/ghs/src/tx_el.c
index 365622cd..b5d3b8b7 100644
--- a/ports/cortex_a5/ghs/src/tx_el.c
+++ b/ports/cortex_a5/ghs/src/tx_el.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -82,12 +83,6 @@ UINT _tx_thread_interrupt_control(UINT new_posture);
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_el_initialize(VOID)
{
diff --git a/ports/cortex_a5/ghs/src/tx_thread_context_restore.arm b/ports/cortex_a5/ghs/src/tx_thread_context_restore.arm
index 52c099c6..4cd43b30 100644
--- a/ports/cortex_a5/ghs/src/tx_thread_context_restore.arm
+++ b/ports/cortex_a5/ghs/src/tx_thread_context_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/ghs/src/tx_thread_context_save.arm b/ports/cortex_a5/ghs/src/tx_thread_context_save.arm
index 48bc08e2..813984e1 100644
--- a/ports/cortex_a5/ghs/src/tx_thread_context_save.arm
+++ b/ports/cortex_a5/ghs/src/tx_thread_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/ghs/src/tx_thread_fiq_context_restore.arm b/ports/cortex_a5/ghs/src/tx_thread_fiq_context_restore.arm
index 836990e9..e0ea4280 100644
--- a/ports/cortex_a5/ghs/src/tx_thread_fiq_context_restore.arm
+++ b/ports/cortex_a5/ghs/src/tx_thread_fiq_context_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/ghs/src/tx_thread_fiq_context_save.arm b/ports/cortex_a5/ghs/src/tx_thread_fiq_context_save.arm
index 39ac2d37..5d43d442 100644
--- a/ports/cortex_a5/ghs/src/tx_thread_fiq_context_save.arm
+++ b/ports/cortex_a5/ghs/src/tx_thread_fiq_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/ghs/src/tx_thread_fiq_nesting_end.arm b/ports/cortex_a5/ghs/src/tx_thread_fiq_nesting_end.arm
index 5ddfe98c..28a329dd 100644
--- a/ports/cortex_a5/ghs/src/tx_thread_fiq_nesting_end.arm
+++ b/ports/cortex_a5/ghs/src/tx_thread_fiq_nesting_end.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/ghs/src/tx_thread_fiq_nesting_start.arm b/ports/cortex_a5/ghs/src/tx_thread_fiq_nesting_start.arm
index 6787d19a..936dfad6 100644
--- a/ports/cortex_a5/ghs/src/tx_thread_fiq_nesting_start.arm
+++ b/ports/cortex_a5/ghs/src/tx_thread_fiq_nesting_start.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/ghs/src/tx_thread_interrupt_control.arm b/ports/cortex_a5/ghs/src/tx_thread_interrupt_control.arm
index 9b3c9b19..65810603 100644
--- a/ports/cortex_a5/ghs/src/tx_thread_interrupt_control.arm
+++ b/ports/cortex_a5/ghs/src/tx_thread_interrupt_control.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/ghs/src/tx_thread_interrupt_disable.arm b/ports/cortex_a5/ghs/src/tx_thread_interrupt_disable.arm
index 2bb6d1dc..5e1f9b95 100644
--- a/ports/cortex_a5/ghs/src/tx_thread_interrupt_disable.arm
+++ b/ports/cortex_a5/ghs/src/tx_thread_interrupt_disable.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/ghs/src/tx_thread_interrupt_restore.arm b/ports/cortex_a5/ghs/src/tx_thread_interrupt_restore.arm
index 1185de93..135add2d 100644
--- a/ports/cortex_a5/ghs/src/tx_thread_interrupt_restore.arm
+++ b/ports/cortex_a5/ghs/src/tx_thread_interrupt_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/ghs/src/tx_thread_irq_nesting_end.arm b/ports/cortex_a5/ghs/src/tx_thread_irq_nesting_end.arm
index 09c29276..6796d6e5 100644
--- a/ports/cortex_a5/ghs/src/tx_thread_irq_nesting_end.arm
+++ b/ports/cortex_a5/ghs/src/tx_thread_irq_nesting_end.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/ghs/src/tx_thread_irq_nesting_start.arm b/ports/cortex_a5/ghs/src/tx_thread_irq_nesting_start.arm
index d9e69e25..e75175e8 100644
--- a/ports/cortex_a5/ghs/src/tx_thread_irq_nesting_start.arm
+++ b/ports/cortex_a5/ghs/src/tx_thread_irq_nesting_start.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/ghs/src/tx_thread_schedule.arm b/ports/cortex_a5/ghs/src/tx_thread_schedule.arm
index 69ac7933..128491d0 100644
--- a/ports/cortex_a5/ghs/src/tx_thread_schedule.arm
+++ b/ports/cortex_a5/ghs/src/tx_thread_schedule.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/ghs/src/tx_thread_stack_build.arm b/ports/cortex_a5/ghs/src/tx_thread_stack_build.arm
index 19dd2b47..c3681c87 100644
--- a/ports/cortex_a5/ghs/src/tx_thread_stack_build.arm
+++ b/ports/cortex_a5/ghs/src/tx_thread_stack_build.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/ghs/src/tx_thread_system_return.arm b/ports/cortex_a5/ghs/src/tx_thread_system_return.arm
index 4d7cc93d..4e7a0f60 100644
--- a/ports/cortex_a5/ghs/src/tx_thread_system_return.arm
+++ b/ports/cortex_a5/ghs/src/tx_thread_system_return.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/ghs/src/tx_thread_vectored_context_save.arm b/ports/cortex_a5/ghs/src/tx_thread_vectored_context_save.arm
index 7056e441..f3d2ef20 100644
--- a/ports/cortex_a5/ghs/src/tx_thread_vectored_context_save.arm
+++ b/ports/cortex_a5/ghs/src/tx_thread_vectored_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/ghs/src/tx_timer_interrupt.arm b/ports/cortex_a5/ghs/src/tx_timer_interrupt.arm
index c85530c8..7592019f 100644
--- a/ports/cortex_a5/ghs/src/tx_timer_interrupt.arm
+++ b/ports/cortex_a5/ghs/src/tx_timer_interrupt.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/gnu/example_build/MP_GIC.S b/ports/cortex_a5/gnu/example_build/MP_GIC.S
index 2ff179fb..a3274f21 100644
--- a/ports/cortex_a5/gnu/example_build/MP_GIC.S
+++ b/ports/cortex_a5/gnu/example_build/MP_GIC.S
@@ -3,7 +3,7 @@
//
// Copyright (c) 2011-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
diff --git a/ports/cortex_a5/gnu/example_build/MP_GIC.h b/ports/cortex_a5/gnu/example_build/MP_GIC.h
index 1d047611..42a96c3d 100644
--- a/ports/cortex_a5/gnu/example_build/MP_GIC.h
+++ b/ports/cortex_a5/gnu/example_build/MP_GIC.h
@@ -4,7 +4,7 @@
//
// Copyright (c) 2011-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
diff --git a/ports/cortex_a5/gnu/example_build/MP_PrivateTimer.S b/ports/cortex_a5/gnu/example_build/MP_PrivateTimer.S
index 2077d917..58e5afd4 100644
--- a/ports/cortex_a5/gnu/example_build/MP_PrivateTimer.S
+++ b/ports/cortex_a5/gnu/example_build/MP_PrivateTimer.S
@@ -93,7 +93,7 @@ get_private_timer_count:
LDR r0, [r0, #0x604] // Read count register
BX lr
-
+
// ------------------------------------------------------------
// void clear_private_timer_irq(void)
diff --git a/ports/cortex_a5/gnu/example_build/reset.S b/ports/cortex_a5/gnu/example_build/reset.S
index 3ce9efb7..f2e0522b 100644
--- a/ports/cortex_a5/gnu/example_build/reset.S
+++ b/ports/cortex_a5/gnu/example_build/reset.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a5/gnu/example_build/sample_threadx.ld b/ports/cortex_a5/gnu/example_build/sample_threadx.ld
index cb42c11c..d43e28f1 100644
--- a/ports/cortex_a5/gnu/example_build/sample_threadx.ld
+++ b/ports/cortex_a5/gnu/example_build/sample_threadx.ld
@@ -7,7 +7,7 @@ OUTPUT_ARCH(arm)
SECTIONS
{
. = 0x00000000;
-
+
.vectors : {reset.o(.text) }
/* Read-only sections, merged into text segment: */
@@ -94,8 +94,8 @@ SECTIONS
*(.gnu.linkonce.t*)
*(.glue_7t) *(.glue_7)
} =0
- .init :
- {
+ .init :
+ {
KEEP (*(.init))
} =0
_etext = .;
@@ -120,7 +120,7 @@ SECTIONS
.data1 : { *(.data1) }
.eh_frame : { KEEP (*(.eh_frame)) }
.gcc_except_table : { *(.gcc_except_table) }
- .ctors :
+ .ctors :
{
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
@@ -153,9 +153,9 @@ SECTIONS
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata :
+ .sdata :
{
- *(.sdata)
+ *(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
}
@@ -191,7 +191,7 @@ SECTIONS
_stack_bottom = ABSOLUTE(.) ;
- /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
+ /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
SYS stack if nested interrupts are enabled. */
. = ALIGN(8) ;
. += 4096 ;
diff --git a/ports/cortex_a5/gnu/example_build/tx_initialize_low_level.S b/ports/cortex_a5/gnu/example_build/tx_initialize_low_level.S
index ed2149dc..ad84429f 100644
--- a/ports/cortex_a5/gnu/example_build/tx_initialize_low_level.S
+++ b/ports/cortex_a5/gnu/example_build/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -100,17 +101,6 @@ $_tx_initialize_low_level:
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_initialize_low_level
.type _tx_initialize_low_level,function
@@ -183,7 +173,7 @@ _stack_error_loop:
MOV r0, #0x1F
BL setPriorityMask // Set priority mask (local)
- // [EL] Change start - don't enable interrupts here!
+ // [EL] Change start - don't enable interrupts here!
//CPSIE i // Clear CPSR I bit
// [EL] Change end
@@ -246,7 +236,7 @@ __tx_irq_processing_return:
if nested IRQ interrupts are desired. Interrupts may be re-enabled over
small code sequences where lr is saved before enabling interrupts and
restored after interrupts are again disabled. */
-
+
PUSH {r4, r5} // Save some preserved registers (r5 is saved just for 8-byte alignment)
BL readIntAck
MOV r4, r0
diff --git a/ports/cortex_a5/gnu/example_build/v7.h b/ports/cortex_a5/gnu/example_build/v7.h
index 5a08b43f..1133b0ac 100644
--- a/ports/cortex_a5/gnu/example_build/v7.h
+++ b/ports/cortex_a5/gnu/example_build/v7.h
@@ -4,7 +4,7 @@
//
// Copyright (c) 2011-2016 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
@@ -37,7 +37,6 @@ void disableInterrupts(void);
void invalidateCaches_IS(void);
void cleanInvalidateDCache(void);
-void invalidateCaches_IS(void);
void enableCaches(void);
void disableCaches(void);
void invalidateCaches(void);
diff --git a/ports/cortex_a5/gnu/example_build/v7.s b/ports/cortex_a5/gnu/example_build/v7.s
index 82c9ab1e..9487ddde 100644
--- a/ports/cortex_a5/gnu/example_build/v7.s
+++ b/ports/cortex_a5/gnu/example_build/v7.s
@@ -3,7 +3,7 @@
//
// Copyright (c) 2011-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
@@ -20,7 +20,7 @@
enableInterrupts:
CPSIE i
BX lr
-
+
.global disableInterrupts
.type disableInterrupts,function
@@ -28,7 +28,7 @@ enableInterrupts:
disableInterrupts:
CPSID i
BX lr
-
+
// ------------------------------------------------------------
// Cache Maintenance
@@ -44,7 +44,7 @@ enableCaches:
MCR p15, 0, r0, c1, c0, 0 // Write System Control Register
ISB
BX lr
-
+
.global disableCaches
@@ -57,7 +57,7 @@ disableCaches:
MCR p15, 0, r0, c1, c0, 0 // Write System Control Register
ISB
BX lr
-
+
.global cleanDCache
@@ -114,7 +114,7 @@ clean_dcache_finished:
POP {r4-r12}
BX lr
-
+
.global cleanInvalidateDCache
.type cleanInvalidateDCache,function
@@ -170,7 +170,7 @@ clean_invalidate_dcache_finished:
POP {r4-r12}
BX lr
-
+
.global invalidateCaches
@@ -229,7 +229,7 @@ invalidate_caches_skip:
invalidate_caches_finished:
POP {r4-r12}
BX lr
-
+
.global invalidateCaches_IS
@@ -284,7 +284,7 @@ invalidate_caches_is_skip:
invalidate_caches_is_finished:
POP {r4-r12}
BX lr
-
+
// ------------------------------------------------------------
// TLB
@@ -297,7 +297,7 @@ invalidateUnifiedTLB:
MOV r0, #0
MCR p15, 0, r0, c8, c7, 0 // TLBIALL - Invalidate entire unified TLB
BX lr
-
+
.global invalidateUnifiedTLB_IS
.type invalidateUnifiedTLB_IS,function
@@ -306,7 +306,7 @@ invalidateUnifiedTLB_IS:
MOV r0, #1
MCR p15, 0, r0, c8, c3, 0 // TLBIALLIS - Invalidate entire unified TLB Inner Shareable
BX lr
-
+
// ------------------------------------------------------------
// Branch Prediction
@@ -319,7 +319,7 @@ flushBranchTargetCache:
MOV r0, #0
MCR p15, 0, r0, c7, c5, 6 // BPIALL - Invalidate entire branch predictor array
BX lr
-
+
.global flushBranchTargetCache_IS
.type flushBranchTargetCache_IS,function
@@ -328,7 +328,7 @@ flushBranchTargetCache_IS:
MOV r0, #0
MCR p15, 0, r0, c7, c1, 6 // BPIALLIS - Invalidate entire branch predictor array Inner Shareable
BX lr
-
+
// ------------------------------------------------------------
// High Vecs
@@ -343,7 +343,7 @@ enableHighVecs:
MCR p15, 0, r0, c1, c0, 0 // Write Control Register
ISB
BX lr
-
+
.global disableHighVecs
.type disableHighVecs,function
@@ -354,7 +354,7 @@ disableHighVecs:
MCR p15, 0, r0, c1, c0, 0 // Write Control Register
ISB
BX lr
-
+
// ------------------------------------------------------------
// Context ID
@@ -366,7 +366,7 @@ disableHighVecs:
getContextID:
MRC p15, 0, r0, c13, c0, 1 // Read Context ID Register
BX lr
-
+
.global setContextID
.type setContextID,function
@@ -374,7 +374,7 @@ getContextID:
setContextID:
MCR p15, 0, r0, c13, c0, 1 // Write Context ID Register
BX lr
-
+
// ------------------------------------------------------------
// ID registers
@@ -386,7 +386,7 @@ setContextID:
getMIDR:
MRC p15, 0, r0, c0, c0, 0 // Read Main ID Register (MIDR)
BX lr
-
+
.global getMPIDR
.type getMPIDR,function
@@ -394,7 +394,7 @@ getMIDR:
getMPIDR:
MRC p15, 0, r0, c0 ,c0, 5// Read Multiprocessor ID register (MPIDR)
BX lr
-
+
// ------------------------------------------------------------
// CP15 SMP related
@@ -407,7 +407,7 @@ getMPIDR:
getBaseAddr:
MRC p15, 4, r0, c15, c0, 0 // Read peripheral base address
BX lr
-
+
// ------------------------------------------------------------
@@ -419,7 +419,7 @@ getCPUID:
MRC p15, 0, r0, c0, c0, 5 // Read CPU ID register
AND r0, r0, #0x03 // Mask off, leaving the CPU ID field
BX lr
-
+
// ------------------------------------------------------------
@@ -431,7 +431,7 @@ goToSleep:
WFI // Go into standby
B goToSleep // Catch in case of rogue events
BX lr
-
+
// ------------------------------------------------------------
@@ -451,7 +451,7 @@ joinSMP:
ISB
BX lr
-
+
// ------------------------------------------------------------
@@ -469,7 +469,7 @@ leaveSMP:
ISB
BX lr
-
+
// ------------------------------------------------------------
// End of v7.s
diff --git a/ports/cortex_a5/gnu/inc/tx_port.h b/ports/cortex_a5/gnu/inc/tx_port.h
index d80ddec1..f0153046 100644
--- a/ports/cortex_a5/gnu/inc/tx_port.h
+++ b/ports/cortex_a5/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,20 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -320,7 +307,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv7-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv7-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a5/gnu/readme_threadx.txt b/ports/cortex_a5/gnu/readme_threadx.txt
index 9653bd11..49cad39e 100644
--- a/ports/cortex_a5/gnu/readme_threadx.txt
+++ b/ports/cortex_a5/gnu/readme_threadx.txt
@@ -1,55 +1,55 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A5
+ Microsoft's Azure RTOS ThreadX for Cortex-A5
Using the GNU Tools
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the GNU
-development environment.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the GNU
+development environment.
-At this point you may run the build_threadx.bat batch file. This will build the
-ThreadX run-time environment in the "example_build" directory.
+At this point you may run the build_threadx.bat batch file. This will build the
+ThreadX run-time environment in the "example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
2. Demonstration System
-Building the demonstration is easy; simply execute the build_threadx_sample.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_sample.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with TX.A. The resulting file DEMO is a binary file
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with TX.A. The resulting file DEMO is a binary file
that can be downloaded and executed.
3. System Initialization
-The entry point in ThreadX for the Cortex-A5 using GNU tools is at label _start.
+The entry point in ThreadX for the Cortex-A5 using GNU tools is at label _start.
This is defined within the modified version of the GNU startup code - crt0.S.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up various
-system data structures, the interrupt vectors, and a periodic timer interrupt source.
-By default, the vector area is defined to be located at the "__vectors" label,
-which is defined in reset.S. This area is typically located at 0. In situations
-where this is impossible, the vectors at the "__vectors" label should be copied
+The ThreadX tx_initialize_low_level.S file is responsible for setting up various
+system data structures, the interrupt vectors, and a periodic timer interrupt source.
+By default, the vector area is defined to be located at the "__vectors" label,
+which is defined in reset.S. This area is typically located at 0. In situations
+where this is impossible, the vectors at the "__vectors" label should be copied
to address 0.
-This is also where initialization of a periodic timer interrupt source should take
+This is also where initialization of a periodic timer interrupt source should take
place.
-In addition, _tx_initialize_low_level defines the first available address
-for use by the application, which is supplied as the sole input parameter
+In addition, _tx_initialize_low_level defines the first available address
+for use by the application, which is supplied as the sole input parameter
to your application definition function, tx_application_define.
4. Assembler / Compiler Switches
-The following are compiler switches used in building the demonstration
+The following are compiler switches used in building the demonstration
system:
Compiler/Assembler Meaning
@@ -73,164 +73,164 @@ Application Defines ( -D option)
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S.
TX_ENABLE_FIQ_NESTING This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S. In addition,
IRQ nesting should also be enabled.
TX_ENABLE_FIQ_SUPPORT This compiler define enables FIQ
interrupt handling in the ThreadX
- generic C source. This define
+ generic C source. This define
should also be used in conjunction
with the corresponding assembler
- define.
+ define.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
5. Register Usage and Stack Frames
-The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -248,52 +248,52 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A5
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A5 vectors start at address zero. The demonstration system startup
-reset.S file contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+reset.S file contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
-ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
+ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
nested IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.S:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -301,7 +301,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -314,7 +314,7 @@ __tx_irq_processing_return:
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.S:
.global __tx_irq_example_handler
@@ -324,12 +324,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} @ Save some scratch registers
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
BL _tx_thread_vectored_context_save @ Call the vectored IRQ context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -346,22 +346,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -369,10 +369,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* Enable nested IRQ interrupts. NOTE: Since this service returns
-@ with IRQ interrupts enabled, all IRQ interrupt sources must be
+@ with IRQ interrupts enabled, all IRQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-@
+@
@ /* Application ISR call(s) go here! */
@
@ /* Disable nested IRQ interrupts. The mode is switched back to
@@ -385,12 +385,12 @@ __tx_irq_processing_return:
7.3 FIQ Interrupts
-By default, FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.S.
@@ -399,7 +399,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.S.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.S:
@@ -427,18 +427,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.S. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -454,7 +454,7 @@ __tx_fiq_processing_return:
@ interrupt, and all C scratch registers are available for use. */
@
@ /* Enable nested FIQ interrupts. NOTE: Since this service returns
-@ with FIQ interrupts enabled, all FIQ interrupt sources must be
+@ with FIQ interrupts enabled, all FIQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@
@@ -470,12 +470,12 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
-interrupt source, these services are not functional but the remainder of
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
+interrupt source, these services are not functional but the remainder of
ThreadX will still run.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.S for the demonstration system.
@@ -483,7 +483,7 @@ found in the file tx_initialize_low_level.S for the demonstration system.
9. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a5/gnu/src/tx_thread_context_restore.S b/ports/cortex_a5/gnu/src/tx_thread_context_restore.S
index 6b4a561d..41b0b0d0 100644
--- a/ports/cortex_a5/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a5/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,23 +80,6 @@ IRQ_MODE = 0x12 // IRQ mode
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_restore
.type _tx_thread_context_restore,function
diff --git a/ports/cortex_a5/gnu/src/tx_thread_context_save.S b/ports/cortex_a5/gnu/src/tx_thread_context_save.S
index eff06283..d2d29d34 100644
--- a/ports/cortex_a5/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a5/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,23 +72,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_save
.type _tx_thread_context_save,function
diff --git a/ports/cortex_a5/gnu/src/tx_thread_fiq_context_restore.S b/ports/cortex_a5/gnu/src/tx_thread_fiq_context_restore.S
index d2fbebe1..921c322c 100644
--- a/ports/cortex_a5/gnu/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_a5/gnu/src/tx_thread_fiq_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,20 +79,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* FIQ ISR Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_restore
.type _tx_thread_fiq_context_restore,function
diff --git a/ports/cortex_a5/gnu/src/tx_thread_fiq_context_save.S b/ports/cortex_a5/gnu/src/tx_thread_fiq_context_save.S
index 88472a3d..2f1a6c40 100644
--- a/ports/cortex_a5/gnu/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_a5/gnu/src/tx_thread_fiq_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_save
.type _tx_thread_fiq_context_save,function
diff --git a/ports/cortex_a5/gnu/src/tx_thread_fiq_nesting_end.S b/ports/cortex_a5/gnu/src/tx_thread_fiq_nesting_end.S
index fa3886b8..a7ce701e 100644
--- a/ports/cortex_a5/gnu/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_a5/gnu/src/tx_thread_fiq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ FIQ_MODE_BITS = 0x11 // FIQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/gnu/src/tx_thread_fiq_nesting_start.S b/ports/cortex_a5/gnu/src/tx_thread_fiq_nesting_start.S
index dbed1cf2..4f095dde 100644
--- a/ports/cortex_a5/gnu/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_a5/gnu/src/tx_thread_fiq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a5/gnu/src/tx_thread_interrupt_control.S
index d1223cb8..a5bc47f7 100644
--- a/ports/cortex_a5/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a5/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,20 +69,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a5/gnu/src/tx_thread_interrupt_disable.S
index a87d1a06..d7b53bc2 100644
--- a/ports/cortex_a5/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a5/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,20 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a5/gnu/src/tx_thread_interrupt_restore.S
index 53ff2813..3c31e94b 100644
--- a/ports/cortex_a5/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a5/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,20 +68,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/gnu/src/tx_thread_irq_nesting_end.S b/ports/cortex_a5/gnu/src/tx_thread_irq_nesting_end.S
index 18aebc7c..cc4db3a7 100644
--- a/ports/cortex_a5/gnu/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_a5/gnu/src/tx_thread_irq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/gnu/src/tx_thread_irq_nesting_start.S b/ports/cortex_a5/gnu/src/tx_thread_irq_nesting_start.S
index a2ffd35d..3635874d 100644
--- a/ports/cortex_a5/gnu/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_a5/gnu/src/tx_thread_irq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/gnu/src/tx_thread_schedule.S b/ports/cortex_a5/gnu/src/tx_thread_schedule.S
index 07dd6f7f..a74e2050 100644
--- a/ports/cortex_a5/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a5/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,6 +40,14 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode
+#ifdef TX_ENABLE_VFP_SUPPORT
+#define IRQ_MASK 0x80
+#endif
+
+#ifdef TX_ENABLE_FIQ_SUPPORT
+#define FIQ_MASK 0x40
+#endif
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
@@ -73,23 +82,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
@@ -259,3 +251,4 @@ no_fiq:
BX lr
#endif
+
diff --git a/ports/cortex_a5/gnu/src/tx_thread_stack_build.S b/ports/cortex_a5/gnu/src/tx_thread_stack_build.S
index 3876225a..827554a7 100644
--- a/ports/cortex_a5/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a5/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,20 +75,6 @@ CPSR_MASK = 0xBF // Mask initial CPSR, T, IRQ int
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/gnu/src/tx_thread_system_return.S b/ports/cortex_a5/gnu/src/tx_thread_system_return.S
index 0eed478d..1a17446b 100644
--- a/ports/cortex_a5/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a5/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,23 +69,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/gnu/src/tx_thread_vectored_context_save.S b/ports/cortex_a5/gnu/src/tx_thread_vectored_context_save.S
index fe8a98e8..91653b75 100644
--- a/ports/cortex_a5/gnu/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_a5/gnu/src/tx_thread_vectored_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_vectored_context_save
.type _tx_thread_vectored_context_save,function
diff --git a/ports/cortex_a5/gnu/src/tx_timer_interrupt.S b/ports/cortex_a5/gnu/src/tx_timer_interrupt.S
index cb0c1fa2..179ac894 100644
--- a/ports/cortex_a5/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a5/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,20 +78,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a5/iar/example_build/cstartup.s b/ports/cortex_a5/iar/example_build/cstartup.s
index 647de2e8..b4ed8f87 100644
--- a/ports/cortex_a5/iar/example_build/cstartup.s
+++ b/ports/cortex_a5/iar/example_build/cstartup.s
@@ -1,7 +1,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; Part one of the system initialization code,
+;; Part one of the system initialization code,
;; contains low-level
;; initialization.
;;
@@ -71,13 +71,13 @@ FIQ_Addr: DCD __tx_fiq_handler
SECTION .text:CODE:NOROOT(2)
-; PUBLIC ?cstartup
+; PUBLIC ?cstartup
EXTERN ?main
REQUIRE __vector
- ARM
-
-__iar_program_start:
+ ARM
+
+__iar_program_start:
?cstartup:
;
diff --git a/ports/cortex_a5/iar/example_build/sample_threadx.c b/ports/cortex_a5/iar/example_build/sample_threadx.c
index 68cd97fe..56f7cd55 100644
--- a/ports/cortex_a5/iar/example_build/sample_threadx.c
+++ b/ports/cortex_a5/iar/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -85,42 +85,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -128,23 +128,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -247,11 +247,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -310,7 +310,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -363,7 +363,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_a5/iar/example_build/tx_initialize_low_level.s b/ports/cortex_a5/iar/example_build/tx_initialize_low_level.s
index ca458fd3..3ca83a9f 100644
--- a/ports/cortex_a5/iar/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_a5/iar/example_build/tx_initialize_low_level.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -62,7 +62,7 @@ SYS_MODE DEFINE 0xDF ; Disable irq,fiq SYS mode
;
;
;
-;/* Define the FREE_MEM segment that will specify where free memory is
+;/* Define the FREE_MEM segment that will specify where free memory is
; defined. This must also be located in at the end of other RAM segments
; in the linker control file. The value of this segment is what is passed
; to tx_application_define. */
@@ -75,45 +75,39 @@ __tx_free_memory_start
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level Cortex-A5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level Cortex-A5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -146,7 +140,7 @@ _tx_initialize_low_level
;
LDR r2, =_tx_initialize_unused_memory ; Pickup unused memory ptr address
STR r0, [r2, #0] ; Save first free memory address
-;
+;
; /* Setup Timer for periodic interrupts. */
;
; /* Done, return to caller. */
@@ -188,7 +182,7 @@ __tx_reserved_handler
RSEG .text:CODE:NOROOT(2)
PUBLIC __tx_irq_handler
RSEG .text:CODE:NOROOT(2)
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -196,17 +190,17 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -221,7 +215,7 @@ __tx_irq_processing_return
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -240,22 +234,22 @@ __tx_irq_processing_return
; /* Jump to context save to save system context. */
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other registers
; BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -264,7 +258,7 @@ __tx_irq_processing_return
; /* Application IRQ handler is called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
@@ -288,11 +282,11 @@ __tx_fiq_processing_return
; /* At this point execution is still in the FIQ mode. The CPSR, point of
; interrupt, and all C scratch registers are available for use. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
; from FIQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with FIQ interrupts enabled.
+; system mode and returns with FIQ interrupts enabled.
;
-; NOTE: It is very important to ensure all FIQ interrupts are cleared
+; NOTE: It is very important to ensure all FIQ interrupts are cleared
; prior to enabling nested FIQ interrupts. */
#ifdef TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/cortex_a5/iar/inc/tx_port.h b/ports/cortex_a5/iar/inc/tx_port.h
index a239d50b..5ce81a27 100644
--- a/ports/cortex_a5/iar/inc/tx_port.h
+++ b/ports/cortex_a5/iar/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-A5/IAR */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-A5/IAR */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -79,7 +71,7 @@
#endif
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -115,12 +107,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -130,8 +122,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -188,7 +180,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -202,18 +194,18 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable; \
- VOID *tx_thread_iar_tls_pointer;
+ VOID *tx_thread_iar_tls_pointer;
#else
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable;
#endif
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -227,11 +219,11 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -241,23 +233,23 @@ ULONG _tx_misra_time_stamp_get(VOID);
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#if (__VER__ < 8000000)
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {_tx_iar_destroy_per_thread_tls_area(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
-#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
+#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#endif
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -285,8 +277,8 @@ void __iar_Initlocks(void);
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef TX_DISABLE_INLINE
@@ -297,22 +289,22 @@ void __iar_Initlocks(void);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (UINT) __CLZ(m); \
- b = 31 - b;
+ b = 31 - b;
#endif
#endif
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
/* First, check and see what mode the file is being compiled in. The IAR compiler
- defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
+ defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
is present. If ARM 32-bit mode is present, the fast CPSR manipulation macros
are available. Otherwise, if Thumb mode is present, we must use function calls. */
@@ -381,8 +373,8 @@ void tx_thread_vfp_disable(void);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-A5/IAR Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-A5/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_a5/iar/readme_threadx.txt b/ports/cortex_a5/iar/readme_threadx.txt
index dc62701c..6066b56b 100644
--- a/ports/cortex_a5/iar/readme_threadx.txt
+++ b/ports/cortex_a5/iar/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A5
+ Microsoft's Azure RTOS ThreadX for Cortex-A5
Thumb & 32-bit Mode
@@ -7,10 +7,10 @@
1. Building the ThreadX run-time Library
Building the ThreadX library is easy. First, open the Azure RTOS workspace
-azure_rtos.eww. Next, make the TX project the "active project" in the
-IAR Embedded Workbench and select the "Make" button. You should observe
-assembly and compilation of a series of ThreadX source files. This
-results in the ThreadX run-time library file tx.a, which is needed by
+azure_rtos.eww. Next, make the TX project the "active project" in the
+IAR Embedded Workbench and select the "Make" button. You should observe
+assembly and compilation of a series of ThreadX source files. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
@@ -20,47 +20,47 @@ The ThreadX demonstration is designed to execute under the IAR
Windows-based Cortex-A5 simulator.
Building the demonstration is easy; simply make the sample_threadx.ewp project
-the "active project" in the IAR Embedded Workbench and select the
+the "active project" in the IAR Embedded Workbench and select the
"Make" button.
-You should observe the compilation of sample_threadx.c (which is the demonstration
+You should observe the compilation of sample_threadx.c (which is the demonstration
application) and linking with tx.a. The resulting file sample_threadx.out is a
binary file that can be downloaded and executed on IAR's Cortex-A5 simulator.
3. System Initialization
-The entry point in ThreadX for the Cortex-A5 using IAR tools is at label
-?cstartup. This is defined within the IAR compiler's startup code. In
-addition, this is where all static and global preset C variable
+The entry point in ThreadX for the Cortex-A5 using IAR tools is at label
+?cstartup. This is defined within the IAR compiler's startup code. In
+addition, this is where all static and global preset C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, and a periodic timer interrupt source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, and a periodic timer interrupt source.
By default, the vector area is defined at the top of cstartup.s, which is
-a slightly modified from the base IAR file.
+a slightly modified from the base IAR file.
The _tx_initialize_low_level function inside of tx_initialize_low_level.s
-also determines the first available address for use by the application, which
-is supplied as the sole input parameter to your application definition function,
-tx_application_define. To accomplish this, a section is created in
-tx_initialize_low_level.s called FREE_MEM, which must be located after all
+also determines the first available address for use by the application, which
+is supplied as the sole input parameter to your application definition function,
+tx_application_define. To accomplish this, a section is created in
+tx_initialize_low_level.s called FREE_MEM, which must be located after all
other RAM sections in memory.
4. Register Usage and Stack Frames
-The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
-scratch registers for each function. All other registers used by a C function
-must be preserved by the function. ThreadX takes advantage of this in
-situations where a context switch happens as a result of making a ThreadX
-service call (which is itself a C function). In such cases, the saved
+The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
+scratch registers for each function. All other registers used by a C function
+must be preserved by the function. ThreadX takes advantage of this in
+situations where a context switch happens as a result of making a ThreadX
+service call (which is itself a C function). In such cases, the saved
context of a thread is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -78,12 +78,12 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
5. Conditional Compilation Switches
@@ -92,146 +92,146 @@ The following are conditional compilation options for building the ThreadX libra
and application:
- TX_ENABLE_FIQ_SUPPORT This assembler/compiler define enables
+ TX_ENABLE_FIQ_SUPPORT This assembler/compiler define enables
FIQ interrupt handling support in the
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s.
TX_ENABLE_FIQ_NESTING This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s. In addition,
IRQ nesting should also be enabled.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
TX_THUMB Defined, this option enables the BX LR calling return sequence
@@ -245,29 +245,29 @@ and application:
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
-project to enable various compiler optimizations.
+project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A5
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A5 vectors start at address zero. The demonstration system startup
-cstartup.s file contains the vectors and is loaded at address zero.
-On actual hardware platforms, this area might have to be copied to address 0.
+cstartup.s file contains the vectors and is loaded at address zero.
+On actual hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -278,12 +278,12 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
PUBLIC __tx_irq_handler
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -291,7 +291,7 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -304,7 +304,7 @@ __tx_irq_processing_return
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.s:
@@ -315,12 +315,12 @@ __tx_example_vectored_irq_handler
; /* Jump to context save to save system context. */
STMDB sp!, {r0-r3} ; Save some scratch registers
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -337,24 +337,24 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
RSEG .text:CODE:NOROOT(2)
PUBLIC __tx_irq_handler
RSEG .text:CODE:NOROOT(2)
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -362,15 +362,15 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;
BL _tx_thread_irq_nesting_start
@@ -378,7 +378,7 @@ __tx_irq_processing_return
; /* Application ISR dispatch call goes here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;
BL _tx_thread_irq_nesting_end
@@ -389,12 +389,12 @@ __tx_irq_processing_return
7.3 FIQ Interrupts
-By default, Cortex-A5 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, Cortex-A5 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -403,7 +403,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.s.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.s:
@@ -434,18 +434,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.s. When nested FIQ interrupts are no
-longer required, calling the _tx_thread_fiq_nesting_end service disables
-nesting by disabling FIQ interrupts and switching back to FIQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.s. When nested FIQ interrupts are no
+longer required, calling the _tx_thread_fiq_nesting_end service disables
+nesting by disabling FIQ interrupts and switching back to FIQ mode in
preparation for the FIQ context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -463,7 +463,7 @@ __tx_fiq_processing_return:
; interrupt, and all C scratch registers are available for use. */
;
; /* Enable nested FIQ interrupts. NOTE: Since this service returns
-; with FIQ interrupts enabled, all FIQ interrupt sources must be
+; with FIQ interrupts enabled, all FIQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
;
@@ -479,22 +479,22 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
+To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
in the IRQ processing.
9. Thumb/Cortex-A5 Mixed Mode
-By default, ThreadX is setup for running in Cortex-A5 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
+By default, ThreadX is setup for running in Cortex-A5 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
ThreadX file and/or the application in Thumb mode. The only exception
-to this is the file tx_thread_shell_entry.c. This file must always be
-built in 32-bit mode. In addition, if any Thumb code is used the entire
+to this is the file tx_thread_shell_entry.c. This file must always be
+built in 32-bit mode. In addition, if any Thumb code is used the entire
ThreadX assembly source should be built with TX_THUMB defined.
@@ -506,14 +506,14 @@ should have the following line added (if not already in place):
initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
-The project options "General Options -> Library Configuration" should also have the
+The project options "General Options -> Library Configuration" should also have the
"Enable thread support in library" box selected.
11. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a5/iar/src/tx_iar.c b/ports/cortex_a5/iar/src/tx_iar.c
index a37231c8..238b485e 100644
--- a/ports/cortex_a5/iar/src/tx_iar.c
+++ b/ports/cortex_a5/iar/src/tx_iar.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** IAR Multithreaded Library Support */
/** */
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,24 +423,24 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#include
+#include
void * __aeabi_read_tp();
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports/cortex_a5/iar/src/tx_thread_context_restore.s b/ports/cortex_a5/iar/src/tx_thread_context_restore.s
index c54bd762..5d8a88c2 100644
--- a/ports/cortex_a5/iar/src/tx_thread_context_restore.s
+++ b/ports/cortex_a5/iar/src/tx_thread_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,7 +36,7 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
THUMB_MASK DEFINE 0x20 ; Thumb bit mask
SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
@@ -51,47 +51,38 @@ SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore Cortex-A5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore Cortex-A5/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -121,13 +112,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3, #0] ; Store the counter
+ STR r2, [r3, #0] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -193,7 +184,7 @@ __tx_thread_preempt_restore
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
-
+
#ifdef __ARMVFP__
LDR r2, [r0, #144] ; Pickup the VFP enabled flag
CMP r2, #0 ; Is the VFP enabled?
@@ -206,7 +197,7 @@ __tx_thread_preempt_restore
VSTMDB sp!, {D0-D15} ; Save D0-D15
_tx_skip_fiq_vfp_save:
#endif
-
+
MOV r3, #1 ; Build interrupt stack type
STMDB sp!, {r3, r4} ; Save interrupt stack type and SPSR
STR sp, [r0, #8] ; Save stack pointer in thread control
diff --git a/ports/cortex_a5/iar/src/tx_thread_context_save.s b/ports/cortex_a5/iar/src/tx_thread_context_save.s
index 493a0965..daa758ff 100644
--- a/ports/cortex_a5/iar/src/tx_thread_context_save.s
+++ b/ports/cortex_a5/iar/src/tx_thread_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -43,46 +43,37 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save Cortex-A5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save Cortex-A5/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
@@ -99,7 +90,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
#ifdef TX_ENABLE_FIQ_SUPPORT
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt CPSR
@@ -119,7 +110,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -135,7 +126,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -149,13 +140,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -175,7 +166,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -185,7 +176,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -200,7 +191,7 @@ __tx_thread_idle_system_save
#endif
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports/cortex_a5/iar/src/tx_thread_fiq_context_restore.s b/ports/cortex_a5/iar/src/tx_thread_fiq_context_restore.s
index e040244c..549c3fff 100644
--- a/ports/cortex_a5/iar/src/tx_thread_fiq_context_restore.s
+++ b/ports/cortex_a5/iar/src/tx_thread_fiq_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -37,7 +37,7 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
THUMB_MASK DEFINE 0x20 ; Thumb bit mask
IRQ_MODE_BITS DEFINE 0x12 ; IRQ mode bits
SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
@@ -52,47 +52,38 @@ SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
EXTERN _tx_execution_isr_exit
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_restore Cortex-A5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_restore Cortex-A5/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the fiq interrupt context when processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* FIQ ISR Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function restores the fiq interrupt context when processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* FIQ ISR Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_context_restore(VOID)
@@ -122,13 +113,13 @@ _tx_thread_fiq_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -172,7 +163,7 @@ __tx_thread_fiq_no_preempt_restore
; /* Restore interrupted thread or ISR. */
;
; /* Pickup the saved stack pointer. */
-; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
+; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
;
; /* Recover the saved context and return to the point of interrupt. */
;
@@ -234,7 +225,7 @@ _tx_skip_irq_vfp_save:
BEQ __tx_thread_fiq_dont_save_ts ; No, don't save it
;
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-; _tx_timer_time_slice = 0;
+; _tx_timer_time_slice = 0;
;
STR r2, [r0, #24] ; Save thread's time-slice
MOV r2, #0 ; Clear value
diff --git a/ports/cortex_a5/iar/src/tx_thread_fiq_context_save.s b/ports/cortex_a5/iar/src/tx_thread_fiq_context_save.s
index f1510e0d..c140517f 100644
--- a/ports/cortex_a5/iar/src/tx_thread_fiq_context_save.s
+++ b/ports/cortex_a5/iar/src/tx_thread_fiq_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,46 +36,37 @@
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_save Cortex-A5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_save Cortex-A5/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
; VOID _tx_thread_fiq_context_save(VOID)
@@ -92,7 +83,7 @@ _tx_thread_fiq_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -107,7 +98,7 @@ _tx_thread_fiq_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -123,38 +114,38 @@ _tx_thread_fiq_context_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
__tx_thread_fiq_not_nested_save
-; }
+; }
;
; /* Otherwise, not nested, check to see if a thread was running. */
; else if (_tx_thread_current_ptr)
-; {
+; {
;
ADD r2, r2, #1 ; Increment the interrupt counter
STR r2, [r3] ; Store it back in the variable
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
-; ; scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
+; ; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, lr} ; Store other registers, Note that we don't
-; ; need to save sl and ip since FIQ has
-; ; copies of these registers. Nested
+; ; need to save sl and ip since FIQ has
+; ; copies of these registers. Nested
; ; interrupt processing does need to save
; ; these registers.
;
; /* Save the current stack pointer in the thread's control block. */
-; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
;
; /* Switch to the system stack. */
-; sp = _tx_thread_system_stack_ptr;
+; sp = _tx_thread_system_stack_ptr;
;
MOV r10, #0 ; Clear stack limit
@@ -167,7 +158,7 @@ __tx_thread_fiq_not_nested_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
; else
@@ -187,18 +178,18 @@ __tx_thread_fiq_idle_system_save
#endif
;
; /* Not much to do here, save the current SPSR and LR for possible
-; use in IRQ interrupted in idle system conditions, and return to
+; use in IRQ interrupted in idle system conditions, and return to
; FIQ interrupt processing. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, lr} ; Store other registers that will get used
-; ; or stripped off the stack in context
-; ; restore
- B __tx_fiq_processing_return ; Continue FIQ processing
+; ; or stripped off the stack in context
+; ; restore
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
-;}
+;}
;
;
END
diff --git a/ports/cortex_a5/iar/src/tx_thread_fiq_nesting_end.s b/ports/cortex_a5/iar/src/tx_thread_fiq_nesting_end.s
index 3b83f0e3..6687874f 100644
--- a/ports/cortex_a5/iar/src/tx_thread_fiq_nesting_end.s
+++ b/ports/cortex_a5/iar/src/tx_thread_fiq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,55 +34,49 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
FIQ_MODE_BITS DEFINE 0x11 ; FIQ mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_end Cortex-A5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_end Cortex-A5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-;/* processing from system mode back to FIQ mode prior to the ISR */
-;/* calling _tx_thread_fiq_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with FIQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+;/* processing from system mode back to FIQ mode prior to the ISR */
+;/* calling _tx_thread_fiq_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with FIQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_end(VOID)
diff --git a/ports/cortex_a5/iar/src/tx_thread_fiq_nesting_start.s b/ports/cortex_a5/iar/src/tx_thread_fiq_nesting_start.s
index 68f9eba6..e86e0cf3 100644
--- a/ports/cortex_a5/iar/src/tx_thread_fiq_nesting_start.s
+++ b/ports/cortex_a5/iar/src/tx_thread_fiq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ MODE_MASK DEFINE 0x1F ; Mode mask
SYS_MODE_BITS DEFINE 0x1F ; System mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_start Cortex-A5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_start Cortex-A5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-;/* processing to the system mode so nested FIQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with FIQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+;/* processing to the system mode so nested FIQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with FIQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/cortex_a5/iar/src/tx_thread_interrupt_control.s b/ports/cortex_a5/iar/src/tx_thread_interrupt_control.s
index d1d8437e..5e2938b3 100644
--- a/ports/cortex_a5/iar/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_a5/iar/src/tx_thread_interrupt_control.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,42 +35,36 @@ INT_MASK DEFINE 0x80 ; Interrupt bit mask
#endif
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control Cortex-A5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control Cortex-A5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/cortex_a5/iar/src/tx_thread_interrupt_disable.s b/ports/cortex_a5/iar/src/tx_thread_interrupt_disable.s
index b9a39960..519d0154 100644
--- a/ports/cortex_a5/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_a5/iar/src/tx_thread_interrupt_disable.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,41 +36,35 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable Cortex-A5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable Cortex-A5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(VOID)
diff --git a/ports/cortex_a5/iar/src/tx_thread_interrupt_restore.s b/ports/cortex_a5/iar/src/tx_thread_interrupt_restore.s
index 4b97a6c4..c489feb0 100644
--- a/ports/cortex_a5/iar/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_a5/iar/src/tx_thread_interrupt_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -28,42 +28,36 @@
;#include "tx_thread.h"
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore Cortex-A5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore Cortex-A5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function is responsible for restoring interrupts to the state */
;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;void _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/cortex_a5/iar/src/tx_thread_irq_nesting_end.s b/ports/cortex_a5/iar/src/tx_thread_irq_nesting_end.s
index a5a6f15f..9a7d9441 100644
--- a/ports/cortex_a5/iar/src/tx_thread_irq_nesting_end.s
+++ b/ports/cortex_a5/iar/src/tx_thread_irq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,55 +35,49 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
IRQ_MODE_BITS DEFINE 0x12 ; IRQ mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end Cortex-A5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end Cortex-A5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
diff --git a/ports/cortex_a5/iar/src/tx_thread_irq_nesting_start.s b/ports/cortex_a5/iar/src/tx_thread_irq_nesting_start.s
index 8c424974..6f2c34bd 100644
--- a/ports/cortex_a5/iar/src/tx_thread_irq_nesting_start.s
+++ b/ports/cortex_a5/iar/src/tx_thread_irq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ MODE_MASK DEFINE 0x1F ; Mode mask
SYS_MODE_BITS DEFINE 0x1F ; System mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start Cortex-A5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start Cortex-A5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/cortex_a5/iar/src/tx_thread_schedule.s b/ports/cortex_a5/iar/src/tx_thread_schedule.s
index 7565b57a..9046c40a 100644
--- a/ports/cortex_a5/iar/src/tx_thread_schedule.s
+++ b/ports/cortex_a5/iar/src/tx_thread_schedule.s
@@ -1,18 +1,19 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -43,48 +44,39 @@ ENABLE_INTS DEFINE 0x80 ; IRQ Interrupts enabled mask
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule Cortex-A5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule Cortex-A5/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
@@ -114,7 +106,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -123,7 +115,7 @@ __tx_thread_schedule_loop
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
;
- LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
STR r0, [r1, #0] ; Setup current thread pointer
;
; /* Increment the run count for this thread. */
@@ -137,7 +129,7 @@ __tx_thread_schedule_loop
; /* Setup time-slice, if present. */
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
;
- LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
+ LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
; variable
LDR sp, [r0, #8] ; Switch stack pointers
STR r3, [r2, #0] ; Setup time-slice
@@ -202,7 +194,7 @@ _tx_skip_solicited_vfp_restore:
#ifdef __ARMVFP__
PUBLIC tx_thread_vfp_enable
CODE32
-tx_thread_vfp_enable??rA
+tx_thread_vfp_enable??rA
tx_thread_vfp_enable
MRS r2, CPSR ; Pickup the CPSR
#ifdef TX_ENABLE_FIQ_SUPPORT
@@ -222,7 +214,7 @@ __tx_no_thread_to_enable:
PUBLIC tx_thread_vfp_disable
CODE32
-tx_thread_vfp_disable??rA
+tx_thread_vfp_disable??rA
tx_thread_vfp_disable
MRS r2, CPSR ; Pickup the CPSR
#ifdef TX_ENABLE_FIQ_SUPPORT
@@ -243,3 +235,4 @@ __tx_no_thread_to_disable:
END
+
diff --git a/ports/cortex_a5/iar/src/tx_thread_stack_build.s b/ports/cortex_a5/iar/src/tx_thread_stack_build.s
index 98039b47..8edefc2c 100644
--- a/ports/cortex_a5/iar/src/tx_thread_stack_build.s
+++ b/ports/cortex_a5/iar/src/tx_thread_stack_build.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -37,58 +37,52 @@ CPSR_MASK DEFINE 0x9F ; Mask initial CPSR, IRQ ints en
#endif
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build Cortex-A5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build Cortex-A5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function builds a stack frame on the supplied thread's stack. */
;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
;/* thread_ptr Pointer to thread control blk */
;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
;{
RSEG .text:CODE:NOROOT(2)
PUBLIC _tx_thread_stack_build
-
+
CODE32
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-A5 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports/cortex_a5/iar/src/tx_thread_system_return.s b/ports/cortex_a5/iar/src/tx_thread_system_return.s
index 32af6cec..62a7f0b0 100644
--- a/ports/cortex_a5/iar/src/tx_thread_system_return.s
+++ b/ports/cortex_a5/iar/src/tx_thread_system_return.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -42,47 +42,38 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return Cortex-A5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return Cortex-A5/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
@@ -115,7 +106,7 @@ _tx_skip_solicited_vfp_save:
MOV r0, #0 ; Build a solicited stack type
MRS r1, CPSR ; Pickup the CPSR
STMDB sp!, {r0-r1} ; Save type and CPSR
-;
+;
; /* Lockout interrupts. */
;
ORR r2, r1, #DISABLE_INTS ; Build disable interrupt CPSR
diff --git a/ports/cortex_a5/iar/src/tx_thread_vectored_context_save.s b/ports/cortex_a5/iar/src/tx_thread_vectored_context_save.s
index f928253d..40cabfcb 100644
--- a/ports/cortex_a5/iar/src/tx_thread_vectored_context_save.s
+++ b/ports/cortex_a5/iar/src/tx_thread_vectored_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -41,46 +41,37 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save Cortex-A5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save Cortex-A5/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_vectored_context_save(VOID)
@@ -142,7 +133,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -174,7 +165,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports/cortex_a5/iar/src/tx_timer_interrupt.s b/ports/cortex_a5/iar/src/tx_timer_interrupt.s
index ddbfda9e..a6889286 100644
--- a/ports/cortex_a5/iar/src/tx_timer_interrupt.s
+++ b/ports/cortex_a5/iar/src/tx_timer_interrupt.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Timer */
;/** */
@@ -43,46 +43,40 @@
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt Cortex-A5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt Cortex-A5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time-slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time-slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -108,7 +102,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -226,13 +220,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports/cortex_a53/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a53/ac6/example_build/sample_threadx/.cproject
index f51a736a..deae61b3 100644
--- a/ports/cortex_a53/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a53/ac6/example_build/sample_threadx/.cproject
@@ -1,158 +1,158 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a53/ac6/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a53/ac6/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a53/ac6/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a53/ac6/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a53/ac6/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a53/ac6/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a53/ac6/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a53/ac6/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a53/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a53/ac6/example_build/sample_threadx/sample_threadx.scat
index e5783c7c..d8dfde69 100644
--- a/ports/cortex_a53/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a53/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -2,7 +2,7 @@
; Scatter file for Armv8-A Startup code on FVP Base model
; Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;********************************************************
@@ -25,7 +25,7 @@ LOAD 0x80000000
; in source code for this to work correctly
;
ARM_LIB_HEAP +0 ALIGN 64 EMPTY 0xA0000 {}
-
+
;
; Handler stacks for all CPUs
; All stacks and heap are aligned to a cache-line boundary
diff --git a/ports/cortex_a53/ac6/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a53/ac6/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a53/ac6/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a53/ac6/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a53/ac6/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a53/ac6/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a53/ac6/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a53/ac6/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a53/ac6/example_build/tx/.cproject b/ports/cortex_a53/ac6/example_build/tx/.cproject
index 35fed0f2..c984b7ff 100644
--- a/ports/cortex_a53/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a53/ac6/example_build/tx/.cproject
@@ -1,148 +1,148 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a53/ac6/inc/tx_port.h b/ports/cortex_a53/ac6/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a53/ac6/inc/tx_port.h
+++ b/ports/cortex_a53/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a53/ac6/src/tx_initialize_low_level.S b/ports/cortex_a53/ac6/src/tx_initialize_low_level.S
index f456574e..7d2a4be3 100644
--- a/ports/cortex_a53/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_a53/ac6/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_a53/ac6/src/tx_thread_context_restore.S b/ports/cortex_a53/ac6/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a53/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a53/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a53/ac6/src/tx_thread_context_save.S b/ports/cortex_a53/ac6/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a53/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a53/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a53/ac6/src/tx_thread_fp_disable.c b/ports/cortex_a53/ac6/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a53/ac6/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a53/ac6/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a53/ac6/src/tx_thread_fp_enable.c b/ports/cortex_a53/ac6/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a53/ac6/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a53/ac6/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a53/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a53/ac6/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a53/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a53/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a53/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a53/ac6/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a53/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a53/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a53/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a53/ac6/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a53/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a53/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a53/ac6/src/tx_thread_schedule.S b/ports/cortex_a53/ac6/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a53/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a53/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a53/ac6/src/tx_thread_stack_build.S b/ports/cortex_a53/ac6/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a53/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a53/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a53/ac6/src/tx_thread_system_return.S b/ports/cortex_a53/ac6/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a53/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a53/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a53/ac6/src/tx_timer_interrupt.S b/ports/cortex_a53/ac6/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a53/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a53/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a53/gnu/example_build/sample_threadx/.cproject b/ports/cortex_a53/gnu/example_build/sample_threadx/.cproject
index 1c32cb32..40d4912d 100644
--- a/ports/cortex_a53/gnu/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a53/gnu/example_build/sample_threadx/.cproject
@@ -1,170 +1,170 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a53/gnu/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a53/gnu/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a53/gnu/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a53/gnu/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a53/gnu/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a53/gnu/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a53/gnu/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a53/gnu/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a53/gnu/example_build/sample_threadx/sample_threadx.ld b/ports/cortex_a53/gnu/example_build/sample_threadx/sample_threadx.ld
index eec8f12b..3bf47736 100644
--- a/ports/cortex_a53/gnu/example_build/sample_threadx/sample_threadx.ld
+++ b/ports/cortex_a53/gnu/example_build/sample_threadx/sample_threadx.ld
@@ -1,7 +1,7 @@
/* Linker script to place sections and symbol values.
* It references following symbols, which must be defined in code:
* start64 : Entry point
- *
+ *
* It defines following symbols, which code can use without definition:
* __cs3_peripherals
* __code_start
diff --git a/ports/cortex_a53/gnu/example_build/sample_threadx/startup.S b/ports/cortex_a53/gnu/example_build/sample_threadx/startup.S
index b71b45f8..b44806fe 100644
--- a/ports/cortex_a53/gnu/example_build/sample_threadx/startup.S
+++ b/ports/cortex_a53/gnu/example_build/sample_threadx/startup.S
@@ -328,7 +328,7 @@ el1_entry_aarch64:
//
// Cortex-A processors automatically invalidate their caches on reset
// (unless suppressed with the DBGL1RSTDISABLE or L2RSTDISABLE pins).
- // It is therefore not necessary for software to invalidate the caches
+ // It is therefore not necessary for software to invalidate the caches
// on startup, however, this is done here in case of a warm reset.
bl InvalidateUDCaches
tlbi VMALLE1
diff --git a/ports/cortex_a53/gnu/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a53/gnu/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a53/gnu/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a53/gnu/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a53/gnu/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a53/gnu/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a53/gnu/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a53/gnu/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a53/gnu/example_build/tx/.cproject b/ports/cortex_a53/gnu/example_build/tx/.cproject
index f1b8ed5b..9e5a975e 100644
--- a/ports/cortex_a53/gnu/example_build/tx/.cproject
+++ b/ports/cortex_a53/gnu/example_build/tx/.cproject
@@ -1,164 +1,164 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a53/gnu/inc/tx_port.h b/ports/cortex_a53/gnu/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a53/gnu/inc/tx_port.h
+++ b/ports/cortex_a53/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a53/gnu/src/tx_initialize_low_level.S b/ports/cortex_a53/gnu/src/tx_initialize_low_level.S
index 3dce3cea..3025f12b 100644
--- a/ports/cortex_a53/gnu/src/tx_initialize_low_level.S
+++ b/ports/cortex_a53/gnu/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
@@ -99,4 +89,4 @@ _tx_initialize_low_level:
/* Done, return to caller. */
RET // Return to caller
-// }
+// }
diff --git a/ports/cortex_a53/gnu/src/tx_thread_context_restore.S b/ports/cortex_a53/gnu/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a53/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a53/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a53/gnu/src/tx_thread_context_save.S b/ports/cortex_a53/gnu/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a53/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a53/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a53/gnu/src/tx_thread_fp_disable.c b/ports/cortex_a53/gnu/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a53/gnu/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a53/gnu/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a53/gnu/src/tx_thread_fp_enable.c b/ports/cortex_a53/gnu/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a53/gnu/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a53/gnu/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a53/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a53/gnu/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a53/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a53/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a53/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a53/gnu/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a53/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a53/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a53/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a53/gnu/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a53/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a53/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a53/gnu/src/tx_thread_schedule.S b/ports/cortex_a53/gnu/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a53/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a53/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a53/gnu/src/tx_thread_stack_build.S b/ports/cortex_a53/gnu/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a53/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a53/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a53/gnu/src/tx_thread_system_return.S b/ports/cortex_a53/gnu/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a53/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a53/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a53/gnu/src/tx_timer_interrupt.S b/ports/cortex_a53/gnu/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a53/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a53/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a55/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a55/ac6/example_build/sample_threadx/.cproject
index f4e329dc..96dec1da 100644
--- a/ports/cortex_a55/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a55/ac6/example_build/sample_threadx/.cproject
@@ -1,158 +1,158 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a55/ac6/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a55/ac6/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a55/ac6/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a55/ac6/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a55/ac6/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a55/ac6/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a55/ac6/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a55/ac6/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a55/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a55/ac6/example_build/sample_threadx/sample_threadx.scat
index e5783c7c..d8dfde69 100644
--- a/ports/cortex_a55/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a55/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -2,7 +2,7 @@
; Scatter file for Armv8-A Startup code on FVP Base model
; Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;********************************************************
@@ -25,7 +25,7 @@ LOAD 0x80000000
; in source code for this to work correctly
;
ARM_LIB_HEAP +0 ALIGN 64 EMPTY 0xA0000 {}
-
+
;
; Handler stacks for all CPUs
; All stacks and heap are aligned to a cache-line boundary
diff --git a/ports/cortex_a55/ac6/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a55/ac6/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a55/ac6/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a55/ac6/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a55/ac6/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a55/ac6/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a55/ac6/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a55/ac6/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a55/ac6/example_build/tx/.cproject b/ports/cortex_a55/ac6/example_build/tx/.cproject
index 0d6f5a10..9345d698 100644
--- a/ports/cortex_a55/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a55/ac6/example_build/tx/.cproject
@@ -1,148 +1,148 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a55/ac6/inc/tx_port.h b/ports/cortex_a55/ac6/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a55/ac6/inc/tx_port.h
+++ b/ports/cortex_a55/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a55/ac6/src/tx_initialize_low_level.S b/ports/cortex_a55/ac6/src/tx_initialize_low_level.S
index f456574e..7d2a4be3 100644
--- a/ports/cortex_a55/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_a55/ac6/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_a55/ac6/src/tx_thread_context_restore.S b/ports/cortex_a55/ac6/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a55/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a55/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a55/ac6/src/tx_thread_context_save.S b/ports/cortex_a55/ac6/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a55/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a55/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a55/ac6/src/tx_thread_fp_disable.c b/ports/cortex_a55/ac6/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a55/ac6/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a55/ac6/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a55/ac6/src/tx_thread_fp_enable.c b/ports/cortex_a55/ac6/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a55/ac6/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a55/ac6/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a55/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a55/ac6/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a55/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a55/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a55/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a55/ac6/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a55/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a55/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a55/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a55/ac6/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a55/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a55/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a55/ac6/src/tx_thread_schedule.S b/ports/cortex_a55/ac6/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a55/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a55/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a55/ac6/src/tx_thread_stack_build.S b/ports/cortex_a55/ac6/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a55/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a55/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a55/ac6/src/tx_thread_system_return.S b/ports/cortex_a55/ac6/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a55/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a55/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a55/ac6/src/tx_timer_interrupt.S b/ports/cortex_a55/ac6/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a55/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a55/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a55/gnu/example_build/sample_threadx/.cproject b/ports/cortex_a55/gnu/example_build/sample_threadx/.cproject
index 1c32cb32..40d4912d 100644
--- a/ports/cortex_a55/gnu/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a55/gnu/example_build/sample_threadx/.cproject
@@ -1,170 +1,170 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a55/gnu/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a55/gnu/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a55/gnu/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a55/gnu/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a55/gnu/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a55/gnu/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a55/gnu/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a55/gnu/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a55/gnu/example_build/sample_threadx/sample_threadx.ld b/ports/cortex_a55/gnu/example_build/sample_threadx/sample_threadx.ld
index eec8f12b..3bf47736 100644
--- a/ports/cortex_a55/gnu/example_build/sample_threadx/sample_threadx.ld
+++ b/ports/cortex_a55/gnu/example_build/sample_threadx/sample_threadx.ld
@@ -1,7 +1,7 @@
/* Linker script to place sections and symbol values.
* It references following symbols, which must be defined in code:
* start64 : Entry point
- *
+ *
* It defines following symbols, which code can use without definition:
* __cs3_peripherals
* __code_start
diff --git a/ports/cortex_a55/gnu/example_build/sample_threadx/startup.S b/ports/cortex_a55/gnu/example_build/sample_threadx/startup.S
index b71b45f8..b44806fe 100644
--- a/ports/cortex_a55/gnu/example_build/sample_threadx/startup.S
+++ b/ports/cortex_a55/gnu/example_build/sample_threadx/startup.S
@@ -328,7 +328,7 @@ el1_entry_aarch64:
//
// Cortex-A processors automatically invalidate their caches on reset
// (unless suppressed with the DBGL1RSTDISABLE or L2RSTDISABLE pins).
- // It is therefore not necessary for software to invalidate the caches
+ // It is therefore not necessary for software to invalidate the caches
// on startup, however, this is done here in case of a warm reset.
bl InvalidateUDCaches
tlbi VMALLE1
diff --git a/ports/cortex_a55/gnu/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a55/gnu/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a55/gnu/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a55/gnu/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a55/gnu/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a55/gnu/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a55/gnu/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a55/gnu/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a55/gnu/example_build/tx/.cproject b/ports/cortex_a55/gnu/example_build/tx/.cproject
index f1b8ed5b..9e5a975e 100644
--- a/ports/cortex_a55/gnu/example_build/tx/.cproject
+++ b/ports/cortex_a55/gnu/example_build/tx/.cproject
@@ -1,164 +1,164 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a55/gnu/inc/tx_port.h b/ports/cortex_a55/gnu/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a55/gnu/inc/tx_port.h
+++ b/ports/cortex_a55/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a55/gnu/src/tx_initialize_low_level.S b/ports/cortex_a55/gnu/src/tx_initialize_low_level.S
index 3dce3cea..3025f12b 100644
--- a/ports/cortex_a55/gnu/src/tx_initialize_low_level.S
+++ b/ports/cortex_a55/gnu/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
@@ -99,4 +89,4 @@ _tx_initialize_low_level:
/* Done, return to caller. */
RET // Return to caller
-// }
+// }
diff --git a/ports/cortex_a55/gnu/src/tx_thread_context_restore.S b/ports/cortex_a55/gnu/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a55/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a55/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a55/gnu/src/tx_thread_context_save.S b/ports/cortex_a55/gnu/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a55/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a55/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a55/gnu/src/tx_thread_fp_disable.c b/ports/cortex_a55/gnu/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a55/gnu/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a55/gnu/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a55/gnu/src/tx_thread_fp_enable.c b/ports/cortex_a55/gnu/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a55/gnu/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a55/gnu/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a55/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a55/gnu/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a55/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a55/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a55/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a55/gnu/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a55/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a55/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a55/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a55/gnu/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a55/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a55/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a55/gnu/src/tx_thread_schedule.S b/ports/cortex_a55/gnu/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a55/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a55/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a55/gnu/src/tx_thread_stack_build.S b/ports/cortex_a55/gnu/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a55/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a55/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a55/gnu/src/tx_thread_system_return.S b/ports/cortex_a55/gnu/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a55/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a55/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a55/gnu/src/tx_timer_interrupt.S b/ports/cortex_a55/gnu/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a55/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a55/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a57/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a57/ac6/example_build/sample_threadx/.cproject
index d6254b98..c8f4a879 100644
--- a/ports/cortex_a57/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a57/ac6/example_build/sample_threadx/.cproject
@@ -1,158 +1,158 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a57/ac6/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a57/ac6/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a57/ac6/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a57/ac6/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a57/ac6/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a57/ac6/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a57/ac6/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a57/ac6/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a57/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a57/ac6/example_build/sample_threadx/sample_threadx.scat
index e5783c7c..d8dfde69 100644
--- a/ports/cortex_a57/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a57/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -2,7 +2,7 @@
; Scatter file for Armv8-A Startup code on FVP Base model
; Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;********************************************************
@@ -25,7 +25,7 @@ LOAD 0x80000000
; in source code for this to work correctly
;
ARM_LIB_HEAP +0 ALIGN 64 EMPTY 0xA0000 {}
-
+
;
; Handler stacks for all CPUs
; All stacks and heap are aligned to a cache-line boundary
diff --git a/ports/cortex_a57/ac6/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a57/ac6/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a57/ac6/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a57/ac6/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a57/ac6/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a57/ac6/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a57/ac6/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a57/ac6/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a57/ac6/example_build/tx/.cproject b/ports/cortex_a57/ac6/example_build/tx/.cproject
index 5ce4655a..fce48d53 100644
--- a/ports/cortex_a57/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a57/ac6/example_build/tx/.cproject
@@ -1,148 +1,148 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a57/ac6/inc/tx_port.h b/ports/cortex_a57/ac6/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a57/ac6/inc/tx_port.h
+++ b/ports/cortex_a57/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a57/ac6/src/tx_initialize_low_level.S b/ports/cortex_a57/ac6/src/tx_initialize_low_level.S
index f456574e..7d2a4be3 100644
--- a/ports/cortex_a57/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_a57/ac6/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_a57/ac6/src/tx_thread_context_restore.S b/ports/cortex_a57/ac6/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a57/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a57/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a57/ac6/src/tx_thread_context_save.S b/ports/cortex_a57/ac6/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a57/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a57/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a57/ac6/src/tx_thread_fp_disable.c b/ports/cortex_a57/ac6/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a57/ac6/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a57/ac6/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a57/ac6/src/tx_thread_fp_enable.c b/ports/cortex_a57/ac6/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a57/ac6/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a57/ac6/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a57/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a57/ac6/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a57/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a57/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a57/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a57/ac6/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a57/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a57/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a57/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a57/ac6/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a57/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a57/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a57/ac6/src/tx_thread_schedule.S b/ports/cortex_a57/ac6/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a57/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a57/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a57/ac6/src/tx_thread_stack_build.S b/ports/cortex_a57/ac6/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a57/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a57/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a57/ac6/src/tx_thread_system_return.S b/ports/cortex_a57/ac6/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a57/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a57/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a57/ac6/src/tx_timer_interrupt.S b/ports/cortex_a57/ac6/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a57/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a57/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a57/gnu/example_build/sample_threadx/.cproject b/ports/cortex_a57/gnu/example_build/sample_threadx/.cproject
index 1c32cb32..40d4912d 100644
--- a/ports/cortex_a57/gnu/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a57/gnu/example_build/sample_threadx/.cproject
@@ -1,170 +1,170 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a57/gnu/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a57/gnu/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a57/gnu/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a57/gnu/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a57/gnu/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a57/gnu/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a57/gnu/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a57/gnu/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a57/gnu/example_build/sample_threadx/sample_threadx.ld b/ports/cortex_a57/gnu/example_build/sample_threadx/sample_threadx.ld
index eec8f12b..3bf47736 100644
--- a/ports/cortex_a57/gnu/example_build/sample_threadx/sample_threadx.ld
+++ b/ports/cortex_a57/gnu/example_build/sample_threadx/sample_threadx.ld
@@ -1,7 +1,7 @@
/* Linker script to place sections and symbol values.
* It references following symbols, which must be defined in code:
* start64 : Entry point
- *
+ *
* It defines following symbols, which code can use without definition:
* __cs3_peripherals
* __code_start
diff --git a/ports/cortex_a57/gnu/example_build/sample_threadx/startup.S b/ports/cortex_a57/gnu/example_build/sample_threadx/startup.S
index b71b45f8..b44806fe 100644
--- a/ports/cortex_a57/gnu/example_build/sample_threadx/startup.S
+++ b/ports/cortex_a57/gnu/example_build/sample_threadx/startup.S
@@ -328,7 +328,7 @@ el1_entry_aarch64:
//
// Cortex-A processors automatically invalidate their caches on reset
// (unless suppressed with the DBGL1RSTDISABLE or L2RSTDISABLE pins).
- // It is therefore not necessary for software to invalidate the caches
+ // It is therefore not necessary for software to invalidate the caches
// on startup, however, this is done here in case of a warm reset.
bl InvalidateUDCaches
tlbi VMALLE1
diff --git a/ports/cortex_a57/gnu/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a57/gnu/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a57/gnu/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a57/gnu/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a57/gnu/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a57/gnu/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a57/gnu/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a57/gnu/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a57/gnu/example_build/tx/.cproject b/ports/cortex_a57/gnu/example_build/tx/.cproject
index f1b8ed5b..9e5a975e 100644
--- a/ports/cortex_a57/gnu/example_build/tx/.cproject
+++ b/ports/cortex_a57/gnu/example_build/tx/.cproject
@@ -1,164 +1,164 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a57/gnu/inc/tx_port.h b/ports/cortex_a57/gnu/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a57/gnu/inc/tx_port.h
+++ b/ports/cortex_a57/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a57/gnu/src/tx_initialize_low_level.S b/ports/cortex_a57/gnu/src/tx_initialize_low_level.S
index 3dce3cea..3025f12b 100644
--- a/ports/cortex_a57/gnu/src/tx_initialize_low_level.S
+++ b/ports/cortex_a57/gnu/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
@@ -99,4 +89,4 @@ _tx_initialize_low_level:
/* Done, return to caller. */
RET // Return to caller
-// }
+// }
diff --git a/ports/cortex_a57/gnu/src/tx_thread_context_restore.S b/ports/cortex_a57/gnu/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a57/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a57/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a57/gnu/src/tx_thread_context_save.S b/ports/cortex_a57/gnu/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a57/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a57/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a57/gnu/src/tx_thread_fp_disable.c b/ports/cortex_a57/gnu/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a57/gnu/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a57/gnu/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a57/gnu/src/tx_thread_fp_enable.c b/ports/cortex_a57/gnu/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a57/gnu/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a57/gnu/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a57/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a57/gnu/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a57/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a57/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a57/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a57/gnu/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a57/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a57/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a57/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a57/gnu/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a57/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a57/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a57/gnu/src/tx_thread_schedule.S b/ports/cortex_a57/gnu/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a57/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a57/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a57/gnu/src/tx_thread_stack_build.S b/ports/cortex_a57/gnu/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a57/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a57/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a57/gnu/src/tx_thread_system_return.S b/ports/cortex_a57/gnu/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a57/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a57/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a57/gnu/src/tx_timer_interrupt.S b/ports/cortex_a57/gnu/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a57/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a57/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a5x/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a5x/ac6/example_build/sample_threadx/.cproject
index f407d39b..46377ece 100644
--- a/ports/cortex_a5x/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a5x/ac6/example_build/sample_threadx/.cproject
@@ -1,154 +1,154 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a5x/ac6/example_build/sample_threadx/armv8_aarch64_SystemTimer.S b/ports/cortex_a5x/ac6/example_build/sample_threadx/armv8_aarch64_SystemTimer.S
index aaf0f7f8..958c90c3 100644
--- a/ports/cortex_a5x/ac6/example_build/sample_threadx/armv8_aarch64_SystemTimer.S
+++ b/ports/cortex_a5x/ac6/example_build/sample_threadx/armv8_aarch64_SystemTimer.S
@@ -4,7 +4,7 @@
// Copyright ARM Ltd 2013. All rights reserved.
// ------------------------------------------------------------
-
+
.section AArch64_GenericTimer,"ax"
.align 3
@@ -14,10 +14,10 @@
// uint32_t getCNTFRQ(void)
// Returns the value of CNTFRQ_EL0
.type getCNTFRQ, @function
-getCNTFRQ:
+getCNTFRQ:
MRS x0, CNTFRQ_EL0
RET
-
+
// ------------------------------------------------------------
@@ -26,7 +26,7 @@ getCNTFRQ:
// Sets the value of CNTFRQ_EL0 (only possible at EL3)
// w0 - freq - The value to be written into CNTFRQ_EL0
.type setCNTFRQ, @function
-setCNTFRQ:
+setCNTFRQ:
MSR CNTFRQ_EL0, x0
RET
@@ -37,10 +37,10 @@ setCNTFRQ:
// uint64_t getPhysicalCount(void)
// Returns the current value of physical count (CNTPCT_EL0)
.type getPhysicalCount, @function
-getPhysicalCount:
+getPhysicalCount:
MRS x0, CNTPCT_EL0
RET
-
+
// ------------------------------------------------------------
@@ -48,10 +48,10 @@ getPhysicalCount:
// uint64_t getVirtualCount(void)
// Returns the current value of the virtual count register (CNTVCT_EL0)
.type getVirtualCount, @function
-getVirtualCount:
+getVirtualCount:
MRS x0, CNTVCT_EL0
RET
-
+
// ------------------------------------------------------------
@@ -59,10 +59,10 @@ getVirtualCount:
// uint32_t getEL1Ctrl(void)
// Returns the value of EL1 Timer Control Register (CNTKCTL_EL1)
.type getEL1Ctrl, @function
-getEL1Ctrl:
+getEL1Ctrl:
MRS x0, CNTKCTL_EL1
RET
-
+
// ------------------------------------------------------------
@@ -71,10 +71,10 @@ getEL1Ctrl:
// Sets the value of Counter Non-secure EL1 Control Register (CNTKCTL_EL1)
// 0 - value - The value to be written into CNTKCTL_EL1
.type setEL1Ctrl, @function
-setEL1Ctrl:
+setEL1Ctrl:
MSR CNTKCTL_EL1, x0
RET
-
+
// ------------------------------------------------------------
@@ -82,10 +82,10 @@ setEL1Ctrl:
// uint32_t getEL2Ctrl(void)
// Returns the value of the EL2 Timer Control Register (CNTHCTL_EL2)
.type getEL2Ctrl, @function
-getEL2Ctrl:
+getEL2Ctrl:
MRS x0, CNTHCTL_EL2
RET
-
+
// ------------------------------------------------------------
@@ -94,10 +94,10 @@ getEL2Ctrl:
// Sets the value of the EL2 Timer Control Register (CNTHCTL_EL2)
// x0 - value - The value to be written into CNTHCTL_EL2
.type setEL2Ctrl, @function
-setEL2Ctrl:
+setEL2Ctrl:
MSR CNTHCTL_EL2, x0
RET
-
+
// ------------------------------------------------------------
// Non-Secure Physical Timer
@@ -107,10 +107,10 @@ setEL2Ctrl:
// uint64_t getNSEL1PhysicalCompValue(void)
// Returns the value of Non-Secure EL1 Physical Compare Value Register (CNTP_CVAL_EL0)
.type getNSEL1PhysicalCompValue, @function
-getNSEL1PhysicalCompValue:
+getNSEL1PhysicalCompValue:
MRS x0, CNTP_CVAL_EL0
RET
-
+
// ------------------------------------------------------------
@@ -119,10 +119,10 @@ getNSEL1PhysicalCompValue:
// Sets the value of the Non-Secure EL1 Physical Compare Value Register (CNTP_CVAL_EL0)
// x0 - value - The value to be written into CNTP_CVAL_EL0
.type setNSEL1PhysicalCompValue, @function
-setNSEL1PhysicalCompValue:
+setNSEL1PhysicalCompValue:
MSR CNTP_CVAL_EL0, x0
RET
-
+
// ------------------------------------------------------------
@@ -130,10 +130,10 @@ setNSEL1PhysicalCompValue:
// uint32_t getNSEL1PhysicalTimerValue(void)
// Returns the value of Non-Secure EL1 Physical Timer Value Register (CNTP_TVAL_EL0)
.type getNSEL1PhysicalTimerValue, @function
-getNSEL1PhysicalTimerValue:
+getNSEL1PhysicalTimerValue:
MRS x0, CNTP_TVAL_EL0
RET
-
+
// ------------------------------------------------------------
@@ -142,10 +142,10 @@ getNSEL1PhysicalTimerValue:
// Sets the value of the Non-Secure EL1 Physical Timer Value Register (CNTP_TVAL_EL0)
// w0 - value - The value to be written into CNTP_TVAL_EL0
.type setNSEL1PhysicalTimerValue, @function
-setNSEL1PhysicalTimerValue:
+setNSEL1PhysicalTimerValue:
MSR CNTP_TVAL_EL0, x0
RET
-
+
// ------------------------------------------------------------
@@ -153,10 +153,10 @@ setNSEL1PhysicalTimerValue:
// uint32_t getNSEL1PhysicalTimerCtrl(void)
// Returns the value of Non-Secure EL1 Physical Timer Control Register (CNTP_CTL_EL0)
.type getNSEL1PhysicalTimerCtrl, @function
-getNSEL1PhysicalTimerCtrl:
+getNSEL1PhysicalTimerCtrl:
MRS x0, CNTP_CTL_EL0
RET
-
+
// ------------------------------------------------------------
@@ -165,10 +165,10 @@ getNSEL1PhysicalTimerCtrl:
// Sets the value of the Non-Secure EL1 Physical Timer Control Register (CNTP_CTL_EL0)
// w0 - value - The value to be written into CNTP_CTL_EL0
.type setNSEL1PhysicalTimerCtrl, @function
-setNSEL1PhysicalTimerCtrl:
+setNSEL1PhysicalTimerCtrl:
MSR CNTP_CTL_EL0, x0
RET
-
+
// ------------------------------------------------------------
// Secure Physical Timer
@@ -178,10 +178,10 @@ setNSEL1PhysicalTimerCtrl:
// uint64_t getSEL1PhysicalCompValue(void)
// Returns the value of Secure EL1 Physical Compare Value Register (CNTPS_CVAL_EL1)
.type getSEL1PhysicalCompValue, @function
-getSEL1PhysicalCompValue:
+getSEL1PhysicalCompValue:
MRS x0, CNTPS_CVAL_EL1
RET
-
+
// ------------------------------------------------------------
@@ -190,10 +190,10 @@ getSEL1PhysicalCompValue:
// Sets the value of the Secure EL1 Physical Compare Value Register (CNTPS_CVAL_EL1)
// x0 - value - The value to be written into CNTPS_CVAL_EL1
.type setSEL1PhysicalCompValue, @function
-setSEL1PhysicalCompValue:
+setSEL1PhysicalCompValue:
MSR CNTPS_CVAL_EL1, x0
RET
-
+
// ------------------------------------------------------------
@@ -202,10 +202,10 @@ setSEL1PhysicalCompValue:
// uint32_t getSEL1PhysicalTimerValue(void)
// Returns the value of Secure EL1 Physical Timer Value Register (CNTPS_TVAL_EL1)
.type getSEL1PhysicalTimerValue, @function
-getSEL1PhysicalTimerValue:
+getSEL1PhysicalTimerValue:
MRS x0, CNTPS_TVAL_EL1
RET
-
+
// ------------------------------------------------------------
@@ -214,10 +214,10 @@ getSEL1PhysicalTimerValue:
// Sets the value of the Secure EL1 Physical Timer Value Register (CNTPS_TVAL_EL1)
// w0 - value - The value to be written into CNTPS_TVAL_EL1
.type setSEL1PhysicalTimerValue, @function
-setSEL1PhysicalTimerValue:
+setSEL1PhysicalTimerValue:
MSR CNTPS_TVAL_EL1, x0
RET
-
+
// ------------------------------------------------------------
@@ -225,10 +225,10 @@ setSEL1PhysicalTimerValue:
// uint32_t getSEL1PhysicalTimerCtrl(void)
// Returns the value of Secure EL1 Physical Timer Control Register (CNTPS_CTL_EL1)
.type getSEL1PhysicalTimerCtrl, @function
-getSEL1PhysicalTimerCtrl:
+getSEL1PhysicalTimerCtrl:
MRS x0, CNTPS_CTL_EL1
RET
-
+
// ------------------------------------------------------------
@@ -237,11 +237,11 @@ getSEL1PhysicalTimerCtrl:
// Sets the value of the Secure EL1 Physical Timer Control Register (CNTPS_CTL_EL1)
// w0 - value - The value to be written into CNTPS_CTL_EL1
.type setSEL1PhysicalTimerCtrl, @function
-setSEL1PhysicalTimerCtrl:
+setSEL1PhysicalTimerCtrl:
MSR CNTPS_CTL_EL1, x0
RET
-
-
+
+
// ------------------------------------------------------------
.global configSecureEL1TimerAccess
@@ -249,12 +249,12 @@ setSEL1PhysicalTimerCtrl:
// Sets the values of the SCR_EL3.ST bit (bit 11) based on the value in x0
// EL3 accessible only!
.type configSecureEL1TimerAccess, @function
-configSecureEL1TimerAccess:
+configSecureEL1TimerAccess:
MRS x1, SCR_EL3
BFI x1, x0, #11, #1
MSR SCR_EL3, x1
RET
-
+
// ------------------------------------------------------------
// Virtual Timer
@@ -264,10 +264,10 @@ configSecureEL1TimerAccess:
// uint64_t getEL1VirtualCompValue(void)
// Returns the value of EL1 Virtual Compare Value Register (CNTV_CVAL_EL0)
.type getEL1VirtualCompValue, @function
-getEL1VirtualCompValue:
+getEL1VirtualCompValue:
MRS x0, CNTV_CVAL_EL0
RET
-
+
// ------------------------------------------------------------
@@ -276,7 +276,7 @@ getEL1VirtualCompValue:
// Sets the value of the EL1 Virtual Compare Value Register (CNTV_CVAL_EL0)
// x0 - value - The value to be written into CNTV_CVAL_EL0
.type setEL1VirtualCompValue, @function
-setEL1VirtualCompValue:
+setEL1VirtualCompValue:
MSR CNTV_CVAL_EL0, x0
RET
@@ -287,10 +287,10 @@ setEL1VirtualCompValue:
// uint32_t getEL1VirtualTimerValue(void)
// Returns the value of EL1 Virtual Timer Value Register (CNTV_TVAL_EL0)
.type getEL1VirtualTimerValue, @function
-getEL1VirtualTimerValue:
+getEL1VirtualTimerValue:
MRS x0, CNTV_TVAL_EL0
RET
-
+
// ------------------------------------------------------------
@@ -299,10 +299,10 @@ getEL1VirtualTimerValue:
// Sets the value of the EL1 Virtual Timer Value Register (CNTV_TVAL_EL0)
// w0 - value - The value to be written into CNTV_TVAL_EL0
.type setEL1VirtualTimerValue, @function
-setEL1VirtualTimerValue:
+setEL1VirtualTimerValue:
MSR CNTV_TVAL_EL0, x0
RET
-
+
// ------------------------------------------------------------
@@ -310,10 +310,10 @@ setEL1VirtualTimerValue:
// uint32_t getEL1VirtualTimerCtrl(void)
// Returns the value of EL1 Virtual Timer Control Register (CNTV_CTL_EL0)
.type getEL1VirtualTimerCtrl, @function
-getEL1VirtualTimerCtrl:
+getEL1VirtualTimerCtrl:
MRS x0, CNTV_CTL_EL0
RET
-
+
// ------------------------------------------------------------
@@ -322,11 +322,11 @@ getEL1VirtualTimerCtrl:
// Sets the value of the EL1 Virtual Timer Control Register (CNTV_CTL_EL0)
// w0 - value - The value to be written into CNTV_CTL_EL0
.type setEL1VirtualTimerCtrl, @function
-setEL1VirtualTimerCtrl:
+setEL1VirtualTimerCtrl:
MSR CNTV_CTL_EL0, x0
RET
-
-
+
+
// ------------------------------------------------------------
// Virtual Timer functions to be called by EL2
// ------------------------------------------------------------
@@ -336,10 +336,10 @@ setEL1VirtualTimerCtrl:
// Returns the value of the Counter Virtual Offset Register (CNTVOFF_EL2)
// EL2 and EL3 only
.type getVirtualCounterOffset, @function
-getVirtualCounterOffset:
+getVirtualCounterOffset:
MRS x0, CNTVOFF_EL2
RET
-
+
// ------------------------------------------------------------
@@ -349,11 +349,11 @@ getVirtualCounterOffset:
// x0 - offset - The value to be written into CNTVOFF_EL2
// EL2 and EL3 only
.type setVirtualCounterOffset, @function
-setVirtualCounterOffset:
+setVirtualCounterOffset:
MSR CNTVOFF_EL2, x0
RET
-
-
+
+
// ------------------------------------------------------------
// EL2 Physical Timer
// ------------------------------------------------------------
@@ -362,10 +362,10 @@ setVirtualCounterOffset:
// uint64_t getEL2PhysicalCompValue(void)
// Returns the value of EL2 Physical Compare Value Register (CNTHP_CVAL_EL2)
.type getEL2PhysicalCompValue, @function
-getEL2PhysicalCompValue:
+getEL2PhysicalCompValue:
MRS x0, CNTHP_CVAL_EL2
RET
-
+
// ------------------------------------------------------------
@@ -374,10 +374,10 @@ getEL2PhysicalCompValue:
// Sets the value of the EL2 Physical Compare Value Register (CNTHP_CVAL_EL2)
// x0 - value - The value to be written into CNTHP_CVAL_EL2
.type setEL2PhysicalCompValue, @function
-setEL2PhysicalCompValue:
+setEL2PhysicalCompValue:
MSR CNTHP_CVAL_EL2, x0
RET
-
+
// ------------------------------------------------------------
@@ -386,10 +386,10 @@ setEL2PhysicalCompValue:
// uint32_t getEL2PhysicalTimerValue(void)
// Returns the value of EL2 Physical Timer Value Register (CNTHP_TVAL_EL2)
.type getEL2PhysicalTimerValue, @function
-getEL2PhysicalTimerValue:
+getEL2PhysicalTimerValue:
MRS x0, CNTHP_TVAL_EL2
RET
-
+
// ------------------------------------------------------------
@@ -398,10 +398,10 @@ getEL2PhysicalTimerValue:
// Sets the value of the EL2 Physical Timer Value Register (CNTHP_TVAL_EL2)
// w0 - value - The value to be written into CNTHP_TVAL_EL2
.type setEL2PhysicalTimerValue, @function
-setEL2PhysicalTimerValue:
+setEL2PhysicalTimerValue:
MSR CNTHP_TVAL_EL2, x0
RET
-
+
// ------------------------------------------------------------
@@ -409,10 +409,10 @@ setEL2PhysicalTimerValue:
// uint32_t getEL2PhysicalTimerCtrl(void)
// Returns the value of EL2 Physical Timer Control Register (CNTHP_CTL_EL2)
.type getEL2PhysicalTimerCtrl, @function
-getEL2PhysicalTimerCtrl:
+getEL2PhysicalTimerCtrl:
MRS x0, CNTHP_CTL_EL2
RET
-
+
// ------------------------------------------------------------
@@ -421,10 +421,10 @@ getEL2PhysicalTimerCtrl:
// Sets the value of the EL2 Physical Timer Control Register (CNTHP_CTL_EL2)
// w0 - value - The value to be written into CNTHP_CTL_EL2
.type setEL2PhysicalTimerCtrl, @function
-setEL2PhysicalTimerCtrl:
+setEL2PhysicalTimerCtrl:
MSR CNTHP_CTL_EL2, x0
RET
-
+
// ------------------------------------------------------------
// End of code
diff --git a/ports/cortex_a5x/ac6/example_build/sample_threadx/el3_vectors.S b/ports/cortex_a5x/ac6/example_build/sample_threadx/el3_vectors.S
index 7f4effe7..b76a789e 100644
--- a/ports/cortex_a5x/ac6/example_build/sample_threadx/el3_vectors.S
+++ b/ports/cortex_a5x/ac6/example_build/sample_threadx/el3_vectors.S
@@ -6,8 +6,8 @@
.section VECTORS,"ax"
.align 12
-
-
+
+
.global el3_vectors
el3_vectors:
@@ -59,7 +59,7 @@ serror_current_el_spx:
.balign 128
sync_lower_el_aarch64:
- B .
+ B .
.balign 128
irq_lower_el_aarch64:
@@ -103,7 +103,7 @@ irqFirstLevelHandler:
BL irqHandler
B _tx_thread_context_restore
-
+
fiqFirstLevelHandler:
STP x29, x30, [sp, #-16]!
STP x18, x19, [sp, #-16]!
diff --git a/ports/cortex_a5x/ac6/example_build/sample_threadx/gic400_gic.c b/ports/cortex_a5x/ac6/example_build/sample_threadx/gic400_gic.c
index 1ecd5f33..d37d4c27 100644
--- a/ports/cortex_a5x/ac6/example_build/sample_threadx/gic400_gic.c
+++ b/ports/cortex_a5x/ac6/example_build/sample_threadx/gic400_gic.c
@@ -102,7 +102,7 @@ void enableIntID(unsigned int ID)
void disableIntID(unsigned int ID)
{
unsigned int bank;
-
+
bank = ID/32; // There are 32 IDs per register, need to work out which register to access
ID = ID & 0x1f; // ... and which bit within the register
@@ -136,7 +136,7 @@ unsigned int getIntPriority(unsigned int ID)
return 0;
return gic_dist->GICD_IPRIORITYR[ID];
-}
+}
// ------------------------------------------------------------
diff --git a/ports/cortex_a5x/ac6/example_build/sample_threadx/hw_setup.c b/ports/cortex_a5x/ac6/example_build/sample_threadx/hw_setup.c
index dc19cd3b..3f86523a 100644
--- a/ports/cortex_a5x/ac6/example_build/sample_threadx/hw_setup.c
+++ b/ports/cortex_a5x/ac6/example_build/sample_threadx/hw_setup.c
@@ -58,7 +58,7 @@ void hw_setup(void)
// NOTE:
// This code assumes that the IRQ and FIQ exceptions
- // have been routed to the appropriate EL. In this
+ // have been routed to the appropriate EL. In this
// example that is done in the startup.s file
}
diff --git a/ports/cortex_a5x/ac6/example_build/sample_threadx/sample_threadx.c b/ports/cortex_a5x/ac6/example_build/sample_threadx/sample_threadx.c
index db5318f0..3e4c45a5 100644
--- a/ports/cortex_a5x/ac6/example_build/sample_threadx/sample_threadx.c
+++ b/ports/cortex_a5x/ac6/example_build/sample_threadx/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -91,42 +91,42 @@ UCHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -134,23 +134,23 @@ UCHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -254,11 +254,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -317,7 +317,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -370,7 +370,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_a5x/ac6/example_build/sample_threadx/sample_threadx.txt b/ports/cortex_a5x/ac6/example_build/sample_threadx/sample_threadx.txt
index 90c80d28..6fb28be1 100644
--- a/ports/cortex_a5x/ac6/example_build/sample_threadx/sample_threadx.txt
+++ b/ports/cortex_a5x/ac6/example_build/sample_threadx/sample_threadx.txt
@@ -9,7 +9,7 @@ LOAD 0x80000000
{
* (+RW, +ZI)
}
-
+
ARM_LIB_STACKHEAP 0x80090000 EMPTY -0x00040000
{}
}
\ No newline at end of file
diff --git a/ports/cortex_a5x/ac6/example_build/sample_threadx/startup.S b/ports/cortex_a5x/ac6/example_build/sample_threadx/startup.S
index 8b1f8f3b..75ae62c8 100644
--- a/ports/cortex_a5x/ac6/example_build/sample_threadx/startup.S
+++ b/ports/cortex_a5x/ac6/example_build/sample_threadx/startup.S
@@ -99,7 +99,7 @@ start64:
MOV x28, #0
MOV x29, #0
MOV x30, #0
-
+
// Which core am I
// ----------------
MRS x0, MPIDR_EL1
@@ -109,20 +109,20 @@ sleep:
WFI
B sleep
boot:
-
+
// Disable trapping of CPTR_EL3 accesses or use of Adv.SIMD/FPU
// -------------------------------------------------------------
MOV x0, #0 // Clear all trap bits
MSR CPTR_EL3, x0
-
-
+
+
// Install vector table
// ---------------------
LDR x0, vector_table_address
MSR VBAR_EL3, x0
-
+
// Configure SCR_EL3
// ------------------
MOV w1, #0 // Initial value of register is unknown
diff --git a/ports/cortex_a5x/ac6/example_build/tx/.cproject b/ports/cortex_a5x/ac6/example_build/tx/.cproject
index 0bc69306..b3e80235 100644
--- a/ports/cortex_a5x/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a5x/ac6/example_build/tx/.cproject
@@ -1,140 +1,140 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a5x/ac6/inc/tx_port.h b/ports/cortex_a5x/ac6/inc/tx_port.h
index becdc1ff..c679690c 100644
--- a/ports/cortex_a5x/ac6/inc/tx_port.h
+++ b/ports/cortex_a5x/ac6/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-A5x/ARM */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-A5x/ARM */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -75,7 +67,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -122,19 +114,19 @@ typedef unsigned long long ALIGN_TYPE;
#define TX_TIMER_THREAD_STACK_SIZE 4096 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
#define TX_INT_ENABLE 0x00 /* Enable IRQ & FIQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -181,7 +173,7 @@ typedef unsigned long long ALIGN_TYPE;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -193,13 +185,13 @@ typedef unsigned long long ALIGN_TYPE;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_fp_enable;
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -213,11 +205,11 @@ typedef unsigned long long ALIGN_TYPE;
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -225,8 +217,8 @@ typedef unsigned long long ALIGN_TYPE;
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -253,8 +245,8 @@ typedef unsigned long long ALIGN_TYPE;
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef TX_DISABLE_INLINE
@@ -266,7 +258,7 @@ typedef unsigned long long ALIGN_TYPE;
/* Define the internal timer extension to also hold the thread pointer such that _tx_thread_timeout
can figure out what thread timeout to process. */
-
+
#define TX_TIMER_INTERNAL_EXTENSION VOID *tx_timer_internal_thread_timeout_ptr;
@@ -282,9 +274,9 @@ typedef unsigned long long ALIGN_TYPE;
#define TX_THREAD_TIMEOUT_POINTER_SETUP(t) (t) = (TX_THREAD *) _tx_timer_expired_timer_ptr -> tx_timer_internal_thread_timeout_ptr;
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -355,8 +347,8 @@ VOID tx_thread_fp_disable(VOID);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-A5x/ARM Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-A5x/ARM Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a5x/ac6/readme_threadx.txt b/ports/cortex_a5x/ac6/readme_threadx.txt
index c3de31bb..5e80754d 100644
--- a/ports/cortex_a5x/ac6/readme_threadx.txt
+++ b/ports/cortex_a5x/ac6/readme_threadx.txt
@@ -1,11 +1,11 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A5x
+ Microsoft's Azure RTOS ThreadX for Cortex-A5x
Using the ARM Compiler 6 & DS
-1. Open the Azure RTOS Workspace
+1. Open the Azure RTOS Workspace
-In order to build the ThreadX library and the ThreadX demonstration first load
-the Azure RTOS Workspace, which is located inside your ThreadX installation
+In order to build the ThreadX library and the ThreadX demonstration first load
+the Azure RTOS Workspace, which is located inside your ThreadX installation
directory.
Note: the workspace and projects were made using DS-5, so DS will prompt you
@@ -13,9 +13,9 @@ to migrate the projects. This is expected, so please do so.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply select the Eclipse project file
-"tx" and then select the build button. You should now observe the compilation
-and assembly of the ThreadX library. This project build produces the ThreadX
+Building the ThreadX library is easy; simply select the Eclipse project file
+"tx" and then select the build button. You should now observe the compilation
+and assembly of the ThreadX library. This project build produces the ThreadX
library file tx.a.
@@ -24,39 +24,39 @@ library file tx.a.
The ThreadX demonstration is designed to execute under the DS debugger on the
VE-AEMv8x1 Bare Metal simulator.
-Building the demonstration is easy; simply open the workspace file, select the
-sample_threadx project, and select the build button. Next, right-click on the
+Building the demonstration is easy; simply open the workspace file, select the
+sample_threadx project, and select the build button. Next, right-click on the
project and select "Debug As -> Debug Configurations". The debugger is setup
-for VE_AEMv8x1 Bare Metal Debug, so selecting "Debug" will launch the simulator,
-load the sample_threadx.axf ELF file and run to main. You are now ready to
+for VE_AEMv8x1 Bare Metal Debug, so selecting "Debug" will launch the simulator,
+load the sample_threadx.axf ELF file and run to main. You are now ready to
execute the ThreadX demonstration.
4. System Initialization
-The entry point in ThreadX for the Cortex-A5x using ARM tools is at label
-start64. This is defined within the ARM compiler's startup code. In addition,
-this is where all static and global pre-set C variable initialization processing
+The entry point in ThreadX for the Cortex-A5x using ARM tools is at label
+start64. This is defined within the ARM compiler's startup code. In addition,
+this is where all static and global pre-set C variable initialization processing
takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for determining the
-first available RAM address for use by the application, which is supplied as the
+The ThreadX tx_initialize_low_level.s file is responsible for determining the
+first available RAM address for use by the application, which is supplied as the
sole input parameter to your application definition function, tx_application_define.
5. Register Usage and Stack Frames
-The 64-bit ARM compiler assumes that registers x0-x18 are scratch registers
-for each function. All other registers used by a C function must be preserved
-by the function. ThreadX takes advantage of this in situations where a context
-switch happens as a result of making a ThreadX service call (which is itself a
-C function). In such cases, the saved context of a thread is only the
+The 64-bit ARM compiler assumes that registers x0-x18 are scratch registers
+for each function. All other registers used by a C function must be preserved
+by the function. ThreadX takes advantage of this in situations where a context
+switch happens as a result of making a ThreadX service call (which is itself a
+C function). In such cases, the saved context of a thread is only the
non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -75,10 +75,10 @@ FP not enabled and TX_THREAD.tx_thread_fp_enable == 0:
0x040 x22 x21
0x048 x23 x22
0x050 x20 x19
- 0x058 x21 x20
- 0x060 x18 x29
- 0x068 x19 x30
- 0x070 x16
+ 0x058 x21 x20
+ 0x060 x18 x29
+ 0x068 x19 x30
+ 0x070 x16
0x078 x17
0x080 x14
0x088 x15
@@ -97,7 +97,7 @@ FP not enabled and TX_THREAD.tx_thread_fp_enable == 0:
0x0F0 x0
0x0F8 x1
0x100 x29
- 0x108 x30
+ 0x108 x30
FP enabled and TX_THREAD.tx_thread_fp_enable == 1:
@@ -146,19 +146,19 @@ FP enabled and TX_THREAD.tx_thread_fp_enable == 1:
0x1F0 q3
0x200 q0
0x210 q1
- 0x220 x28
- 0x228 reserved
- 0x230 x26
- 0x238 x27
- 0x240 x24
- 0x248 x25
- 0x250 x22
- 0x258 x23
- 0x260 x20
- 0x268 x21
- 0x270 x18
- 0x278 x19
- 0x280 x16
+ 0x220 x28
+ 0x228 reserved
+ 0x230 x26
+ 0x238 x27
+ 0x240 x24
+ 0x248 x25
+ 0x250 x22
+ 0x258 x23
+ 0x260 x20
+ 0x268 x21
+ 0x270 x18
+ 0x278 x19
+ 0x280 x16
0x288 x17
0x290 x14
0x298 x15
@@ -177,20 +177,20 @@ FP enabled and TX_THREAD.tx_thread_fp_enable == 1:
0x300 x0
0x308 x1
0x310 x29
- 0x318 x30
+ 0x318 x30
6. Improving Performance
-The distribution version of ThreadX is built without any compiler optimizations.
-This makes it easy to debug because you can trace or set breakpoints inside of
-ThreadX itself. Of course, this costs some performance. To make it run faster,
+The distribution version of ThreadX is built without any compiler optimizations.
+This makes it easy to debug because you can trace or set breakpoints inside of
+ThreadX itself. Of course, this costs some performance. To make it run faster,
you can change the project settings to the desired compiler optimization level.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
@@ -210,22 +210,22 @@ irq_handler:
B _tx_thread_context_restore
-By default, ThreadX assumes EL3 level of execution. Running and taking exceptions in EL1
+By default, ThreadX assumes EL3 level of execution. Running and taking exceptions in EL1
and EL2 can be done by simply building the ThreadX library with either EL1 or EL2 defined.
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing, thread sleeps,
-timeouts, and application timers. Without such a timer interrupt source, these services
-are not functional. However, all other ThreadX services are operational without a
+ThreadX requires a periodic interrupt source to manage all time-slicing, thread sleeps,
+timeouts, and application timers. Without such a timer interrupt source, these services
+are not functional. However, all other ThreadX services are operational without a
periodic timer source.
9. ARM FP Support
By default, FP support is disabled for each thread. If saving the context of the FP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the FP usage:
void tx_thread_fp_enable(void);
diff --git a/ports/cortex_a5x/ac6/src/tx_initialize_low_level.S b/ports/cortex_a5x/ac6/src/tx_initialize_low_level.S
index a45da7c1..1b8d1d8d 100644
--- a/ports/cortex_a5x/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_a5x/ac6/src/tx_initialize_low_level.S
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Initialize */
/** */
@@ -34,45 +35,39 @@
.text
.align 3
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_initialize_low_level Cortex-A5x/ARM */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_initialize_low_level Cortex-A5x/ARM */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function is responsible for any low-level processor */
-/* initialization, including setting up interrupt vectors, setting */
-/* up a periodic timer interrupt source, saving the system stack */
-/* pointer for use in ISR processing later, and finding the first */
-/* available RAM memory address for tx_application_define. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_initialize_kernel_enter ThreadX entry function */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function is responsible for any low-level processor */
+/* initialization, including setting up interrupt vectors, setting */
+/* up a periodic timer interrupt source, saving the system stack */
+/* pointer for use in ISR processing later, and finding the first */
+/* available RAM memory address for tx_application_define. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
/**************************************************************************/
/* VOID _tx_initialize_low_level(VOID)
diff --git a/ports/cortex_a5x/ac6/src/tx_thread_context_restore.S b/ports/cortex_a5x/ac6/src/tx_thread_context_restore.S
index 35674a25..5220dc79 100644
--- a/ports/cortex_a5x/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a5x/ac6/src/tx_thread_context_restore.S
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Thread */
/** */
@@ -25,7 +26,7 @@
/* Include necessary system files. */
-/*
+/*
#include "tx_api.h"
#include "tx_thread.h"
#include "tx_timer.h"
@@ -35,44 +36,38 @@
.text
.align 3
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_thread_context_restore Cortex-A5x/ARM */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_context_restore Cortex-A5x/ARM */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function restores the interrupt context if it is processing a */
-/* nested interrupt. If not, it returns to the interrupt thread if no */
-/* preemption is necessary. Otherwise, if preemption is necessary or */
-/* if no thread was running, the function returns to the scheduler. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* _tx_thread_schedule Thread scheduling routine */
-/* */
-/* CALLED BY */
-/* */
-/* ISRs Interrupt Service Routines */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function restores the interrupt context if it is processing a */
+/* nested interrupt. If not, it returns to the interrupt thread if no */
+/* preemption is necessary. Otherwise, if preemption is necessary or */
+/* if no thread was running, the function returns to the scheduler. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* _tx_thread_schedule Thread scheduling routine */
+/* */
+/* CALLED BY */
+/* */
+/* ISRs Interrupt Service Routines */
/* */
/**************************************************************************/
/* VOID _tx_thread_context_restore(VOID)
@@ -99,13 +94,13 @@ _tx_thread_context_restore:
LDR x3, =_tx_thread_system_state // Pickup address of system state var
LDR w2, [x3, #0] // Pickup system state
SUB w2, w2, #1 // Decrement the counter
- STR w2, [x3, #0] // Store the counter
+ STR w2, [x3, #0] // Store the counter
CMP w2, #0 // Was this the first interrupt?
BEQ __tx_thread_not_nested_restore // If so, not a nested restore
/* Interrupts are nested. */
- /* Just recover the saved registers and return to the point of
+ /* Just recover the saved registers and return to the point of
interrupt. */
LDP x4, x5, [sp], #16 // Pickup saved SPSR/DAIF and ELR_EL
diff --git a/ports/cortex_a5x/ac6/src/tx_thread_context_save.S b/ports/cortex_a5x/ac6/src/tx_thread_context_save.S
index f1af864e..287e8fa3 100644
--- a/ports/cortex_a5x/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a5x/ac6/src/tx_thread_context_save.S
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Thread */
/** */
@@ -32,43 +33,37 @@
.text
.align 3
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_thread_context_save Cortex-A5x/ARM */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_context_save Cortex-A5x/ARM */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function saves the context of an executing thread in the */
-/* beginning of interrupt processing. The function also ensures that */
-/* the system stack is used upon return to the calling ISR. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function saves the context of an executing thread in the */
+/* beginning of interrupt processing. The function also ensures that */
+/* the system stack is used upon return to the calling ISR. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* ISRs */
/* */
/**************************************************************************/
/* VOID _tx_thread_context_save(VOID)
@@ -78,7 +73,7 @@
_tx_thread_context_save:
/* Upon entry to this routine, it is assumed that IRQ/FIQ interrupts are locked
- out, x29 (frame pointer), x30 (link register) are saved, we are in EL1,
+ out, x29 (frame pointer), x30 (link register) are saved, we are in EL1,
and all other registers are intact. */
/* Check for a nested interrupt condition. */
@@ -147,7 +142,7 @@ __tx_thread_not_nested_save:
LDR x1, =_tx_thread_current_ptr // Pickup address of current thread ptr
LDR x0, [x1, #0] // Pickup current thread pointer
CMP x0, #0 // Is it NULL?
- BEQ __tx_thread_idle_system_save // If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save // If so, interrupt occurred in
// scheduling loop - nothing needs saving!
/* Save minimal context of interrupted thread. */
@@ -196,7 +191,7 @@ __tx_thread_not_nested_save:
LDP x29, x30, [sp], #16 // Recover x29, x30
.endif
- RET // Return to caller
+ RET // Return to caller
/* }
else
@@ -206,7 +201,7 @@ __tx_thread_idle_system_save:
/* Interrupt occurred in the scheduling loop. */
- /* Not much to do here, just adjust the stack pointer, and return to IRQ
+ /* Not much to do here, just adjust the stack pointer, and return to IRQ
processing. */
.ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
@@ -219,7 +214,7 @@ __tx_thread_idle_system_save:
.endif
ADD sp, sp, #48 // Recover saved registers
- RET // Continue IRQ processing
+ RET // Continue IRQ processing
/* }
} */
diff --git a/ports/cortex_a5x/ac6/src/tx_thread_fp_disable.c b/ports/cortex_a5x/ac6/src/tx_thread_fp_disable.c
index e2a0f084..2e3c5c77 100644
--- a/ports/cortex_a5x/ac6/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a5x/ac6/src/tx_thread_fp_disable.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Thread */
/** */
@@ -28,41 +29,35 @@
#include "tx_thread.h"
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_thread_fp_disable Cortex-A5x/ARM */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_fp_disable Cortex-A5x/ARM */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function disables the FP for the currently executing thread. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function disables the FP for the currently executing thread. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
@@ -81,14 +76,14 @@ ULONG system_state;
/* Make sure it is not NULL. */
if (thread_ptr != TX_NULL)
{
-
+
/* Thread is running... make sure the call is from the thread context. */
if (system_state == 0)
{
-
+
/* Yes, now set the FP enable flag to false in the TX_THREAD structure. */
thread_ptr -> tx_thread_fp_enable = TX_FALSE;
}
}
-}
+}
diff --git a/ports/cortex_a5x/ac6/src/tx_thread_fp_enable.c b/ports/cortex_a5x/ac6/src/tx_thread_fp_enable.c
index 2da34265..ca589fe5 100644
--- a/ports/cortex_a5x/ac6/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a5x/ac6/src/tx_thread_fp_enable.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Thread */
/** */
@@ -28,41 +29,35 @@
#include "tx_thread.h"
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_thread_fp_enable Cortex-A5x/ARM */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_fp_enable Cortex-A5x/ARM */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function enabled the FP for the currently executing thread. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function enabled the FP for the currently executing thread. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
@@ -81,14 +76,14 @@ ULONG system_state;
/* Make sure it is not NULL. */
if (thread_ptr != TX_NULL)
{
-
+
/* Thread is running... make sure the call is from the thread context. */
if (system_state == 0)
{
-
+
/* Yes, now setup the FP enable flag in the TX_THREAD structure. */
thread_ptr -> tx_thread_fp_enable = TX_TRUE;
}
}
-}
+}
diff --git a/ports/cortex_a5x/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a5x/ac6/src/tx_thread_interrupt_control.S
index 8eff07d9..264850df 100644
--- a/ports/cortex_a5x/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a5x/ac6/src/tx_thread_interrupt_control.S
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Thread */
/** */
@@ -31,42 +32,36 @@
.text
.align 3
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_thread_interrupt_control Cortex-A5x/ARM */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_interrupt_control Cortex-A5x/ARM */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function is responsible for changing the interrupt lockout */
-/* posture of the system. */
-/* */
-/* INPUT */
-/* */
-/* new_posture New interrupt lockout posture */
-/* */
-/* OUTPUT */
-/* */
-/* old_posture Old interrupt lockout posture */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function is responsible for changing the interrupt lockout */
+/* posture of the system. */
+/* */
+/* INPUT */
+/* */
+/* new_posture New interrupt lockout posture */
+/* */
+/* OUTPUT */
+/* */
+/* old_posture Old interrupt lockout posture */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
/* */
/**************************************************************************/
/* UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/cortex_a5x/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a5x/ac6/src/tx_thread_interrupt_disable.S
index 01ea803c..7c4f6a7b 100644
--- a/ports/cortex_a5x/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a5x/ac6/src/tx_thread_interrupt_disable.S
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Thread */
/** */
@@ -31,41 +32,35 @@
.text
.align 3
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_thread_interrupt_disable Cortex-A5x/ARM */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_interrupt_disable Cortex-A5x/ARM */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function is responsible for disabling interrupts */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* old_posture Old interrupt lockout posture */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function is responsible for disabling interrupts */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* old_posture Old interrupt lockout posture */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
/* */
/**************************************************************************/
/* UINT _tx_thread_interrupt_disable(void)
diff --git a/ports/cortex_a5x/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a5x/ac6/src/tx_thread_interrupt_restore.S
index 7160f4f0..83b916a7 100644
--- a/ports/cortex_a5x/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a5x/ac6/src/tx_thread_interrupt_restore.S
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Thread */
/** */
@@ -31,42 +32,36 @@
.text
.align 3
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_thread_interrupt_restore Cortex-A5x/ARM */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_interrupt_restore Cortex-A5x/ARM */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function is responsible for restoring interrupts to the state */
/* returned by a previous _tx_thread_interrupt_disable call. */
-/* */
-/* INPUT */
-/* */
-/* old_posture Old interrupt lockout posture */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* INPUT */
+/* */
+/* old_posture Old interrupt lockout posture */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
/* */
/**************************************************************************/
/* UINT _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/cortex_a5x/ac6/src/tx_thread_schedule.S b/ports/cortex_a5x/ac6/src/tx_thread_schedule.S
index 42bd0e4f..5651ad12 100644
--- a/ports/cortex_a5x/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a5x/ac6/src/tx_thread_schedule.S
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Thread */
/** */
@@ -35,45 +36,39 @@
.text
.align 3
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_thread_schedule Cortex-A5x/ARM */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_schedule Cortex-A5x/ARM */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function waits for a thread control block pointer to appear in */
-/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-/* in the variable, the corresponding thread is resumed. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_initialize_kernel_enter ThreadX entry function */
-/* _tx_thread_system_return Return to system from thread */
-/* _tx_thread_context_restore Restore thread's context */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function waits for a thread control block pointer to appear in */
+/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+/* in the variable, the corresponding thread is resumed. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_initialize_kernel_enter ThreadX entry function */
+/* _tx_thread_system_return Return to system from thread */
+/* _tx_thread_context_restore Restore thread's context */
/* */
/**************************************************************************/
/* VOID _tx_thread_schedule(VOID)
@@ -89,15 +84,15 @@ _tx_thread_schedule:
/* Wait for a thread to execute. */
/* do
{ */
-
+
LDR x1, =_tx_thread_execute_ptr // Address of thread execute ptr
.ifdef TX_ENABLE_WFI
__tx_thread_schedule_loop:
LDR x0, [x1, #0] // Pickup next thread to execute
CMP x0, #0 // Is it NULL?
- BNE _tx_thread_schedule_thread //
- WFI //
+ BNE _tx_thread_schedule_thread //
+ WFI //
B __tx_thread_schedule_loop // Keep looking for a thread
_tx_thread_schedule_thread:
.else
@@ -109,7 +104,7 @@ __tx_thread_schedule_loop:
/* }
while(_tx_thread_execute_ptr == TX_NULL); */
-
+
/* Yes! We have a thread to execute. Lockout interrupts and
transfer control to it. */
@@ -118,7 +113,7 @@ __tx_thread_schedule_loop:
/* Setup the current thread pointer. */
/* _tx_thread_current_ptr = _tx_thread_execute_ptr; */
- LDR x1, =_tx_thread_current_ptr // Pickup address of current thread
+ LDR x1, =_tx_thread_current_ptr // Pickup address of current thread
STR x0, [x1, #0] // Setup current thread pointer
/* Increment the run count for this thread. */
@@ -132,7 +127,7 @@ __tx_thread_schedule_loop:
/* Setup time-slice, if present. */
/* _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice; */
- LDR x2, =_tx_timer_time_slice // Pickup address of time slice
+ LDR x2, =_tx_timer_time_slice // Pickup address of time slice
// variable
LDR x4, [x0, #8] // Switch stack pointers
MOV sp, x4 //
@@ -233,7 +228,8 @@ _skip_solicited_fp_restore:
LDP x19, x20, [sp], #16 // Recover x19, x20
LDP x29, x30, [sp], #16 // Recover x29, x30
MSR DAIF, x4 // Recover DAIF
- RET // Return to caller
+ RET // Return to caller
/* } */
+
diff --git a/ports/cortex_a5x/ac6/src/tx_thread_stack_build.S b/ports/cortex_a5x/ac6/src/tx_thread_stack_build.S
index ca9f34b3..f4a0bdb5 100644
--- a/ports/cortex_a5x/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a5x/ac6/src/tx_thread_stack_build.S
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Thread */
/** */
@@ -33,44 +34,38 @@
.text
.align 3
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_thread_stack_build Cortex-A5x/ARM */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_stack_build Cortex-A5x/ARM */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function builds a stack frame on the supplied thread's stack. */
/* The stack frame results in a fake interrupt return to the supplied */
-/* function pointer. */
-/* */
-/* INPUT */
-/* */
+/* function pointer. */
+/* */
+/* INPUT */
+/* */
/* thread_ptr Pointer to thread control blk */
/* function_ptr Pointer to return function */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_thread_create Create thread service */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_thread_create Create thread service */
/* */
/**************************************************************************/
/* VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -79,10 +74,10 @@
.type _tx_thread_stack_build, @function
_tx_thread_stack_build:
-
+
/* Build a fake interrupt frame. The form of the fake interrupt stack
on the Cortex-A5x should look like the following after it is built:
-
+
Stack Top: SSPR Initial SSPR
ELR Point of interrupt
x28 Initial value for x28
@@ -128,7 +123,7 @@ _tx_thread_stack_build:
MOV x2, #0 // Build clear value
MOV x3, #0 //
-
+
STP x2, x3, [x4, #-16]! // Set backtrace to 0
STP x2, x3, [x4, #-16]! // Set initial x29, x30
STP x2, x3, [x4, #-16]! // Set initial x0, x1
diff --git a/ports/cortex_a5x/ac6/src/tx_thread_system_return.S b/ports/cortex_a5x/ac6/src/tx_thread_system_return.S
index 45f88be6..bc4a6306 100644
--- a/ports/cortex_a5x/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a5x/ac6/src/tx_thread_system_return.S
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Thread */
/** */
@@ -34,44 +35,38 @@
.text
.align 3
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_thread_system_return Cortex-A5x/ARM */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_system_return Cortex-A5x/ARM */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function is target processor specific. It is used to transfer */
-/* control from a thread back to the ThreadX system. Only a */
-/* minimal context is saved since the compiler assumes temp registers */
-/* are going to get slicked by a function call anyway. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* _tx_thread_schedule Thread scheduling loop */
-/* */
-/* CALLED BY */
-/* */
-/* ThreadX components */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function is target processor specific. It is used to transfer */
+/* control from a thread back to the ThreadX system. Only a */
+/* minimal context is saved since the compiler assumes temp registers */
+/* are going to get slicked by a function call anyway. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* _tx_thread_schedule Thread scheduling loop */
+/* */
+/* CALLED BY */
+/* */
+/* ThreadX components */
/* */
/**************************************************************************/
/* VOID _tx_thread_system_return(VOID)
diff --git a/ports/cortex_a5x/ac6/src/tx_timer_interrupt.S b/ports/cortex_a5x/ac6/src/tx_timer_interrupt.S
index f6452182..8d1cdf73 100644
--- a/ports/cortex_a5x/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a5x/ac6/src/tx_timer_interrupt.S
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Timer */
/** */
@@ -32,46 +33,40 @@
.text
.align 3
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_timer_interrupt Cortex-A5x/ARM */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_timer_interrupt Cortex-A5x/ARM */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function processes the hardware timer interrupt. This */
-/* processing includes incrementing the system clock and checking for */
-/* time slice and/or timer expiration. If either is found, the */
-/* interrupt context save/restore functions are called along with the */
-/* expiration functions. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* _tx_timer_expiration_process Timer expiration processing */
-/* _tx_thread_time_slice Time slice interrupted thread */
-/* */
-/* CALLED BY */
-/* */
-/* interrupt vector */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function processes the hardware timer interrupt. This */
+/* processing includes incrementing the system clock and checking for */
+/* time slice and/or timer expiration. If either is found, the */
+/* interrupt context save/restore functions are called along with the */
+/* expiration functions. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* _tx_timer_expiration_process Timer expiration processing */
+/* _tx_thread_time_slice Time slice interrupted thread */
+/* */
+/* CALLED BY */
+/* */
+/* interrupt vector */
/* */
/**************************************************************************/
/* VOID _tx_timer_interrupt(VOID)
@@ -96,7 +91,7 @@ _tx_timer_interrupt:
/* if (_tx_timer_time_slice)
{ */
- LDR x3, =_tx_timer_time_slice // Pickup address of time-slice
+ LDR x3, =_tx_timer_time_slice // Pickup address of time-slice
LDR w2, [x3, #0] // Pickup time-slice
CMP w2, #0 // Is it non-active?
BEQ __tx_timer_no_time_slice // Yes, skip time-slice processing
@@ -213,7 +208,7 @@ __tx_timer_dont_activate:
/* if (_tx_timer_expired_time_slice)
{ */
- LDR x3, =_tx_timer_expired_time_slice // Pickup addr of time-slice expired
+ LDR x3, =_tx_timer_expired_time_slice // Pickup addr of time-slice expired
LDR w2, [x3, #0] // Pickup the actual flag
CMP w2, #0 // See if the flag is set
BEQ __tx_timer_not_ts_expiration // No, skip time-slice processing
diff --git a/ports/cortex_a65/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a65/ac6/example_build/sample_threadx/.cproject
index a74327d6..04033b8b 100644
--- a/ports/cortex_a65/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a65/ac6/example_build/sample_threadx/.cproject
@@ -1,158 +1,158 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a65/ac6/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a65/ac6/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a65/ac6/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a65/ac6/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a65/ac6/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a65/ac6/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a65/ac6/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a65/ac6/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a65/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a65/ac6/example_build/sample_threadx/sample_threadx.scat
index e5783c7c..d8dfde69 100644
--- a/ports/cortex_a65/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a65/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -2,7 +2,7 @@
; Scatter file for Armv8-A Startup code on FVP Base model
; Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;********************************************************
@@ -25,7 +25,7 @@ LOAD 0x80000000
; in source code for this to work correctly
;
ARM_LIB_HEAP +0 ALIGN 64 EMPTY 0xA0000 {}
-
+
;
; Handler stacks for all CPUs
; All stacks and heap are aligned to a cache-line boundary
diff --git a/ports/cortex_a65/ac6/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a65/ac6/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a65/ac6/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a65/ac6/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a65/ac6/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a65/ac6/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a65/ac6/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a65/ac6/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a65/ac6/example_build/tx/.cproject b/ports/cortex_a65/ac6/example_build/tx/.cproject
index 033932c0..8d6f8851 100644
--- a/ports/cortex_a65/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a65/ac6/example_build/tx/.cproject
@@ -1,148 +1,148 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a65/ac6/inc/tx_port.h b/ports/cortex_a65/ac6/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a65/ac6/inc/tx_port.h
+++ b/ports/cortex_a65/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a65/ac6/src/tx_initialize_low_level.S b/ports/cortex_a65/ac6/src/tx_initialize_low_level.S
index f456574e..7d2a4be3 100644
--- a/ports/cortex_a65/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_a65/ac6/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_a65/ac6/src/tx_thread_context_restore.S b/ports/cortex_a65/ac6/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a65/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a65/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a65/ac6/src/tx_thread_context_save.S b/ports/cortex_a65/ac6/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a65/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a65/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a65/ac6/src/tx_thread_fp_disable.c b/ports/cortex_a65/ac6/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a65/ac6/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a65/ac6/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a65/ac6/src/tx_thread_fp_enable.c b/ports/cortex_a65/ac6/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a65/ac6/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a65/ac6/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a65/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a65/ac6/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a65/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a65/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a65/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a65/ac6/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a65/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a65/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a65/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a65/ac6/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a65/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a65/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a65/ac6/src/tx_thread_schedule.S b/ports/cortex_a65/ac6/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a65/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a65/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a65/ac6/src/tx_thread_stack_build.S b/ports/cortex_a65/ac6/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a65/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a65/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a65/ac6/src/tx_thread_system_return.S b/ports/cortex_a65/ac6/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a65/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a65/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a65/ac6/src/tx_timer_interrupt.S b/ports/cortex_a65/ac6/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a65/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a65/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a65/gnu/example_build/sample_threadx/.cproject b/ports/cortex_a65/gnu/example_build/sample_threadx/.cproject
index 1c32cb32..40d4912d 100644
--- a/ports/cortex_a65/gnu/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a65/gnu/example_build/sample_threadx/.cproject
@@ -1,170 +1,170 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a65/gnu/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a65/gnu/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a65/gnu/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a65/gnu/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a65/gnu/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a65/gnu/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a65/gnu/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a65/gnu/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a65/gnu/example_build/sample_threadx/sample_threadx.ld b/ports/cortex_a65/gnu/example_build/sample_threadx/sample_threadx.ld
index eec8f12b..3bf47736 100644
--- a/ports/cortex_a65/gnu/example_build/sample_threadx/sample_threadx.ld
+++ b/ports/cortex_a65/gnu/example_build/sample_threadx/sample_threadx.ld
@@ -1,7 +1,7 @@
/* Linker script to place sections and symbol values.
* It references following symbols, which must be defined in code:
* start64 : Entry point
- *
+ *
* It defines following symbols, which code can use without definition:
* __cs3_peripherals
* __code_start
diff --git a/ports/cortex_a65/gnu/example_build/sample_threadx/startup.S b/ports/cortex_a65/gnu/example_build/sample_threadx/startup.S
index b71b45f8..b44806fe 100644
--- a/ports/cortex_a65/gnu/example_build/sample_threadx/startup.S
+++ b/ports/cortex_a65/gnu/example_build/sample_threadx/startup.S
@@ -328,7 +328,7 @@ el1_entry_aarch64:
//
// Cortex-A processors automatically invalidate their caches on reset
// (unless suppressed with the DBGL1RSTDISABLE or L2RSTDISABLE pins).
- // It is therefore not necessary for software to invalidate the caches
+ // It is therefore not necessary for software to invalidate the caches
// on startup, however, this is done here in case of a warm reset.
bl InvalidateUDCaches
tlbi VMALLE1
diff --git a/ports/cortex_a65/gnu/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a65/gnu/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a65/gnu/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a65/gnu/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a65/gnu/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a65/gnu/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a65/gnu/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a65/gnu/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a65/gnu/example_build/tx/.cproject b/ports/cortex_a65/gnu/example_build/tx/.cproject
index f1b8ed5b..9e5a975e 100644
--- a/ports/cortex_a65/gnu/example_build/tx/.cproject
+++ b/ports/cortex_a65/gnu/example_build/tx/.cproject
@@ -1,164 +1,164 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a65/gnu/inc/tx_port.h b/ports/cortex_a65/gnu/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a65/gnu/inc/tx_port.h
+++ b/ports/cortex_a65/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a65/gnu/src/tx_initialize_low_level.S b/ports/cortex_a65/gnu/src/tx_initialize_low_level.S
index 3dce3cea..3025f12b 100644
--- a/ports/cortex_a65/gnu/src/tx_initialize_low_level.S
+++ b/ports/cortex_a65/gnu/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
@@ -99,4 +89,4 @@ _tx_initialize_low_level:
/* Done, return to caller. */
RET // Return to caller
-// }
+// }
diff --git a/ports/cortex_a65/gnu/src/tx_thread_context_restore.S b/ports/cortex_a65/gnu/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a65/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a65/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a65/gnu/src/tx_thread_context_save.S b/ports/cortex_a65/gnu/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a65/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a65/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a65/gnu/src/tx_thread_fp_disable.c b/ports/cortex_a65/gnu/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a65/gnu/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a65/gnu/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a65/gnu/src/tx_thread_fp_enable.c b/ports/cortex_a65/gnu/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a65/gnu/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a65/gnu/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a65/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a65/gnu/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a65/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a65/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a65/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a65/gnu/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a65/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a65/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a65/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a65/gnu/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a65/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a65/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a65/gnu/src/tx_thread_schedule.S b/ports/cortex_a65/gnu/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a65/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a65/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a65/gnu/src/tx_thread_stack_build.S b/ports/cortex_a65/gnu/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a65/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a65/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a65/gnu/src/tx_thread_system_return.S b/ports/cortex_a65/gnu/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a65/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a65/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a65/gnu/src/tx_timer_interrupt.S b/ports/cortex_a65/gnu/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a65/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a65/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a65ae/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a65ae/ac6/example_build/sample_threadx/.cproject
index d2474a55..f0ea3c70 100644
--- a/ports/cortex_a65ae/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a65ae/ac6/example_build/sample_threadx/.cproject
@@ -1,158 +1,158 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a65ae/ac6/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a65ae/ac6/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a65ae/ac6/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a65ae/ac6/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a65ae/ac6/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a65ae/ac6/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a65ae/ac6/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a65ae/ac6/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a65ae/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a65ae/ac6/example_build/sample_threadx/sample_threadx.scat
index e5783c7c..d8dfde69 100644
--- a/ports/cortex_a65ae/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a65ae/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -2,7 +2,7 @@
; Scatter file for Armv8-A Startup code on FVP Base model
; Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;********************************************************
@@ -25,7 +25,7 @@ LOAD 0x80000000
; in source code for this to work correctly
;
ARM_LIB_HEAP +0 ALIGN 64 EMPTY 0xA0000 {}
-
+
;
; Handler stacks for all CPUs
; All stacks and heap are aligned to a cache-line boundary
diff --git a/ports/cortex_a65ae/ac6/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a65ae/ac6/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a65ae/ac6/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a65ae/ac6/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a65ae/ac6/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a65ae/ac6/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a65ae/ac6/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a65ae/ac6/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a65ae/ac6/example_build/tx/.cproject b/ports/cortex_a65ae/ac6/example_build/tx/.cproject
index bbfb6933..184e9a0f 100644
--- a/ports/cortex_a65ae/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a65ae/ac6/example_build/tx/.cproject
@@ -1,148 +1,148 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a65ae/ac6/inc/tx_port.h b/ports/cortex_a65ae/ac6/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a65ae/ac6/inc/tx_port.h
+++ b/ports/cortex_a65ae/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a65ae/ac6/src/tx_initialize_low_level.S b/ports/cortex_a65ae/ac6/src/tx_initialize_low_level.S
index f456574e..7d2a4be3 100644
--- a/ports/cortex_a65ae/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_a65ae/ac6/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_a65ae/ac6/src/tx_thread_context_restore.S b/ports/cortex_a65ae/ac6/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a65ae/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a65ae/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a65ae/ac6/src/tx_thread_context_save.S b/ports/cortex_a65ae/ac6/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a65ae/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a65ae/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a65ae/ac6/src/tx_thread_fp_disable.c b/ports/cortex_a65ae/ac6/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a65ae/ac6/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a65ae/ac6/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a65ae/ac6/src/tx_thread_fp_enable.c b/ports/cortex_a65ae/ac6/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a65ae/ac6/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a65ae/ac6/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a65ae/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a65ae/ac6/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a65ae/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a65ae/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a65ae/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a65ae/ac6/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a65ae/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a65ae/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a65ae/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a65ae/ac6/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a65ae/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a65ae/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a65ae/ac6/src/tx_thread_schedule.S b/ports/cortex_a65ae/ac6/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a65ae/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a65ae/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a65ae/ac6/src/tx_thread_stack_build.S b/ports/cortex_a65ae/ac6/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a65ae/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a65ae/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a65ae/ac6/src/tx_thread_system_return.S b/ports/cortex_a65ae/ac6/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a65ae/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a65ae/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a65ae/ac6/src/tx_timer_interrupt.S b/ports/cortex_a65ae/ac6/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a65ae/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a65ae/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a65ae/gnu/example_build/sample_threadx/.cproject b/ports/cortex_a65ae/gnu/example_build/sample_threadx/.cproject
index 1c32cb32..40d4912d 100644
--- a/ports/cortex_a65ae/gnu/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a65ae/gnu/example_build/sample_threadx/.cproject
@@ -1,170 +1,170 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a65ae/gnu/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a65ae/gnu/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a65ae/gnu/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a65ae/gnu/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a65ae/gnu/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a65ae/gnu/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a65ae/gnu/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a65ae/gnu/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a65ae/gnu/example_build/sample_threadx/sample_threadx.ld b/ports/cortex_a65ae/gnu/example_build/sample_threadx/sample_threadx.ld
index eec8f12b..3bf47736 100644
--- a/ports/cortex_a65ae/gnu/example_build/sample_threadx/sample_threadx.ld
+++ b/ports/cortex_a65ae/gnu/example_build/sample_threadx/sample_threadx.ld
@@ -1,7 +1,7 @@
/* Linker script to place sections and symbol values.
* It references following symbols, which must be defined in code:
* start64 : Entry point
- *
+ *
* It defines following symbols, which code can use without definition:
* __cs3_peripherals
* __code_start
diff --git a/ports/cortex_a65ae/gnu/example_build/sample_threadx/startup.S b/ports/cortex_a65ae/gnu/example_build/sample_threadx/startup.S
index b71b45f8..b44806fe 100644
--- a/ports/cortex_a65ae/gnu/example_build/sample_threadx/startup.S
+++ b/ports/cortex_a65ae/gnu/example_build/sample_threadx/startup.S
@@ -328,7 +328,7 @@ el1_entry_aarch64:
//
// Cortex-A processors automatically invalidate their caches on reset
// (unless suppressed with the DBGL1RSTDISABLE or L2RSTDISABLE pins).
- // It is therefore not necessary for software to invalidate the caches
+ // It is therefore not necessary for software to invalidate the caches
// on startup, however, this is done here in case of a warm reset.
bl InvalidateUDCaches
tlbi VMALLE1
diff --git a/ports/cortex_a65ae/gnu/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a65ae/gnu/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a65ae/gnu/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a65ae/gnu/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a65ae/gnu/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a65ae/gnu/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a65ae/gnu/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a65ae/gnu/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a65ae/gnu/example_build/tx/.cproject b/ports/cortex_a65ae/gnu/example_build/tx/.cproject
index f1b8ed5b..9e5a975e 100644
--- a/ports/cortex_a65ae/gnu/example_build/tx/.cproject
+++ b/ports/cortex_a65ae/gnu/example_build/tx/.cproject
@@ -1,164 +1,164 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a65ae/gnu/inc/tx_port.h b/ports/cortex_a65ae/gnu/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a65ae/gnu/inc/tx_port.h
+++ b/ports/cortex_a65ae/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a65ae/gnu/src/tx_initialize_low_level.S b/ports/cortex_a65ae/gnu/src/tx_initialize_low_level.S
index 3dce3cea..3025f12b 100644
--- a/ports/cortex_a65ae/gnu/src/tx_initialize_low_level.S
+++ b/ports/cortex_a65ae/gnu/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
@@ -99,4 +89,4 @@ _tx_initialize_low_level:
/* Done, return to caller. */
RET // Return to caller
-// }
+// }
diff --git a/ports/cortex_a65ae/gnu/src/tx_thread_context_restore.S b/ports/cortex_a65ae/gnu/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a65ae/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a65ae/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a65ae/gnu/src/tx_thread_context_save.S b/ports/cortex_a65ae/gnu/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a65ae/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a65ae/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a65ae/gnu/src/tx_thread_fp_disable.c b/ports/cortex_a65ae/gnu/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a65ae/gnu/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a65ae/gnu/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a65ae/gnu/src/tx_thread_fp_enable.c b/ports/cortex_a65ae/gnu/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a65ae/gnu/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a65ae/gnu/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a65ae/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a65ae/gnu/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a65ae/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a65ae/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a65ae/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a65ae/gnu/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a65ae/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a65ae/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a65ae/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a65ae/gnu/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a65ae/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a65ae/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a65ae/gnu/src/tx_thread_schedule.S b/ports/cortex_a65ae/gnu/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a65ae/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a65ae/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a65ae/gnu/src/tx_thread_stack_build.S b/ports/cortex_a65ae/gnu/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a65ae/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a65ae/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a65ae/gnu/src/tx_thread_system_return.S b/ports/cortex_a65ae/gnu/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a65ae/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a65ae/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a65ae/gnu/src/tx_timer_interrupt.S b/ports/cortex_a65ae/gnu/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a65ae/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a65ae/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a7/ac5/example_build/sample_threadx.c b/ports/cortex_a7/ac5/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/cortex_a7/ac5/example_build/sample_threadx.c
+++ b/ports/cortex_a7/ac5/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_a7/ac5/example_build/tx_initialize_low_level.s b/ports/cortex_a7/ac5/example_build/tx_initialize_low_level.s
index 22770ae1..49ce6c77 100644
--- a/ports/cortex_a7/ac5/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_a7/ac5/example_build/tx_initialize_low_level.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -110,45 +110,39 @@ Reset_Vector
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -199,7 +193,7 @@ _tx_initialize_low_level
; _tx_thread_system_stack_ptr = (VOID_PTR) (sp);
;
LDR r1, =_tx_thread_system_stack_ptr ; Pickup address of system stack ptr
- LDR r0, [r1, #0] ; Pickup system stack
+ LDR r0, [r1, #0] ; Pickup system stack
ADD r0, r0, #4 ; Increment to next free word
;
; /* Save the first available memory address. */
@@ -221,7 +215,7 @@ _tx_initialize_low_level
;
;
;/* Define initial heap/stack routine for the ARM RealView (and ADS) startup code. This
-; routine will set the initial stack to use the ThreadX IRQ & FIQ &
+; routine will set the initial stack to use the ThreadX IRQ & FIQ &
; (optionally SYS) stack areas. */
;
EXPORT __user_initial_stackheap
@@ -273,7 +267,7 @@ __tx_reserved_handler
;
;
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -281,21 +275,21 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
BL _tx_timer_interrupt ; Timer interrupt handler
_tx_not_timer_interrupt
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -305,7 +299,7 @@ _tx_not_timer_interrupt
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -321,28 +315,28 @@ _tx_not_timer_interrupt
__tx_example_vectored_irq_handler
;
;
-; /* Save initial context and call context save to prepare for
+; /* Save initial context and call context save to prepare for
; vectored ISR execution. */
;
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
; BL _tx_thread_vectored_context_save ; Vectored context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -351,7 +345,7 @@ __tx_example_vectored_irq_handler
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
@@ -373,11 +367,11 @@ __tx_fiq_processing_return
; /* At this point execution is still in the FIQ mode. The CPSR, point of
; interrupt, and all C scratch registers are available for use. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
; from FIQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with FIQ interrupts enabled.
+; system mode and returns with FIQ interrupts enabled.
;
-; NOTE: It is very important to ensure all FIQ interrupts are cleared
+; NOTE: It is very important to ensure all FIQ interrupts are cleared
; prior to enabling nested FIQ interrupts. */
IF :DEF:TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/cortex_a7/ac5/inc/tx_port.h b/ports/cortex_a7/ac5/inc/tx_port.h
index a68dd9d7..088fc91f 100644
--- a/ports/cortex_a7/ac5/inc/tx_port.h
+++ b/ports/cortex_a7/ac5/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-A7/AC5 */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-A7/AC5 */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -75,7 +67,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -111,12 +103,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -126,8 +118,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -174,7 +166,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -186,13 +178,13 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable;
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -206,11 +198,11 @@ typedef unsigned short USHORT;
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -218,8 +210,8 @@ typedef unsigned short USHORT;
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -246,21 +238,21 @@ typedef unsigned short USHORT;
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef __thumb
-
+
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (ULONG) __clz((unsigned int) m); \
- b = 31 - b;
+ b = 31 - b;
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -280,7 +272,7 @@ typedef unsigned short USHORT;
{ \
__enable_irq(); \
__enable_fiq(); \
- }
+ }
#else
@@ -289,7 +281,7 @@ typedef unsigned short USHORT;
#define TX_RESTORE if (!interrupt_save_disabled) \
{ \
__enable_irq(); \
- }
+ }
#endif
#else
@@ -325,8 +317,8 @@ void tx_thread_vfp_disable(void);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-A7/AC5 Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-A7/AC5 Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a7/ac5/readme_threadx.txt b/ports/cortex_a7/ac5/readme_threadx.txt
index 347a5ec9..9ebf1f2c 100644
--- a/ports/cortex_a7/ac5/readme_threadx.txt
+++ b/ports/cortex_a7/ac5/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A7
+ Microsoft's Azure RTOS ThreadX for Cortex-A7
Thumb & 32-bit Mode
@@ -6,20 +6,20 @@
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the AC5
-Compiler. At this point you may run the build_threadx.bat batch file. This will
-build the ThreadX run-time environment in the "example_build" directory.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the AC5
+Compiler. At this point you may run the build_threadx.bat batch file. This will
+build the ThreadX run-time environment in the "example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
1.1 Building with Project Files
-The ThreadX library can also be built via project files. Simply open
-the tx.mcp file with project builder and select make. This will place
+The ThreadX library can also be built via project files. Simply open
+the tx.mcp file with project builder and select make. This will place
the tx.a library file into the Debug sub-directory.
@@ -28,45 +28,45 @@ the tx.a library file into the Debug sub-directory.
The ThreadX demonstration is designed to execute under the ARM
Windows-based simulator.
-Building the demonstration is easy; simply execute the build_threadx_sample.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_sample.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.axf
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.axf
is a binary file that can be downloaded and executed on the ARM simulator.
2.0.1 Building with Project Files
-The ThreadX demonstration can also be built via project files. Simply open
-the sample_threadx.mcp file with project builder and select make. This will place
+The ThreadX demonstration can also be built via project files. Simply open
+the sample_threadx.mcp file with project builder and select make. This will place
the sample_threadx.axf output image into the Debug sub-directory.
3. System Initialization
-The entry point in ThreadX for the Cortex-A7 using AC5 tools is at label
-__main. This is defined within the AC5 compiler's startup code. In
-addition, this is where all static and global pre-set C variable
+The entry point in ThreadX for the Cortex-A7 using AC5 tools is at label
+__main. This is defined within the AC5 compiler's startup code. In
+addition, this is where all static and global pre-set C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source. By default, the vector area is defined to be located in the Init area,
-which is defined at the top of tx_initialize_low_level.s. This area is typically
-located at 0. In situations where this is impossible, the vectors at the beginning
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source. By default, the vector area is defined to be located in the Init area,
+which is defined at the top of tx_initialize_low_level.s. This area is typically
+located at 0. In situations where this is impossible, the vectors at the beginning
of the Init area should be copied to address 0.
This is also where initialization of a periodic timer interrupt source
should take place.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
4. Assembler / Compiler Switches
-The following are compiler switches used in building the demonstration
+The following are compiler switches used in building the demonstration
system:
Compiler Switch Meaning
@@ -82,10 +82,10 @@ Linker Switch Meaning
-o demo.axf Specifies demo output file name
--elf Specifies elf output file format
--ro Specifies that Read-Only memory starts at address 0
- --first tx_initialize_low_level.o(Init)
+ --first tx_initialize_low_level.o(Init)
Specifies that the first area loaded is Init
--remove Remove unused areas
- --list Specifies map file name
+ --list Specifies map file name
--symbols Specifies symbols for map file
--map Creates a map file
@@ -96,161 +96,161 @@ Application Defines
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
--PD "TX_ENABLE_IRQ_NESTING SETL {TRUE}" This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s.
--PD "TX_ENABLE_FIQ_NESTING SETL {TRUE}" This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s. In addition,
IRQ nesting should also be enabled.
-DTX_ENABLE_FIQ_SUPPORT This compiler define enables FIQ
interrupt handling in the ThreadX
- generic C source. This define
+ generic C source. This define
should also be used in conjunction
with the corresponding assembler
- define.
+ define.
-DTX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- -DTX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ -DTX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- -DTX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ -DTX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- -DTX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ -DTX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- -DTX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ -DTX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- -DTX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ -DTX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- -DTX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ -DTX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- -DTX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ -DTX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- -DTX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ -DTX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- -DTX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ -DTX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- -DTX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ -DTX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- -DTX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ -DTX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- -DTX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ -DTX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- -DTX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ -DTX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- -DTX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ -DTX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- -DTX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ -DTX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- -DTX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ -DTX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- -DTX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ -DTX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- -DTX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ -DTX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- -DTX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ -DTX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
-DTX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- -DTX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ -DTX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- -DTX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ -DTX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
5. Register Usage and Stack Frames
-The AC5 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The AC5 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -268,39 +268,39 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
-performance. To make it run faster, you can change the build_threadx.bat file to
-remove the -g option and enable all compiler optimizations.
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
+performance. To make it run faster, you can change the build_threadx.bat file to
+remove the -g option and enable all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A7
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A7 vectors start at address zero. The demonstration system startup
-Init area contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+Init area contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -311,12 +311,12 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -324,7 +324,7 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -337,7 +337,7 @@ __tx_irq_processing_return
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.s:
EXPORT __tx_irq_example_handler
@@ -347,12 +347,12 @@ __tx_irq_example_handler
STMDB sp!, {r0-r3} ; Save some scratch registers
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
BL _tx_thread_vectored_context_save ; Call the vectored IRQ context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -369,22 +369,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested IRQ interrupts are no longer required,
calling the _tx_thread_irq_nesting_end service disables nesting by disabling
-IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
+IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -392,10 +392,10 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* Enable nested IRQ interrupts. NOTE: Since this service returns
-; with IRQ interrupts enabled, all IRQ interrupt sources must be
+; with IRQ interrupts enabled, all IRQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-;
+;
; /* Application ISR call(s) go here! */
;
; /* Disable nested IRQ interrupts. The mode is switched back to
@@ -408,12 +408,12 @@ __tx_irq_processing_return
7.3 FIQ Interrupts
-By default, Cortex-A7 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, Cortex-A7 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -422,7 +422,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.s.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.s:
@@ -450,18 +450,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -477,7 +477,7 @@ __tx_fiq_processing_return
; interrupt, and all C scratch registers are available for use. */
;
; /* Enable nested FIQ interrupts. NOTE: Since this service returns
-; with FIQ interrupts enabled, all FIQ interrupt sources must be
+; with FIQ interrupts enabled, all FIQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
;
@@ -493,28 +493,28 @@ __tx_fiq_processing_return
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.s in the Integrator sub-directories.
9. Thumb/Cortex-A7 Mixed Mode
-By default, ThreadX is setup for running in Cortex-A7 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
-ThreadX file and/or the application in Thumb mode. If any Thumb code
-is used the entire ThreadX source- both C and assembly - should be built
+By default, ThreadX is setup for running in Cortex-A7 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
+ThreadX file and/or the application in Thumb mode. If any Thumb code
+is used the entire ThreadX source- both C and assembly - should be built
with the "-apcs /interwork" option.
10. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a7/ac5/src/tx_thread_context_restore.s b/ports/cortex_a7/ac5/src/tx_thread_context_restore.s
index 6020c253..031fe720 100644
--- a/ports/cortex_a7/ac5/src/tx_thread_context_restore.s
+++ b/ports/cortex_a7/ac5/src/tx_thread_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -54,44 +54,38 @@ SVC_MODE EQU 0x93 ; SVC mode
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -121,13 +115,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3, #0] ; Store the counter
+ STR r2, [r3, #0] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
diff --git a/ports/cortex_a7/ac5/src/tx_thread_context_save.s b/ports/cortex_a7/ac5/src/tx_thread_context_save.s
index 3993d9f0..7c7be45c 100644
--- a/ports/cortex_a7/ac5/src/tx_thread_context_save.s
+++ b/ports/cortex_a7/ac5/src/tx_thread_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -39,43 +39,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
@@ -90,7 +84,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
IF :DEF:TX_ENABLE_FIQ_SUPPORT
CPSID if ; Disable FIQ interrupts
ENDIF
@@ -108,7 +102,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -124,7 +118,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -138,13 +132,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -164,7 +158,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -174,7 +168,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -189,7 +183,7 @@ __tx_thread_idle_system_save
ENDIF
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports/cortex_a7/ac5/src/tx_thread_fiq_context_restore.s b/ports/cortex_a7/ac5/src/tx_thread_fiq_context_restore.s
index 44233091..0258ead2 100644
--- a/ports/cortex_a7/ac5/src/tx_thread_fiq_context_restore.s
+++ b/ports/cortex_a7/ac5/src/tx_thread_fiq_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -32,7 +32,7 @@
;
SVC_MODE EQU 0xD3 ; SVC mode
FIQ_MODE EQU 0xD1 ; FIQ mode
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
;
@@ -50,44 +50,38 @@ IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_restore Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_restore Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the fiq interrupt context when processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* FIQ ISR Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the fiq interrupt context when processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* FIQ ISR Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_context_restore(VOID)
@@ -113,13 +107,13 @@ _tx_thread_fiq_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -163,7 +157,7 @@ __tx_thread_fiq_no_preempt_restore
; /* Restore interrupted thread or ISR. */
;
; /* Pickup the saved stack pointer. */
-; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
+; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
;
; /* Recover the saved context and return to the point of interrupt. */
;
@@ -208,7 +202,7 @@ _tx_skip_fiq_vfp_save
MOV r3, #1 ; Build interrupt stack type
STMDB sp!, {r3, r4} ; Save interrupt stack type and SPSR
STR sp, [r0, #8] ; Save stack pointer in thread control
- ; block
+ ; block
;
; /* Save the remaining time-slice and disable it. */
; if (_tx_timer_time_slice)
@@ -220,7 +214,7 @@ _tx_skip_fiq_vfp_save
BEQ __tx_thread_fiq_dont_save_ts ; No, don't save it
;
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-; _tx_timer_time_slice = 0;
+; _tx_timer_time_slice = 0;
;
STR r2, [r0, #24] ; Save thread's time-slice
MOV r2, #0 ; Clear value
diff --git a/ports/cortex_a7/ac5/src/tx_thread_fiq_context_save.s b/ports/cortex_a7/ac5/src/tx_thread_fiq_context_save.s
index eb969c1d..7be8a46f 100644
--- a/ports/cortex_a7/ac5/src/tx_thread_fiq_context_save.s
+++ b/ports/cortex_a7/ac5/src/tx_thread_fiq_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -39,43 +39,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_save Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_save Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
; VOID _tx_thread_fiq_context_save(VOID)
@@ -90,7 +84,7 @@ _tx_thread_fiq_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -105,7 +99,7 @@ _tx_thread_fiq_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -121,38 +115,38 @@ _tx_thread_fiq_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
__tx_thread_fiq_not_nested_save
-; }
+; }
;
; /* Otherwise, not nested, check to see if a thread was running. */
; else if (_tx_thread_current_ptr)
-; {
+; {
;
ADD r2, r2, #1 ; Increment the interrupt counter
STR r2, [r3] ; Store it back in the variable
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
-; ; scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
+; ; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, lr} ; Store other registers, Note that we don't
-; ; need to save sl and ip since FIQ has
-; ; copies of these registers. Nested
+; ; need to save sl and ip since FIQ has
+; ; copies of these registers. Nested
; ; interrupt processing does need to save
; ; these registers.
;
; /* Save the current stack pointer in the thread's control block. */
-; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
;
; /* Switch to the system stack. */
-; sp = _tx_thread_system_stack_ptr;
+; sp = _tx_thread_system_stack_ptr;
;
MOV r10, #0 ; Clear stack limit
@@ -165,7 +159,7 @@ __tx_thread_fiq_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
; else
@@ -185,18 +179,18 @@ __tx_thread_fiq_idle_system_save
ENDIF
;
; /* Not much to do here, save the current SPSR and LR for possible
-; use in IRQ interrupted in idle system conditions, and return to
+; use in IRQ interrupted in idle system conditions, and return to
; FIQ interrupt processing. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, lr} ; Store other registers that will get used
-; ; or stripped off the stack in context
-; ; restore
- B __tx_fiq_processing_return ; Continue FIQ processing
+; ; or stripped off the stack in context
+; ; restore
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
-;}
+;}
;
END
diff --git a/ports/cortex_a7/ac5/src/tx_thread_fiq_nesting_end.s b/ports/cortex_a7/ac5/src/tx_thread_fiq_nesting_end.s
index 9062160c..8b2fc70b 100644
--- a/ports/cortex_a7/ac5/src/tx_thread_fiq_nesting_end.s
+++ b/ports/cortex_a7/ac5/src/tx_thread_fiq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
FIQ_MODE_BITS EQU 0x11 ; FIQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_end Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_end Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-;/* processing from system mode back to FIQ mode prior to the ISR */
-;/* calling _tx_thread_fiq_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+;/* processing from system mode back to FIQ mode prior to the ISR */
+;/* calling _tx_thread_fiq_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_fiq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #FIQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/cortex_a7/ac5/src/tx_thread_fiq_nesting_start.s b/ports/cortex_a7/ac5/src/tx_thread_fiq_nesting_start.s
index a1456bd1..a94ff890 100644
--- a/ports/cortex_a7/ac5/src/tx_thread_fiq_nesting_start.s
+++ b/ports/cortex_a7/ac5/src/tx_thread_fiq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_start Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_start Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-;/* processing to the system mode so nested FIQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+;/* processing to the system mode so nested FIQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/cortex_a7/ac5/src/tx_thread_interrupt_control.s b/ports/cortex_a7/ac5/src/tx_thread_interrupt_control.s
index 0d422e49..c9d95a58 100644
--- a/ports/cortex_a7/ac5/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_a7/ac5/src/tx_thread_interrupt_control.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,42 +36,36 @@ INT_MASK EQU 0x80 ; Interrupt bit mask
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/cortex_a7/ac5/src/tx_thread_interrupt_disable.s b/ports/cortex_a7/ac5/src/tx_thread_interrupt_disable.s
index 5653faf4..de174cb1 100644
--- a/ports/cortex_a7/ac5/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_a7/ac5/src/tx_thread_interrupt_disable.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -29,41 +29,35 @@
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(void)
@@ -80,7 +74,7 @@ _tx_thread_interrupt_disable
IF :DEF:TX_ENABLE_FIQ_SUPPORT
CPSID if ; Disable IRQ and FIQ
ELSE
- CPSID i ; Disable IRQ
+ CPSID i ; Disable IRQ
ENDIF
IF {INTER} = {TRUE}
diff --git a/ports/cortex_a7/ac5/src/tx_thread_interrupt_restore.s b/ports/cortex_a7/ac5/src/tx_thread_interrupt_restore.s
index e9f15cc6..c2c32842 100644
--- a/ports/cortex_a7/ac5/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_a7/ac5/src/tx_thread_interrupt_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -29,42 +29,36 @@
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function is responsible for restoring interrupts to the state */
;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/cortex_a7/ac5/src/tx_thread_irq_nesting_end.s b/ports/cortex_a7/ac5/src/tx_thread_irq_nesting_end.s
index f458cb21..73a88636 100644
--- a/ports/cortex_a7/ac5/src/tx_thread_irq_nesting_end.s
+++ b/ports/cortex_a7/ac5/src/tx_thread_irq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_irq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #IRQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/cortex_a7/ac5/src/tx_thread_irq_nesting_start.s b/ports/cortex_a7/ac5/src/tx_thread_irq_nesting_start.s
index 2f1814f8..d4c1ca06 100644
--- a/ports/cortex_a7/ac5/src/tx_thread_irq_nesting_start.s
+++ b/ports/cortex_a7/ac5/src/tx_thread_irq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/cortex_a7/ac5/src/tx_thread_schedule.s b/ports/cortex_a7/ac5/src/tx_thread_schedule.s
index 0f10a537..5506bcf4 100644
--- a/ports/cortex_a7/ac5/src/tx_thread_schedule.s
+++ b/ports/cortex_a7/ac5/src/tx_thread_schedule.s
@@ -1,18 +1,19 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -40,45 +41,39 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
@@ -107,7 +102,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -120,7 +115,7 @@ __tx_thread_schedule_loop
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
;
- LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
STR r0, [r1, #0] ; Setup current thread pointer
;
; /* Increment the run count for this thread. */
@@ -134,7 +129,7 @@ __tx_thread_schedule_loop
; /* Setup time-slice, if present. */
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
;
- LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
+ LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
; variable
LDR sp, [r0, #8] ; Switch stack pointers
STR r3, [r2, #0] ; Setup time-slice
@@ -233,3 +228,4 @@ __tx_no_thread_to_disable
END
+
diff --git a/ports/cortex_a7/ac5/src/tx_thread_stack_build.s b/ports/cortex_a7/ac5/src/tx_thread_stack_build.s
index a868d826..f89d73a6 100644
--- a/ports/cortex_a7/ac5/src/tx_thread_stack_build.s
+++ b/ports/cortex_a7/ac5/src/tx_thread_stack_build.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -41,44 +41,38 @@ THUMB_BIT EQU 0x20 ; Thumb-bit
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function builds a stack frame on the supplied thread's stack. */
;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
;/* thread_ptr Pointer to thread control blk */
;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -86,10 +80,10 @@ THUMB_BIT EQU 0x20 ; Thumb-bit
EXPORT _tx_thread_stack_build
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-A7 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports/cortex_a7/ac5/src/tx_thread_system_return.s b/ports/cortex_a7/ac5/src/tx_thread_system_return.s
index 01e93435..cfaf4f84 100644
--- a/ports/cortex_a7/ac5/src/tx_thread_system_return.s
+++ b/ports/cortex_a7/ac5/src/tx_thread_system_return.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -33,50 +33,44 @@
IMPORT _tx_timer_time_slice
IMPORT _tx_thread_schedule
IF :DEF:TX_ENABLE_EXECUTION_CHANGE_NOTIFY
- IMPORT _tx_execution_thread_exit
+ IMPORT _tx_execution_thread_exit
ENDIF
;
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
@@ -104,7 +98,7 @@ _tx_skip_solicited_vfp_save
MOV r0, #0 ; Build a solicited stack type
MRS r1, CPSR ; Pickup the CPSR
STMDB sp!, {r0-r1} ; Save type and CPSR
-;
+;
; /* Lockout interrupts. */
;
IF :DEF:TX_ENABLE_FIQ_SUPPORT
diff --git a/ports/cortex_a7/ac5/src/tx_thread_vectored_context_save.s b/ports/cortex_a7/ac5/src/tx_thread_vectored_context_save.s
index 1e9a2f82..d52a9776 100644
--- a/ports/cortex_a7/ac5/src/tx_thread_vectored_context_save.s
+++ b/ports/cortex_a7/ac5/src/tx_thread_vectored_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -38,43 +38,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_vectored_context_save(VOID)
@@ -135,7 +129,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -171,7 +165,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports/cortex_a7/ac5/src/tx_timer_interrupt.s b/ports/cortex_a7/ac5/src/tx_timer_interrupt.s
index ce94e6e0..0a2a68f6 100644
--- a/ports/cortex_a7/ac5/src/tx_timer_interrupt.s
+++ b/ports/cortex_a7/ac5/src/tx_timer_interrupt.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Timer */
;/** */
@@ -44,46 +44,40 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt Cortex-A7/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt Cortex-A7/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -107,7 +101,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -225,13 +219,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports/cortex_a7/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a7/ac6/example_build/sample_threadx/.cproject
index e75dac72..c34527a9 100644
--- a/ports/cortex_a7/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a7/ac6/example_build/sample_threadx/.cproject
@@ -1,176 +1,176 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a7/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a7/ac6/example_build/sample_threadx/sample_threadx.scat
index d23881cd..66d0d95a 100644
--- a/ports/cortex_a7/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a7/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -1,7 +1,7 @@
;*******************************************************
; Copyright (c) 2011-2016 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;*******************************************************
diff --git a/ports/cortex_a7/ac6/example_build/sample_threadx/tx_initialize_low_level.S b/ports/cortex_a7/ac6/example_build/sample_threadx/tx_initialize_low_level.S
index 083a57a7..76395459 100644
--- a/ports/cortex_a7/ac6/example_build/sample_threadx/tx_initialize_low_level.S
+++ b/ports/cortex_a7/ac6/example_build/sample_threadx/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -91,14 +92,6 @@ $_tx_initialize_low_level:
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* */
/**************************************************************************/
.global _tx_initialize_low_level
.type _tx_initialize_low_level,function
diff --git a/ports/cortex_a7/ac6/example_build/tx/.cproject b/ports/cortex_a7/ac6/example_build/tx/.cproject
index 476321bb..f17f3f56 100644
--- a/ports/cortex_a7/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a7/ac6/example_build/tx/.cproject
@@ -1,146 +1,146 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a7/ac6/inc/tx_port.h b/ports/cortex_a7/ac6/inc/tx_port.h
index d80ddec1..f0153046 100644
--- a/ports/cortex_a7/ac6/inc/tx_port.h
+++ b/ports/cortex_a7/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,20 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -320,7 +307,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv7-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv7-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a7/ac6/readme_threadx.txt b/ports/cortex_a7/ac6/readme_threadx.txt
index b9d6bf88..a18fa47d 100644
--- a/ports/cortex_a7/ac6/readme_threadx.txt
+++ b/ports/cortex_a7/ac6/readme_threadx.txt
@@ -1,18 +1,18 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A7
+ Microsoft's Azure RTOS ThreadX for Cortex-A7
Using ARM Compiler 6 & DS
1. Import the ThreadX Projects
-In order to build the ThreadX library and the ThreadX demonstration, first import
-the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
+In order to build the ThreadX library and the ThreadX demonstration, first import
+the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
into your DS workspace.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply right-click the Eclipse project
-"tx" and then select the "Build Project" button. You should now observe the compilation
+Building the ThreadX library is easy; simply right-click the Eclipse project
+"tx" and then select the "Build Project" button. You should now observe the compilation
and assembly of the ThreadX library. This project build produces the ThreadX
library file tx.a.
@@ -22,44 +22,44 @@ library file tx.a.
The ThreadX demonstration is designed to execute under the DS debugger on the
VE_Cortex-A7 Bare Metal simulator.
-Building the demonstration is easy; simply right-click the Eclipse project
-"sample_threadx" and then select the "Build Project" button. You should now observe
-the compilation and assembly of the ThreadX demonstration. This project build produces
-the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
+Building the demonstration is easy; simply right-click the Eclipse project
+"sample_threadx" and then select the "Build Project" button. You should now observe
+the compilation and assembly of the ThreadX demonstration. This project build produces
+the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
in the Project Explorer window, right-click on the 'cortex-a7_tx.launch' file, click
'Debug As', and then click 'cortex-a7_tx' from the submenu. This will cause the
-debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
+debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
to execute the ThreadX demonstration.
4. System Initialization
-The entry point in ThreadX for the Cortex-A7 using ARM tools is at label
-"Vectors". This is defined within startup.S in the sample_threadx project. In addition,
-this is where all static and global pre-set C variable initialization processing
+The entry point in ThreadX for the Cortex-A7 using ARM tools is at label
+"Vectors". This is defined within startup.S in the sample_threadx project. In addition,
+this is where all static and global pre-set C variable initialization processing
takes place.
-This is also where initialization of a periodic timer interrupt source should take
+This is also where initialization of a periodic timer interrupt source should take
place.
-In addition, _tx_initialize_low_level defines the first available address
-for use by the application, which is supplied as the sole input parameter
+In addition, _tx_initialize_low_level defines the first available address
+for use by the application, which is supplied as the sole input parameter
to your application definition function, tx_application_define.
5. Register Usage and Stack Frames
-The AC6 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The AC6 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -77,52 +77,52 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A7
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A7 vectors start at address zero. The demonstration system startup
-reset.S file contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+reset.S file contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
-ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
+ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
nested IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.S:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -130,7 +130,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -143,7 +143,7 @@ __tx_irq_processing_return:
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.S:
.global __tx_irq_example_handler
@@ -153,12 +153,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} @ Save some scratch registers
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
BL _tx_thread_vectored_context_save @ Call the vectored IRQ context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -175,22 +175,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -198,10 +198,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* Enable nested IRQ interrupts. NOTE: Since this service returns
-@ with IRQ interrupts enabled, all IRQ interrupt sources must be
+@ with IRQ interrupts enabled, all IRQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-@
+@
@ /* Application ISR call(s) go here! */
@
@ /* Disable nested IRQ interrupts. The mode is switched back to
@@ -214,12 +214,12 @@ __tx_irq_processing_return:
7.3 FIQ Interrupts
-By default, FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.S.
@@ -228,7 +228,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.S.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.S:
@@ -256,18 +256,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.S. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -283,7 +283,7 @@ __tx_fiq_processing_return:
@ interrupt, and all C scratch registers are available for use. */
@
@ /* Enable nested FIQ interrupts. NOTE: Since this service returns
-@ with FIQ interrupts enabled, all FIQ interrupt sources must be
+@ with FIQ interrupts enabled, all FIQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@
@@ -299,12 +299,12 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
-interrupt source, these services are not functional but the remainder of
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
+interrupt source, these services are not functional but the remainder of
ThreadX will still run.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.S for the demonstration system.
@@ -312,7 +312,7 @@ found in the file tx_initialize_low_level.S for the demonstration system.
9. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a7/ac6/src/tx_thread_context_restore.S b/ports/cortex_a7/ac6/src/tx_thread_context_restore.S
index 6b4a561d..41b0b0d0 100644
--- a/ports/cortex_a7/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a7/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,23 +80,6 @@ IRQ_MODE = 0x12 // IRQ mode
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_restore
.type _tx_thread_context_restore,function
diff --git a/ports/cortex_a7/ac6/src/tx_thread_context_save.S b/ports/cortex_a7/ac6/src/tx_thread_context_save.S
index eff06283..d2d29d34 100644
--- a/ports/cortex_a7/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a7/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,23 +72,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_save
.type _tx_thread_context_save,function
diff --git a/ports/cortex_a7/ac6/src/tx_thread_fiq_context_restore.S b/ports/cortex_a7/ac6/src/tx_thread_fiq_context_restore.S
index d2fbebe1..921c322c 100644
--- a/ports/cortex_a7/ac6/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_a7/ac6/src/tx_thread_fiq_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,20 +79,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* FIQ ISR Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_restore
.type _tx_thread_fiq_context_restore,function
diff --git a/ports/cortex_a7/ac6/src/tx_thread_fiq_context_save.S b/ports/cortex_a7/ac6/src/tx_thread_fiq_context_save.S
index 88472a3d..2f1a6c40 100644
--- a/ports/cortex_a7/ac6/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_a7/ac6/src/tx_thread_fiq_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_save
.type _tx_thread_fiq_context_save,function
diff --git a/ports/cortex_a7/ac6/src/tx_thread_fiq_nesting_end.S b/ports/cortex_a7/ac6/src/tx_thread_fiq_nesting_end.S
index fa3886b8..a7ce701e 100644
--- a/ports/cortex_a7/ac6/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_a7/ac6/src/tx_thread_fiq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ FIQ_MODE_BITS = 0x11 // FIQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/ac6/src/tx_thread_fiq_nesting_start.S b/ports/cortex_a7/ac6/src/tx_thread_fiq_nesting_start.S
index dbed1cf2..4f095dde 100644
--- a/ports/cortex_a7/ac6/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_a7/ac6/src/tx_thread_fiq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a7/ac6/src/tx_thread_interrupt_control.S
index d1223cb8..a5bc47f7 100644
--- a/ports/cortex_a7/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a7/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,20 +69,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a7/ac6/src/tx_thread_interrupt_disable.S
index a87d1a06..d7b53bc2 100644
--- a/ports/cortex_a7/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a7/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,20 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a7/ac6/src/tx_thread_interrupt_restore.S
index 53ff2813..3c31e94b 100644
--- a/ports/cortex_a7/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a7/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,20 +68,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/ac6/src/tx_thread_irq_nesting_end.S b/ports/cortex_a7/ac6/src/tx_thread_irq_nesting_end.S
index 18aebc7c..cc4db3a7 100644
--- a/ports/cortex_a7/ac6/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_a7/ac6/src/tx_thread_irq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/ac6/src/tx_thread_irq_nesting_start.S b/ports/cortex_a7/ac6/src/tx_thread_irq_nesting_start.S
index a2ffd35d..3635874d 100644
--- a/ports/cortex_a7/ac6/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_a7/ac6/src/tx_thread_irq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/ac6/src/tx_thread_schedule.S b/ports/cortex_a7/ac6/src/tx_thread_schedule.S
index 07dd6f7f..a74e2050 100644
--- a/ports/cortex_a7/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a7/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,6 +40,14 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode
+#ifdef TX_ENABLE_VFP_SUPPORT
+#define IRQ_MASK 0x80
+#endif
+
+#ifdef TX_ENABLE_FIQ_SUPPORT
+#define FIQ_MASK 0x40
+#endif
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
@@ -73,23 +82,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
@@ -259,3 +251,4 @@ no_fiq:
BX lr
#endif
+
diff --git a/ports/cortex_a7/ac6/src/tx_thread_stack_build.S b/ports/cortex_a7/ac6/src/tx_thread_stack_build.S
index 3876225a..827554a7 100644
--- a/ports/cortex_a7/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a7/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,20 +75,6 @@ CPSR_MASK = 0xBF // Mask initial CPSR, T, IRQ int
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/ac6/src/tx_thread_system_return.S b/ports/cortex_a7/ac6/src/tx_thread_system_return.S
index 0eed478d..1a17446b 100644
--- a/ports/cortex_a7/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a7/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,23 +69,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/ac6/src/tx_thread_vectored_context_save.S b/ports/cortex_a7/ac6/src/tx_thread_vectored_context_save.S
index fe8a98e8..91653b75 100644
--- a/ports/cortex_a7/ac6/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_a7/ac6/src/tx_thread_vectored_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_vectored_context_save
.type _tx_thread_vectored_context_save,function
diff --git a/ports/cortex_a7/ac6/src/tx_timer_interrupt.S b/ports/cortex_a7/ac6/src/tx_timer_interrupt.S
index cb0c1fa2..179ac894 100644
--- a/ports/cortex_a7/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a7/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,20 +78,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/ghs/example_build/tx_initialize_low_level.arm b/ports/cortex_a7/ghs/example_build/tx_initialize_low_level.arm
index 0d10366b..b4d024bf 100644
--- a/ports/cortex_a7/ghs/example_build/tx_initialize_low_level.arm
+++ b/ports/cortex_a7/ghs/example_build/tx_initialize_low_level.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/ghs/inc/tx_el.h b/ports/cortex_a7/ghs/inc/tx_el.h
index b8926921..72e5bbe3 100644
--- a/ports/cortex_a7/ghs/inc/tx_el.h
+++ b/ports/cortex_a7/ghs/inc/tx_el.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,12 +37,6 @@
/* EventAnalyzer. It is assumed that tx_api.h and tx_port.h have */
/* already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_EL_H
diff --git a/ports/cortex_a7/ghs/inc/tx_port.h b/ports/cortex_a7/ghs/inc/tx_port.h
index ee13c997..7fa32537 100644
--- a/ports/cortex_a7/ghs/inc/tx_port.h
+++ b/ports/cortex_a7/ghs/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -394,7 +386,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-A7/Green Hills Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-A7/Green Hills Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a7/ghs/readme_threadx.txt b/ports/cortex_a7/ghs/readme_threadx.txt
index 3195b4e4..d7472f9e 100644
--- a/ports/cortex_a7/ghs/readme_threadx.txt
+++ b/ports/cortex_a7/ghs/readme_threadx.txt
@@ -1,19 +1,19 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A7
+ Microsoft's Azure RTOS ThreadX for Cortex-A7
Using the Green Hills Software Tools
1. Open the ThreadX Project Workspace
-In order to build the ThreadX library and the ThreadX demonstration first load
-the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
-"example_build" directory.
+In order to build the ThreadX library and the ThreadX demonstration first load
+the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
+"example_build" directory.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply select the MULTI project file
-tx.gpj and then select the build button. You should now observe the
-compilation and assembly of the ThreadX library. This project build produces
+Building the ThreadX library is easy; simply select the MULTI project file
+tx.gpj and then select the build button. You should now observe the
+compilation and assembly of the ThreadX library. This project build produces
the ThreadX library file tx.a.
@@ -21,55 +21,55 @@ the ThreadX library file tx.a.
The ThreadX demonstration is designed to execute under the MULTI environment
on the Green Hills Cortex-A7 simulator. The instructions that follow describe
-how to get the ThreadX evaluation running under the MULTI Cortex-A7 simulation
+how to get the ThreadX evaluation running under the MULTI Cortex-A7 simulation
environment.
-Building the demonstration is easy; simply select the MULTI project file
-sample_threadx.gpj. At this point, select the "Project Build" button and observe
-the compilation, assembly, and linkage of the ThreadX demonstration application.
+Building the demonstration is easy; simply select the MULTI project file
+sample_threadx.gpj. At this point, select the "Project Build" button and observe
+the compilation, assembly, and linkage of the ThreadX demonstration application.
-After the demonstration is built, invoke the MULTI ARM simulator by selecting
-the simulator connection from within the sample_threadx.con connection file.
-Once connected to the simulator, select the "Debug" button. You should now
-observe the main function of sample_threadx.c.
+After the demonstration is built, invoke the MULTI ARM simulator by selecting
+the simulator connection from within the sample_threadx.con connection file.
+Once connected to the simulator, select the "Debug" button. You should now
+observe the main function of sample_threadx.c.
At this point, you should setup a simulated timer interrupt for ThreadX
by entering "timer 9999 irq" in the "target" window of the debugger.
-You are now ready to execute the ThreadX demonstration system. Select
-breakpoints and data watches to observe the execution of the sample_threadx.c
+You are now ready to execute the ThreadX demonstration system. Select
+breakpoints and data watches to observe the execution of the sample_threadx.c
application.
4. EventAnalyzer Demonstration
-To build a demonstration system that also logs events for the MULTI EventAnalyzer,
-perform the same steps as the regular demo, except build the ThreadX library with
-txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
-The resulting image will log all system events, which can then be displayed by the
+To build a demonstration system that also logs events for the MULTI EventAnalyzer,
+perform the same steps as the regular demo, except build the ThreadX library with
+txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
+The resulting image will log all system events, which can then be displayed by the
MULTI EventAnalyzer.
5. System Initialization
-The system entry point using the Green Hills tools is at the label _start.
-This is defined within the crt0.arm file supplied by Green Hills. In addition,
-this is where all static and global preset C variable initialization
+The system entry point using the Green Hills tools is at the label _start.
+This is defined within the crt0.arm file supplied by Green Hills. In addition,
+this is where all static and global preset C variable initialization
processing is called from.
After the Green Hills startup function returns, ThreadX initialization is
called. The main initialization function is _tx_initialize_low_level and
-is located in the file tx_initialize_low_level.arm. This function is responsible
-for setting up various system data structures, interrupt vectors, and the
+is located in the file tx_initialize_low_level.arm. This function is responsible
+for setting up various system data structures, interrupt vectors, and the
periodic timer interrupt source of ThreadX.
-In addition, _tx_initialize_low_level determines where the first available
+In addition, _tx_initialize_low_level determines where the first available
RAM memory address is located. This address is supplied to tx_application_define.
-By default, the first available RAM memory address is assumed to start at the
-beginning of the ThreadX section .free_mem. If changes are made to the
-sample_threadx.ld file, the .free_mem section should remain the last allocated
-section in the main RAM area. The starting address of this section is passed
+By default, the first available RAM memory address is assumed to start at the
+beginning of the ThreadX section .free_mem. If changes are made to the
+sample_threadx.ld file, the .free_mem section should remain the last allocated
+section in the main RAM area. The starting address of this section is passed
to tx_application_define.
@@ -87,27 +87,27 @@ The following defines and their associated action are as follows:
TX_ENABLE_FIQ_NESTING If defined, this brings in special FIQ
interrupt nesting logic into the ThreadX
library. This define should be applied
- to the entire ThreadX library and the
+ to the entire ThreadX library and the
define TX_ENABLE_FIQ_SUPPORT should also
be defined.
TX_ENABLE_FIQ_SUPPORT If defined, this brings in FIQ context
save and restore logic necessary for
applications to call ThreadX services from
- FIQ interrupt handlers. This define
- should be applied to the entire ThreadX
+ FIQ interrupt handlers. This define
+ should be applied to the entire ThreadX
library.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 4 in the "ThreadX User Guide"
+ Chapter 4 in the "ThreadX User Guide"
for more details.
TX_ENABLE_EVENT_LOGGING This define enables event logging for any
or all of the ThreadX source code. If this
- option is used anywhere, the tx_initialize_high_level.c
+ option is used anywhere, the tx_initialize_high_level.c
file must be compiled with it as well, since this
is where the event log is initialized.
@@ -119,121 +119,121 @@ The following defines and their associated action are as follows:
If this is enabled, run-time filtering logic
is added to the event logging code.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
7. Register Usage and Stack Frames
-The Green Hills compiler assumes that registers r0-r3 (a1-a4) and r12 (ip)
-are scratch registers for each function. All other registers used by a C
-function must be preserved by the function. ThreadX takes advantage of this
-in situations where a context switch happens as a result of making a ThreadX
-service call (which is itself a C function). In such cases, the saved
+The Green Hills compiler assumes that registers r0-r3 (a1-a4) and r12 (ip)
+are scratch registers for each function. All other registers used by a C
+function must be preserved by the function. ThreadX takes advantage of this
+in situations where a context switch happens as a result of making a ThreadX
+service call (which is itself a C function). In such cases, the saved
context of a thread is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -251,40 +251,40 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
8. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make ThreadX run faster, you can change the tx.gpj project
-to disable debug information and enable the desired optimizations.
+to disable debug information and enable the desired optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined before tx_api.h is included.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined before tx_api.h is included.
9. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A7
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
9.1 Vector Area
The Cortex-A7 vectors start at address zero. The demonstration system reset.arm
-file contains the reset section (which contains all the ARM vectors) and is
+file contains the reset section (which contains all the ARM vectors) and is
typically loaded at address zero. On actual hardware platforms, this section
-might have to be copied to address 0.
+might have to be copied to address 0.
9.2 IRQ ISRs
@@ -294,13 +294,13 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
9.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.arm:
.globl __tx_irq_handler
- .globl __tx_irq_processing_return
+ .globl __tx_irq_processing_return
__tx_irq_handler:
/* Jump to context save to save system context. */
@@ -308,7 +308,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
/* At this point execution is still in the IRQ mode. The CPSR, point of
- interrupt, and all C scratch registers are available for use. Note
+ interrupt, and all C scratch registers are available for use. Note
that IRQ interrupts are still disabled upon return from the context
save function. */
@@ -321,7 +321,7 @@ __tx_irq_processing_return:
9.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.arm:
.globl __tx_irq_example_handler
@@ -331,12 +331,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} # Save some scratch registers
MRS r0, SPSR # Pickup saved SPSR
- SUB lr, lr, #4 # Adjust point of interrupt
+ SUB lr, lr, #4 # Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} # Store other scratch registers
BL _tx_thread_vectored_context_save # Call the vectored IRQ context save
/* At this point execution is still in the IRQ mode. The CPSR, point of
- interrupt, and all C scratch registers are available for use. Note
+ interrupt, and all C scratch registers are available for use. Note
that IRQ interrupts are still disabled upon return from the context
save function. */
@@ -353,22 +353,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.arm. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables nesting
-by disabling IRQ interrupts and switching back to IRQ mode in preparation for
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.arm. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables nesting
+by disabling IRQ interrupts and switching back to IRQ mode in preparation for
the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in the
+The following is an example of enabling IRQ nested interrupts in the
typical IRQ handler:
.globl __tx_irq_handler
- .globl __tx_irq_processing_return
+ .globl __tx_irq_processing_return
__tx_irq_handler:
/* Jump to context save to save system context. */
@@ -376,10 +376,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
/* Enable nested IRQ interrupts. NOTE: Since this service returns
- with IRQ interrupts enabled, all IRQ interrupt sources must be
+ with IRQ interrupts enabled, all IRQ interrupt sources must be
cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-
+
/* Application ISR call(s) go here! */
/* Disable nested IRQ interrupts. The mode is switched back to
@@ -392,9 +392,9 @@ __tx_irq_processing_return:
9.3 FIQ Interrupts
-By default, Cortex-A7 FIQ interrupts are left completely enabled by ThreadX.
-Of course, this means that the application is fully responsible for
-saving/restoring any registers used in the FIQ ISR processing. In addition,
+By default, Cortex-A7 FIQ interrupts are left completely enabled by ThreadX.
+Of course, this means that the application is fully responsible for
+saving/restoring any registers used in the FIQ ISR processing. In addition,
no ThreadX service calls are allowed from the default FIQ ISRs. The default
FIQ interrupt shell is located in tx_initialize_low_level.arm.
@@ -403,7 +403,7 @@ FIQ interrupt shell is located in tx_initialize_low_level.arm.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.arm:
@@ -431,18 +431,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.arm. When nested FIQ interrupts are no longer
-required, calling the _tx_thread_fiq_nesting_end service disables nesting by
-disabling FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.arm. When nested FIQ interrupts are no longer
+required, calling the _tx_thread_fiq_nesting_end service disables nesting by
+disabling FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -458,7 +458,7 @@ __tx_fiq_processing_return:
interrupt, and all C scratch registers are available for use. */
/* Enable nested FIQ interrupts. NOTE: Since this service returns
- with FIQ interrupts enabled, all FIQ interrupt sources must be
+ with FIQ interrupts enabled, all FIQ interrupt sources must be
cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@@ -475,29 +475,29 @@ __tx_fiq_processing_return:
10. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.arm.
11. Thumb/Cortex-A7 Mixed Mode
-By default, ThreadX is setup for running in Cortex-A7 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
+By default, ThreadX is setup for running in Cortex-A7 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
ThreadX file and/or the application in Thumb mode. The only exception
-to this is the file tx_thread_shell_entry.c. This file must always be
+to this is the file tx_thread_shell_entry.c. This file must always be
built in 32-bit mode.
12. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
@@ -520,7 +520,7 @@ information associated with this specific port of ThreadX:
04-02-2021 Release 6.1.6 changes:
tx_port.h Updated macro definition
-05/19/2020 Initial ThreadX version of Cortex-A7/Green Hills port.
+05/19/2020 Initial ThreadX version of Cortex-A7/Green Hills port.
Copyright(c) 1996-2020 Microsoft Corporation
diff --git a/ports/cortex_a7/ghs/src/tx_el.c b/ports/cortex_a7/ghs/src/tx_el.c
index 365622cd..b5d3b8b7 100644
--- a/ports/cortex_a7/ghs/src/tx_el.c
+++ b/ports/cortex_a7/ghs/src/tx_el.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -82,12 +83,6 @@ UINT _tx_thread_interrupt_control(UINT new_posture);
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_el_initialize(VOID)
{
diff --git a/ports/cortex_a7/ghs/src/tx_thread_context_restore.arm b/ports/cortex_a7/ghs/src/tx_thread_context_restore.arm
index fa173d80..91af8826 100644
--- a/ports/cortex_a7/ghs/src/tx_thread_context_restore.arm
+++ b/ports/cortex_a7/ghs/src/tx_thread_context_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/ghs/src/tx_thread_context_save.arm b/ports/cortex_a7/ghs/src/tx_thread_context_save.arm
index f1608b92..d9752452 100644
--- a/ports/cortex_a7/ghs/src/tx_thread_context_save.arm
+++ b/ports/cortex_a7/ghs/src/tx_thread_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/ghs/src/tx_thread_fiq_context_restore.arm b/ports/cortex_a7/ghs/src/tx_thread_fiq_context_restore.arm
index 60c4e5fe..115e8d66 100644
--- a/ports/cortex_a7/ghs/src/tx_thread_fiq_context_restore.arm
+++ b/ports/cortex_a7/ghs/src/tx_thread_fiq_context_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/ghs/src/tx_thread_fiq_context_save.arm b/ports/cortex_a7/ghs/src/tx_thread_fiq_context_save.arm
index 75182da9..c2123b80 100644
--- a/ports/cortex_a7/ghs/src/tx_thread_fiq_context_save.arm
+++ b/ports/cortex_a7/ghs/src/tx_thread_fiq_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/ghs/src/tx_thread_fiq_nesting_end.arm b/ports/cortex_a7/ghs/src/tx_thread_fiq_nesting_end.arm
index d6898821..16f82495 100644
--- a/ports/cortex_a7/ghs/src/tx_thread_fiq_nesting_end.arm
+++ b/ports/cortex_a7/ghs/src/tx_thread_fiq_nesting_end.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/ghs/src/tx_thread_fiq_nesting_start.arm b/ports/cortex_a7/ghs/src/tx_thread_fiq_nesting_start.arm
index 5f99bae6..af4dcd16 100644
--- a/ports/cortex_a7/ghs/src/tx_thread_fiq_nesting_start.arm
+++ b/ports/cortex_a7/ghs/src/tx_thread_fiq_nesting_start.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/ghs/src/tx_thread_interrupt_control.arm b/ports/cortex_a7/ghs/src/tx_thread_interrupt_control.arm
index d2ec35c7..e492cd80 100644
--- a/ports/cortex_a7/ghs/src/tx_thread_interrupt_control.arm
+++ b/ports/cortex_a7/ghs/src/tx_thread_interrupt_control.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/ghs/src/tx_thread_interrupt_disable.arm b/ports/cortex_a7/ghs/src/tx_thread_interrupt_disable.arm
index 36702beb..f12583d2 100644
--- a/ports/cortex_a7/ghs/src/tx_thread_interrupt_disable.arm
+++ b/ports/cortex_a7/ghs/src/tx_thread_interrupt_disable.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/ghs/src/tx_thread_interrupt_restore.arm b/ports/cortex_a7/ghs/src/tx_thread_interrupt_restore.arm
index aec3e0a2..bb8daa6c 100644
--- a/ports/cortex_a7/ghs/src/tx_thread_interrupt_restore.arm
+++ b/ports/cortex_a7/ghs/src/tx_thread_interrupt_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/ghs/src/tx_thread_irq_nesting_end.arm b/ports/cortex_a7/ghs/src/tx_thread_irq_nesting_end.arm
index b5e7be09..3d35ef54 100644
--- a/ports/cortex_a7/ghs/src/tx_thread_irq_nesting_end.arm
+++ b/ports/cortex_a7/ghs/src/tx_thread_irq_nesting_end.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/ghs/src/tx_thread_irq_nesting_start.arm b/ports/cortex_a7/ghs/src/tx_thread_irq_nesting_start.arm
index 772ce870..f8ff6e7f 100644
--- a/ports/cortex_a7/ghs/src/tx_thread_irq_nesting_start.arm
+++ b/ports/cortex_a7/ghs/src/tx_thread_irq_nesting_start.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/ghs/src/tx_thread_schedule.arm b/ports/cortex_a7/ghs/src/tx_thread_schedule.arm
index 315c1f22..037e259e 100644
--- a/ports/cortex_a7/ghs/src/tx_thread_schedule.arm
+++ b/ports/cortex_a7/ghs/src/tx_thread_schedule.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/ghs/src/tx_thread_stack_build.arm b/ports/cortex_a7/ghs/src/tx_thread_stack_build.arm
index d1552846..2e07532a 100644
--- a/ports/cortex_a7/ghs/src/tx_thread_stack_build.arm
+++ b/ports/cortex_a7/ghs/src/tx_thread_stack_build.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/ghs/src/tx_thread_system_return.arm b/ports/cortex_a7/ghs/src/tx_thread_system_return.arm
index ec6e3a5e..ff6e8512 100644
--- a/ports/cortex_a7/ghs/src/tx_thread_system_return.arm
+++ b/ports/cortex_a7/ghs/src/tx_thread_system_return.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/ghs/src/tx_thread_vectored_context_save.arm b/ports/cortex_a7/ghs/src/tx_thread_vectored_context_save.arm
index dff3ef5c..4433de47 100644
--- a/ports/cortex_a7/ghs/src/tx_thread_vectored_context_save.arm
+++ b/ports/cortex_a7/ghs/src/tx_thread_vectored_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/ghs/src/tx_timer_interrupt.arm b/ports/cortex_a7/ghs/src/tx_timer_interrupt.arm
index 66e4639a..96753ba9 100644
--- a/ports/cortex_a7/ghs/src/tx_timer_interrupt.arm
+++ b/ports/cortex_a7/ghs/src/tx_timer_interrupt.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/gnu/example_build/MP_GIC.h b/ports/cortex_a7/gnu/example_build/MP_GIC.h
index c34e44c9..05c0f8a5 100644
--- a/ports/cortex_a7/gnu/example_build/MP_GIC.h
+++ b/ports/cortex_a7/gnu/example_build/MP_GIC.h
@@ -4,7 +4,7 @@
//
// Copyright (c) 2011-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
diff --git a/ports/cortex_a7/gnu/example_build/MP_GIC.s b/ports/cortex_a7/gnu/example_build/MP_GIC.s
index 7f175c69..6f093bd7 100644
--- a/ports/cortex_a7/gnu/example_build/MP_GIC.s
+++ b/ports/cortex_a7/gnu/example_build/MP_GIC.s
@@ -1,7 +1,7 @@
//----------------------------------------------------------------
// Copyright (c) 2005-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
//
// Cortex-A7MP example - Startup Code
@@ -37,7 +37,7 @@ enableGIC:
STR r1, [r0] // Write the GIC Enable Register (ICDDCR)
BX lr
-
+
// ------------------------------------------------------------
.global disableGIC
@@ -54,7 +54,7 @@ disableGIC:
STR r1, [r0] // Write the GIC Enable Register (ICDDCR)
BX lr
-
+
// ------------------------------------------------------------
@@ -84,10 +84,10 @@ enableIntID:
STR r3, [r0, r2] // Store out (ICDISER)
BX lr
-
+
// ------------------------------------------------------------
-
+
.global disableIntID
.type disableIntID,function
// void disableIntID(unsigned int ID)
@@ -112,7 +112,7 @@ disableIntID:
STR r3, [r0, r2] // Store out (ICDICER)
BX lr
-
+
// ------------------------------------------------------------
@@ -130,7 +130,7 @@ setIntPriority:
// r0 = base addr
// r1 = priority
// r2 = ID
-
+
// Make sure that priority value is only 5 bits, and convert to expected format
AND r1, r1, #0x1F
MOV r1, r1, LSL #3
@@ -156,7 +156,7 @@ setIntPriority:
STR r3, [r0] // And store it back again (ICDIPR)
BX lr
-
+
// ------------------------------------------------------------
@@ -175,7 +175,7 @@ enableGICProcessorInterface:
STR r1, [r0, #0x0] // Write the Processor Interface Control register (ICCICR/ICPICR)
BX lr
-
+
// ------------------------------------------------------------
@@ -195,7 +195,7 @@ disableGICProcessorInterface:
STR r1, [r0, #0x0] // Write the Processor Interface Control register (ICCICR/ICPICR)
BX lr
-
+
// ------------------------------------------------------------
@@ -214,8 +214,8 @@ setPriorityMask:
STR r0, [r1, #0x4] // Write the Priority Mask register (ICCPMR/ICCIPMR)
BX lr
-
-
+
+
// ------------------------------------------------------------
.global setBinaryPoint
@@ -231,7 +231,7 @@ setBinaryPoint:
STR r0, [r1, #0x8] // Write the Binary register (ICCBPR/ICCBPR)
BX lr
-
+
// ------------------------------------------------------------
@@ -245,7 +245,7 @@ readIntAck:
LDR r0, [r0, #0xC] // Read the Interrupt Acknowledge Register (ICCIAR)
BX lr
-
+
// ------------------------------------------------------------
@@ -262,8 +262,8 @@ writeEOI:
STR r0, [r1, #0x10] // Write ID to the End of Interrupt register (ICCEOIR)
BX lr
-
-
+
+
//----------------------------------------------------------------
// SGI
//----------------------------------------------------------------
diff --git a/ports/cortex_a7/gnu/example_build/MP_PrivateTimer.S b/ports/cortex_a7/gnu/example_build/MP_PrivateTimer.S
index b1e2701b..7b83be9e 100644
--- a/ports/cortex_a7/gnu/example_build/MP_PrivateTimer.S
+++ b/ports/cortex_a7/gnu/example_build/MP_PrivateTimer.S
@@ -64,7 +64,7 @@ stop_private_timer:
get_private_timer_count:
BX lr
-
+
// ------------------------------------------------------------
// void clear_private_timer_irq(void)
diff --git a/ports/cortex_a7/gnu/example_build/reset.S b/ports/cortex_a7/gnu/example_build/reset.S
index 3ce9efb7..f2e0522b 100644
--- a/ports/cortex_a7/gnu/example_build/reset.S
+++ b/ports/cortex_a7/gnu/example_build/reset.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a7/gnu/example_build/sample_threadx.ld b/ports/cortex_a7/gnu/example_build/sample_threadx.ld
index cb42c11c..d43e28f1 100644
--- a/ports/cortex_a7/gnu/example_build/sample_threadx.ld
+++ b/ports/cortex_a7/gnu/example_build/sample_threadx.ld
@@ -7,7 +7,7 @@ OUTPUT_ARCH(arm)
SECTIONS
{
. = 0x00000000;
-
+
.vectors : {reset.o(.text) }
/* Read-only sections, merged into text segment: */
@@ -94,8 +94,8 @@ SECTIONS
*(.gnu.linkonce.t*)
*(.glue_7t) *(.glue_7)
} =0
- .init :
- {
+ .init :
+ {
KEEP (*(.init))
} =0
_etext = .;
@@ -120,7 +120,7 @@ SECTIONS
.data1 : { *(.data1) }
.eh_frame : { KEEP (*(.eh_frame)) }
.gcc_except_table : { *(.gcc_except_table) }
- .ctors :
+ .ctors :
{
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
@@ -153,9 +153,9 @@ SECTIONS
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata :
+ .sdata :
{
- *(.sdata)
+ *(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
}
@@ -191,7 +191,7 @@ SECTIONS
_stack_bottom = ABSOLUTE(.) ;
- /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
+ /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
SYS stack if nested interrupts are enabled. */
. = ALIGN(8) ;
. += 4096 ;
diff --git a/ports/cortex_a7/gnu/example_build/tx_initialize_low_level.S b/ports/cortex_a7/gnu/example_build/tx_initialize_low_level.S
index c5337622..9b49da8b 100644
--- a/ports/cortex_a7/gnu/example_build/tx_initialize_low_level.S
+++ b/ports/cortex_a7/gnu/example_build/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -89,17 +90,6 @@ SYS_STACK_SIZE = 1024 // System stack size
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
@@ -249,7 +239,7 @@ __tx_irq_processing_return:
if nested IRQ interrupts are desired. Interrupts may be re-enabled over
small code sequences where lr is saved before enabling interrupts and
restored after interrupts are again disabled. */
-
+
PUSH {r4, r5} // Save some preserved registers (r5 is saved just for 8-byte alignment)
BL readIntAck
MOV r4, r0
diff --git a/ports/cortex_a7/gnu/example_build/v7.h b/ports/cortex_a7/gnu/example_build/v7.h
index 5a08b43f..1133b0ac 100644
--- a/ports/cortex_a7/gnu/example_build/v7.h
+++ b/ports/cortex_a7/gnu/example_build/v7.h
@@ -4,7 +4,7 @@
//
// Copyright (c) 2011-2016 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
@@ -37,7 +37,6 @@ void disableInterrupts(void);
void invalidateCaches_IS(void);
void cleanInvalidateDCache(void);
-void invalidateCaches_IS(void);
void enableCaches(void);
void disableCaches(void);
void invalidateCaches(void);
diff --git a/ports/cortex_a7/gnu/example_build/v7.s b/ports/cortex_a7/gnu/example_build/v7.s
index 82c9ab1e..9487ddde 100644
--- a/ports/cortex_a7/gnu/example_build/v7.s
+++ b/ports/cortex_a7/gnu/example_build/v7.s
@@ -3,7 +3,7 @@
//
// Copyright (c) 2011-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
@@ -20,7 +20,7 @@
enableInterrupts:
CPSIE i
BX lr
-
+
.global disableInterrupts
.type disableInterrupts,function
@@ -28,7 +28,7 @@ enableInterrupts:
disableInterrupts:
CPSID i
BX lr
-
+
// ------------------------------------------------------------
// Cache Maintenance
@@ -44,7 +44,7 @@ enableCaches:
MCR p15, 0, r0, c1, c0, 0 // Write System Control Register
ISB
BX lr
-
+
.global disableCaches
@@ -57,7 +57,7 @@ disableCaches:
MCR p15, 0, r0, c1, c0, 0 // Write System Control Register
ISB
BX lr
-
+
.global cleanDCache
@@ -114,7 +114,7 @@ clean_dcache_finished:
POP {r4-r12}
BX lr
-
+
.global cleanInvalidateDCache
.type cleanInvalidateDCache,function
@@ -170,7 +170,7 @@ clean_invalidate_dcache_finished:
POP {r4-r12}
BX lr
-
+
.global invalidateCaches
@@ -229,7 +229,7 @@ invalidate_caches_skip:
invalidate_caches_finished:
POP {r4-r12}
BX lr
-
+
.global invalidateCaches_IS
@@ -284,7 +284,7 @@ invalidate_caches_is_skip:
invalidate_caches_is_finished:
POP {r4-r12}
BX lr
-
+
// ------------------------------------------------------------
// TLB
@@ -297,7 +297,7 @@ invalidateUnifiedTLB:
MOV r0, #0
MCR p15, 0, r0, c8, c7, 0 // TLBIALL - Invalidate entire unified TLB
BX lr
-
+
.global invalidateUnifiedTLB_IS
.type invalidateUnifiedTLB_IS,function
@@ -306,7 +306,7 @@ invalidateUnifiedTLB_IS:
MOV r0, #1
MCR p15, 0, r0, c8, c3, 0 // TLBIALLIS - Invalidate entire unified TLB Inner Shareable
BX lr
-
+
// ------------------------------------------------------------
// Branch Prediction
@@ -319,7 +319,7 @@ flushBranchTargetCache:
MOV r0, #0
MCR p15, 0, r0, c7, c5, 6 // BPIALL - Invalidate entire branch predictor array
BX lr
-
+
.global flushBranchTargetCache_IS
.type flushBranchTargetCache_IS,function
@@ -328,7 +328,7 @@ flushBranchTargetCache_IS:
MOV r0, #0
MCR p15, 0, r0, c7, c1, 6 // BPIALLIS - Invalidate entire branch predictor array Inner Shareable
BX lr
-
+
// ------------------------------------------------------------
// High Vecs
@@ -343,7 +343,7 @@ enableHighVecs:
MCR p15, 0, r0, c1, c0, 0 // Write Control Register
ISB
BX lr
-
+
.global disableHighVecs
.type disableHighVecs,function
@@ -354,7 +354,7 @@ disableHighVecs:
MCR p15, 0, r0, c1, c0, 0 // Write Control Register
ISB
BX lr
-
+
// ------------------------------------------------------------
// Context ID
@@ -366,7 +366,7 @@ disableHighVecs:
getContextID:
MRC p15, 0, r0, c13, c0, 1 // Read Context ID Register
BX lr
-
+
.global setContextID
.type setContextID,function
@@ -374,7 +374,7 @@ getContextID:
setContextID:
MCR p15, 0, r0, c13, c0, 1 // Write Context ID Register
BX lr
-
+
// ------------------------------------------------------------
// ID registers
@@ -386,7 +386,7 @@ setContextID:
getMIDR:
MRC p15, 0, r0, c0, c0, 0 // Read Main ID Register (MIDR)
BX lr
-
+
.global getMPIDR
.type getMPIDR,function
@@ -394,7 +394,7 @@ getMIDR:
getMPIDR:
MRC p15, 0, r0, c0 ,c0, 5// Read Multiprocessor ID register (MPIDR)
BX lr
-
+
// ------------------------------------------------------------
// CP15 SMP related
@@ -407,7 +407,7 @@ getMPIDR:
getBaseAddr:
MRC p15, 4, r0, c15, c0, 0 // Read peripheral base address
BX lr
-
+
// ------------------------------------------------------------
@@ -419,7 +419,7 @@ getCPUID:
MRC p15, 0, r0, c0, c0, 5 // Read CPU ID register
AND r0, r0, #0x03 // Mask off, leaving the CPU ID field
BX lr
-
+
// ------------------------------------------------------------
@@ -431,7 +431,7 @@ goToSleep:
WFI // Go into standby
B goToSleep // Catch in case of rogue events
BX lr
-
+
// ------------------------------------------------------------
@@ -451,7 +451,7 @@ joinSMP:
ISB
BX lr
-
+
// ------------------------------------------------------------
@@ -469,7 +469,7 @@ leaveSMP:
ISB
BX lr
-
+
// ------------------------------------------------------------
// End of v7.s
diff --git a/ports/cortex_a7/gnu/inc/tx_port.h b/ports/cortex_a7/gnu/inc/tx_port.h
index d80ddec1..f0153046 100644
--- a/ports/cortex_a7/gnu/inc/tx_port.h
+++ b/ports/cortex_a7/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,20 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -320,7 +307,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv7-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv7-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a7/gnu/readme_threadx.txt b/ports/cortex_a7/gnu/readme_threadx.txt
index 446d6bcf..32ab1df3 100644
--- a/ports/cortex_a7/gnu/readme_threadx.txt
+++ b/ports/cortex_a7/gnu/readme_threadx.txt
@@ -1,55 +1,55 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A7
+ Microsoft's Azure RTOS ThreadX for Cortex-A7
Using the GNU Tools
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the GNU
-development environment.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the GNU
+development environment.
-At this point you may run the build_threadx.bat batch file. This will build the
-ThreadX run-time environment in the "example_build" directory.
+At this point you may run the build_threadx.bat batch file. This will build the
+ThreadX run-time environment in the "example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
2. Demonstration System
-Building the demonstration is easy; simply execute the build_threadx_sample.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_sample.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with TX.A. The resulting file DEMO is a binary file
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with TX.A. The resulting file DEMO is a binary file
that can be downloaded and executed.
3. System Initialization
-The entry point in ThreadX for the Cortex-A7 using GNU tools is at label _start.
+The entry point in ThreadX for the Cortex-A7 using GNU tools is at label _start.
This is defined within the modified version of the GNU startup code - crt0.S.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up various
-system data structures, the interrupt vectors, and a periodic timer interrupt source.
-By default, the vector area is defined to be located at the "__vectors" label,
-which is defined in reset.S. This area is typically located at 0. In situations
-where this is impossible, the vectors at the "__vectors" label should be copied
+The ThreadX tx_initialize_low_level.S file is responsible for setting up various
+system data structures, the interrupt vectors, and a periodic timer interrupt source.
+By default, the vector area is defined to be located at the "__vectors" label,
+which is defined in reset.S. This area is typically located at 0. In situations
+where this is impossible, the vectors at the "__vectors" label should be copied
to address 0.
-This is also where initialization of a periodic timer interrupt source should take
+This is also where initialization of a periodic timer interrupt source should take
place.
-In addition, _tx_initialize_low_level defines the first available address
-for use by the application, which is supplied as the sole input parameter
+In addition, _tx_initialize_low_level defines the first available address
+for use by the application, which is supplied as the sole input parameter
to your application definition function, tx_application_define.
4. Assembler / Compiler Switches
-The following are compiler switches used in building the demonstration
+The following are compiler switches used in building the demonstration
system:
Compiler/Assembler Meaning
@@ -73,164 +73,164 @@ Application Defines ( -D option)
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S.
TX_ENABLE_FIQ_NESTING This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S. In addition,
IRQ nesting should also be enabled.
TX_ENABLE_FIQ_SUPPORT This compiler define enables FIQ
interrupt handling in the ThreadX
- generic C source. This define
+ generic C source. This define
should also be used in conjunction
with the corresponding assembler
- define.
+ define.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
5. Register Usage and Stack Frames
-The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -248,52 +248,52 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A7
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A7 vectors start at address zero. The demonstration system startup
-reset.S file contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+reset.S file contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
-ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
+ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
nested IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.S:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -301,7 +301,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -314,7 +314,7 @@ __tx_irq_processing_return:
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.S:
.global __tx_irq_example_handler
@@ -324,12 +324,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} @ Save some scratch registers
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
BL _tx_thread_vectored_context_save @ Call the vectored IRQ context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -346,22 +346,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -369,10 +369,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* Enable nested IRQ interrupts. NOTE: Since this service returns
-@ with IRQ interrupts enabled, all IRQ interrupt sources must be
+@ with IRQ interrupts enabled, all IRQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-@
+@
@ /* Application ISR call(s) go here! */
@
@ /* Disable nested IRQ interrupts. The mode is switched back to
@@ -385,12 +385,12 @@ __tx_irq_processing_return:
7.3 FIQ Interrupts
-By default, FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.S.
@@ -399,7 +399,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.S.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.S:
@@ -427,18 +427,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.S. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -454,7 +454,7 @@ __tx_fiq_processing_return:
@ interrupt, and all C scratch registers are available for use. */
@
@ /* Enable nested FIQ interrupts. NOTE: Since this service returns
-@ with FIQ interrupts enabled, all FIQ interrupt sources must be
+@ with FIQ interrupts enabled, all FIQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@
@@ -470,12 +470,12 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
-interrupt source, these services are not functional but the remainder of
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
+interrupt source, these services are not functional but the remainder of
ThreadX will still run.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.S for the demonstration system.
@@ -483,7 +483,7 @@ found in the file tx_initialize_low_level.S for the demonstration system.
9. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a7/gnu/src/tx_thread_context_restore.S b/ports/cortex_a7/gnu/src/tx_thread_context_restore.S
index 6b4a561d..41b0b0d0 100644
--- a/ports/cortex_a7/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a7/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,23 +80,6 @@ IRQ_MODE = 0x12 // IRQ mode
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_restore
.type _tx_thread_context_restore,function
diff --git a/ports/cortex_a7/gnu/src/tx_thread_context_save.S b/ports/cortex_a7/gnu/src/tx_thread_context_save.S
index eff06283..d2d29d34 100644
--- a/ports/cortex_a7/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a7/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,23 +72,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_save
.type _tx_thread_context_save,function
diff --git a/ports/cortex_a7/gnu/src/tx_thread_fiq_context_restore.S b/ports/cortex_a7/gnu/src/tx_thread_fiq_context_restore.S
index d2fbebe1..921c322c 100644
--- a/ports/cortex_a7/gnu/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_a7/gnu/src/tx_thread_fiq_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,20 +79,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* FIQ ISR Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_restore
.type _tx_thread_fiq_context_restore,function
diff --git a/ports/cortex_a7/gnu/src/tx_thread_fiq_context_save.S b/ports/cortex_a7/gnu/src/tx_thread_fiq_context_save.S
index 88472a3d..2f1a6c40 100644
--- a/ports/cortex_a7/gnu/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_a7/gnu/src/tx_thread_fiq_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_save
.type _tx_thread_fiq_context_save,function
diff --git a/ports/cortex_a7/gnu/src/tx_thread_fiq_nesting_end.S b/ports/cortex_a7/gnu/src/tx_thread_fiq_nesting_end.S
index fa3886b8..a7ce701e 100644
--- a/ports/cortex_a7/gnu/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_a7/gnu/src/tx_thread_fiq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ FIQ_MODE_BITS = 0x11 // FIQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/gnu/src/tx_thread_fiq_nesting_start.S b/ports/cortex_a7/gnu/src/tx_thread_fiq_nesting_start.S
index dbed1cf2..4f095dde 100644
--- a/ports/cortex_a7/gnu/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_a7/gnu/src/tx_thread_fiq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a7/gnu/src/tx_thread_interrupt_control.S
index d1223cb8..a5bc47f7 100644
--- a/ports/cortex_a7/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a7/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,20 +69,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a7/gnu/src/tx_thread_interrupt_disable.S
index a87d1a06..d7b53bc2 100644
--- a/ports/cortex_a7/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a7/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,20 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a7/gnu/src/tx_thread_interrupt_restore.S
index 53ff2813..3c31e94b 100644
--- a/ports/cortex_a7/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a7/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,20 +68,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/gnu/src/tx_thread_irq_nesting_end.S b/ports/cortex_a7/gnu/src/tx_thread_irq_nesting_end.S
index 18aebc7c..cc4db3a7 100644
--- a/ports/cortex_a7/gnu/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_a7/gnu/src/tx_thread_irq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/gnu/src/tx_thread_irq_nesting_start.S b/ports/cortex_a7/gnu/src/tx_thread_irq_nesting_start.S
index a2ffd35d..3635874d 100644
--- a/ports/cortex_a7/gnu/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_a7/gnu/src/tx_thread_irq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/gnu/src/tx_thread_schedule.S b/ports/cortex_a7/gnu/src/tx_thread_schedule.S
index 07dd6f7f..a74e2050 100644
--- a/ports/cortex_a7/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a7/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,6 +40,14 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode
+#ifdef TX_ENABLE_VFP_SUPPORT
+#define IRQ_MASK 0x80
+#endif
+
+#ifdef TX_ENABLE_FIQ_SUPPORT
+#define FIQ_MASK 0x40
+#endif
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
@@ -73,23 +82,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
@@ -259,3 +251,4 @@ no_fiq:
BX lr
#endif
+
diff --git a/ports/cortex_a7/gnu/src/tx_thread_stack_build.S b/ports/cortex_a7/gnu/src/tx_thread_stack_build.S
index 3876225a..827554a7 100644
--- a/ports/cortex_a7/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a7/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,20 +75,6 @@ CPSR_MASK = 0xBF // Mask initial CPSR, T, IRQ int
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/gnu/src/tx_thread_system_return.S b/ports/cortex_a7/gnu/src/tx_thread_system_return.S
index 0eed478d..1a17446b 100644
--- a/ports/cortex_a7/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a7/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,23 +69,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/gnu/src/tx_thread_vectored_context_save.S b/ports/cortex_a7/gnu/src/tx_thread_vectored_context_save.S
index fe8a98e8..91653b75 100644
--- a/ports/cortex_a7/gnu/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_a7/gnu/src/tx_thread_vectored_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_vectored_context_save
.type _tx_thread_vectored_context_save,function
diff --git a/ports/cortex_a7/gnu/src/tx_timer_interrupt.S b/ports/cortex_a7/gnu/src/tx_timer_interrupt.S
index cb0c1fa2..179ac894 100644
--- a/ports/cortex_a7/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a7/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,20 +78,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a7/iar/example_build/cstartup.s b/ports/cortex_a7/iar/example_build/cstartup.s
index 647de2e8..b4ed8f87 100644
--- a/ports/cortex_a7/iar/example_build/cstartup.s
+++ b/ports/cortex_a7/iar/example_build/cstartup.s
@@ -1,7 +1,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; Part one of the system initialization code,
+;; Part one of the system initialization code,
;; contains low-level
;; initialization.
;;
@@ -71,13 +71,13 @@ FIQ_Addr: DCD __tx_fiq_handler
SECTION .text:CODE:NOROOT(2)
-; PUBLIC ?cstartup
+; PUBLIC ?cstartup
EXTERN ?main
REQUIRE __vector
- ARM
-
-__iar_program_start:
+ ARM
+
+__iar_program_start:
?cstartup:
;
diff --git a/ports/cortex_a7/iar/example_build/sample_threadx.c b/ports/cortex_a7/iar/example_build/sample_threadx.c
index c2cc9886..02183317 100644
--- a/ports/cortex_a7/iar/example_build/sample_threadx.c
+++ b/ports/cortex_a7/iar/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -83,42 +83,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -126,23 +126,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -245,11 +245,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -308,7 +308,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -361,7 +361,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_a7/iar/example_build/tx_initialize_low_level.s b/ports/cortex_a7/iar/example_build/tx_initialize_low_level.s
index c30a14aa..6252bba4 100644
--- a/ports/cortex_a7/iar/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_a7/iar/example_build/tx_initialize_low_level.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -62,7 +62,7 @@ SYS_MODE DEFINE 0xDF ; Disable irq,fiq SYS mode
;
;
;
-;/* Define the FREE_MEM segment that will specify where free memory is
+;/* Define the FREE_MEM segment that will specify where free memory is
; defined. This must also be located in at the end of other RAM segments
; in the linker control file. The value of this segment is what is passed
; to tx_application_define. */
@@ -75,45 +75,39 @@ __tx_free_memory_start
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level Cortex-A7/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -146,7 +140,7 @@ _tx_initialize_low_level
;
LDR r2, =_tx_initialize_unused_memory ; Pickup unused memory ptr address
STR r0, [r2, #0] ; Save first free memory address
-;
+;
; /* Setup Timer for periodic interrupts. */
;
; /* Done, return to caller. */
@@ -188,7 +182,7 @@ __tx_reserved_handler
RSEG .text:CODE:NOROOT(2)
PUBLIC __tx_irq_handler
RSEG .text:CODE:NOROOT(2)
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -196,17 +190,17 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -221,7 +215,7 @@ __tx_irq_processing_return
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -240,22 +234,22 @@ __tx_irq_processing_return
; /* Jump to context save to save system context. */
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other registers
; BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -264,7 +258,7 @@ __tx_irq_processing_return
; /* Application IRQ handler is called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
@@ -288,11 +282,11 @@ __tx_fiq_processing_return
; /* At this point execution is still in the FIQ mode. The CPSR, point of
; interrupt, and all C scratch registers are available for use. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
; from FIQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with FIQ interrupts enabled.
+; system mode and returns with FIQ interrupts enabled.
;
-; NOTE: It is very important to ensure all FIQ interrupts are cleared
+; NOTE: It is very important to ensure all FIQ interrupts are cleared
; prior to enabling nested FIQ interrupts. */
#ifdef TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/cortex_a7/iar/inc/tx_port.h b/ports/cortex_a7/iar/inc/tx_port.h
index 3f1e8f9e..90477b76 100644
--- a/ports/cortex_a7/iar/inc/tx_port.h
+++ b/ports/cortex_a7/iar/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-A7/IAR */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-A7/IAR */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -79,7 +71,7 @@
#endif
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -115,12 +107,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -130,8 +122,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -188,7 +180,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -202,18 +194,18 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable; \
- VOID *tx_thread_iar_tls_pointer;
+ VOID *tx_thread_iar_tls_pointer;
#else
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable;
#endif
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -227,11 +219,11 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -241,23 +233,23 @@ ULONG _tx_misra_time_stamp_get(VOID);
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#if (__VER__ < 8000000)
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {_tx_iar_destroy_per_thread_tls_area(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
-#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
+#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#endif
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -285,8 +277,8 @@ void __iar_Initlocks(void);
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef TX_DISABLE_INLINE
@@ -297,22 +289,22 @@ void __iar_Initlocks(void);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (UINT) __CLZ(m); \
- b = 31 - b;
+ b = 31 - b;
#endif
#endif
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
/* First, check and see what mode the file is being compiled in. The IAR compiler
- defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
+ defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
is present. If ARM 32-bit mode is present, the fast CPSR manipulation macros
are available. Otherwise, if Thumb mode is present, we must use function calls. */
@@ -381,8 +373,8 @@ void tx_thread_vfp_disable(void);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-A7/IAR Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-A7/IAR Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a7/iar/readme_threadx.txt b/ports/cortex_a7/iar/readme_threadx.txt
index 7f16ed21..504b26ed 100644
--- a/ports/cortex_a7/iar/readme_threadx.txt
+++ b/ports/cortex_a7/iar/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A7
+ Microsoft's Azure RTOS ThreadX for Cortex-A7
Thumb & 32-bit Mode
@@ -7,10 +7,10 @@
1. Building the ThreadX run-time Library
Building the ThreadX library is easy. First, open the Azure RTOS workspace
-azure_rtos.eww. Next, make the TX project the "active project" in the
-IAR Embedded Workbench and select the "Make" button. You should observe
-assembly and compilation of a series of ThreadX source files. This
-results in the ThreadX run-time library file tx.a, which is needed by
+azure_rtos.eww. Next, make the TX project the "active project" in the
+IAR Embedded Workbench and select the "Make" button. You should observe
+assembly and compilation of a series of ThreadX source files. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
@@ -20,47 +20,47 @@ The ThreadX demonstration is designed to execute under the IAR
Windows-based Cortex-A7 simulator.
Building the demonstration is easy; simply make the sample_threadx.ewp project
-the "active project" in the IAR Embedded Workbench and select the
+the "active project" in the IAR Embedded Workbench and select the
"Make" button.
-You should observe the compilation of sample_threadx.c (which is the demonstration
+You should observe the compilation of sample_threadx.c (which is the demonstration
application) and linking with tx.a. The resulting file sample_threadx.out is a
binary file that can be downloaded and executed on IAR's Cortex-A7 simulator.
3. System Initialization
-The entry point in ThreadX for the Cortex-A7 using IAR tools is at label
-?cstartup. This is defined within the IAR compiler's startup code. In
-addition, this is where all static and global preset C variable
+The entry point in ThreadX for the Cortex-A7 using IAR tools is at label
+?cstartup. This is defined within the IAR compiler's startup code. In
+addition, this is where all static and global preset C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, and a periodic timer interrupt source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, and a periodic timer interrupt source.
By default, the vector area is defined at the top of cstartup.s, which is
-a slightly modified from the base IAR file.
+a slightly modified from the base IAR file.
The _tx_initialize_low_level function inside of tx_initialize_low_level.s
-also determines the first available address for use by the application, which
-is supplied as the sole input parameter to your application definition function,
-tx_application_define. To accomplish this, a section is created in
-tx_initialize_low_level.s called FREE_MEM, which must be located after all
+also determines the first available address for use by the application, which
+is supplied as the sole input parameter to your application definition function,
+tx_application_define. To accomplish this, a section is created in
+tx_initialize_low_level.s called FREE_MEM, which must be located after all
other RAM sections in memory.
4. Register Usage and Stack Frames
-The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
-scratch registers for each function. All other registers used by a C function
-must be preserved by the function. ThreadX takes advantage of this in
-situations where a context switch happens as a result of making a ThreadX
-service call (which is itself a C function). In such cases, the saved
+The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
+scratch registers for each function. All other registers used by a C function
+must be preserved by the function. ThreadX takes advantage of this in
+situations where a context switch happens as a result of making a ThreadX
+service call (which is itself a C function). In such cases, the saved
context of a thread is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -78,12 +78,12 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
5. Conditional Compilation Switches
@@ -92,146 +92,146 @@ The following are conditional compilation options for building the ThreadX libra
and application:
- TX_ENABLE_FIQ_SUPPORT This assembler/compiler define enables
+ TX_ENABLE_FIQ_SUPPORT This assembler/compiler define enables
FIQ interrupt handling support in the
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s.
TX_ENABLE_FIQ_NESTING This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s. In addition,
IRQ nesting should also be enabled.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
TX_THUMB Defined, this option enables the BX LR calling return sequence
@@ -245,29 +245,29 @@ and application:
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
-project to enable various compiler optimizations.
+project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A7
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A7 vectors start at address zero. The demonstration system startup
-cstartup.s file contains the vectors and is loaded at address zero.
-On actual hardware platforms, this area might have to be copied to address 0.
+cstartup.s file contains the vectors and is loaded at address zero.
+On actual hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -278,12 +278,12 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
PUBLIC __tx_irq_handler
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -291,7 +291,7 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -304,7 +304,7 @@ __tx_irq_processing_return
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.s:
@@ -315,12 +315,12 @@ __tx_example_vectored_irq_handler
; /* Jump to context save to save system context. */
STMDB sp!, {r0-r3} ; Save some scratch registers
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -337,24 +337,24 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
RSEG .text:CODE:NOROOT(2)
PUBLIC __tx_irq_handler
RSEG .text:CODE:NOROOT(2)
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -362,15 +362,15 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;
BL _tx_thread_irq_nesting_start
@@ -378,7 +378,7 @@ __tx_irq_processing_return
; /* Application ISR dispatch call goes here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;
BL _tx_thread_irq_nesting_end
@@ -389,12 +389,12 @@ __tx_irq_processing_return
7.3 FIQ Interrupts
-By default, Cortex-A7 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, Cortex-A7 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -403,7 +403,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.s.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.s:
@@ -434,18 +434,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.s. When nested FIQ interrupts are no
-longer required, calling the _tx_thread_fiq_nesting_end service disables
-nesting by disabling FIQ interrupts and switching back to FIQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.s. When nested FIQ interrupts are no
+longer required, calling the _tx_thread_fiq_nesting_end service disables
+nesting by disabling FIQ interrupts and switching back to FIQ mode in
preparation for the FIQ context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -463,7 +463,7 @@ __tx_fiq_processing_return:
; interrupt, and all C scratch registers are available for use. */
;
; /* Enable nested FIQ interrupts. NOTE: Since this service returns
-; with FIQ interrupts enabled, all FIQ interrupt sources must be
+; with FIQ interrupts enabled, all FIQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
;
@@ -479,22 +479,22 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
+To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
in the IRQ processing.
9. Thumb/Cortex-A7 Mixed Mode
-By default, ThreadX is setup for running in Cortex-A7 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
+By default, ThreadX is setup for running in Cortex-A7 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
ThreadX file and/or the application in Thumb mode. The only exception
-to this is the file tx_thread_shell_entry.c. This file must always be
-built in 32-bit mode. In addition, if any Thumb code is used the entire
+to this is the file tx_thread_shell_entry.c. This file must always be
+built in 32-bit mode. In addition, if any Thumb code is used the entire
ThreadX assembly source should be built with TX_THUMB defined.
@@ -506,14 +506,14 @@ should have the following line added (if not already in place):
initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
-The project options "General Options -> Library Configuration" should also have the
+The project options "General Options -> Library Configuration" should also have the
"Enable thread support in library" box selected.
11. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a7/iar/src/tx_iar.c b/ports/cortex_a7/iar/src/tx_iar.c
index a37231c8..238b485e 100644
--- a/ports/cortex_a7/iar/src/tx_iar.c
+++ b/ports/cortex_a7/iar/src/tx_iar.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** IAR Multithreaded Library Support */
/** */
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,24 +423,24 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#include
+#include
void * __aeabi_read_tp();
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports/cortex_a7/iar/src/tx_thread_context_restore.s b/ports/cortex_a7/iar/src/tx_thread_context_restore.s
index 0b3814a8..bf2238db 100644
--- a/ports/cortex_a7/iar/src/tx_thread_context_restore.s
+++ b/ports/cortex_a7/iar/src/tx_thread_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,7 +36,7 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
THUMB_MASK DEFINE 0x20 ; Thumb bit mask
SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
@@ -51,47 +51,38 @@ SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore Cortex-A7/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -121,13 +112,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3, #0] ; Store the counter
+ STR r2, [r3, #0] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -193,7 +184,7 @@ __tx_thread_preempt_restore
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
-
+
#ifdef __ARMVFP__
LDR r2, [r0, #144] ; Pickup the VFP enabled flag
CMP r2, #0 ; Is the VFP enabled?
@@ -204,7 +195,7 @@ __tx_thread_preempt_restore
VSTMDB sp!, {D0-D15} ; Save D0-D15
_tx_skip_fiq_vfp_save:
#endif
-
+
MOV r3, #1 ; Build interrupt stack type
STMDB sp!, {r3, r4} ; Save interrupt stack type and SPSR
STR sp, [r0, #8] ; Save stack pointer in thread control
diff --git a/ports/cortex_a7/iar/src/tx_thread_context_save.s b/ports/cortex_a7/iar/src/tx_thread_context_save.s
index dfbe7b7b..845284d2 100644
--- a/ports/cortex_a7/iar/src/tx_thread_context_save.s
+++ b/ports/cortex_a7/iar/src/tx_thread_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -43,46 +43,37 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save Cortex-A7/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
@@ -99,7 +90,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
#ifdef TX_ENABLE_FIQ_SUPPORT
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt CPSR
@@ -119,7 +110,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -135,7 +126,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -149,13 +140,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -175,7 +166,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -185,7 +176,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -200,7 +191,7 @@ __tx_thread_idle_system_save
#endif
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports/cortex_a7/iar/src/tx_thread_fiq_context_restore.s b/ports/cortex_a7/iar/src/tx_thread_fiq_context_restore.s
index af8f462b..3e62e30a 100644
--- a/ports/cortex_a7/iar/src/tx_thread_fiq_context_restore.s
+++ b/ports/cortex_a7/iar/src/tx_thread_fiq_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -37,7 +37,7 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
THUMB_MASK DEFINE 0x20 ; Thumb bit mask
IRQ_MODE_BITS DEFINE 0x12 ; IRQ mode bits
SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
@@ -52,47 +52,38 @@ SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
EXTERN _tx_execution_isr_exit
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_restore Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_restore Cortex-A7/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the fiq interrupt context when processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* FIQ ISR Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function restores the fiq interrupt context when processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* FIQ ISR Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_context_restore(VOID)
@@ -122,13 +113,13 @@ _tx_thread_fiq_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -172,7 +163,7 @@ __tx_thread_fiq_no_preempt_restore
; /* Restore interrupted thread or ISR. */
;
; /* Pickup the saved stack pointer. */
-; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
+; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
;
; /* Recover the saved context and return to the point of interrupt. */
;
@@ -232,7 +223,7 @@ _tx_skip_irq_vfp_save:
BEQ __tx_thread_fiq_dont_save_ts ; No, don't save it
;
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-; _tx_timer_time_slice = 0;
+; _tx_timer_time_slice = 0;
;
STR r2, [r0, #24] ; Save thread's time-slice
MOV r2, #0 ; Clear value
diff --git a/ports/cortex_a7/iar/src/tx_thread_fiq_context_save.s b/ports/cortex_a7/iar/src/tx_thread_fiq_context_save.s
index e43fdf76..e34824b1 100644
--- a/ports/cortex_a7/iar/src/tx_thread_fiq_context_save.s
+++ b/ports/cortex_a7/iar/src/tx_thread_fiq_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,46 +36,37 @@
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_save Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_save Cortex-A7/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
; VOID _tx_thread_fiq_context_save(VOID)
@@ -92,7 +83,7 @@ _tx_thread_fiq_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -107,7 +98,7 @@ _tx_thread_fiq_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -123,38 +114,38 @@ _tx_thread_fiq_context_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
__tx_thread_fiq_not_nested_save
-; }
+; }
;
; /* Otherwise, not nested, check to see if a thread was running. */
; else if (_tx_thread_current_ptr)
-; {
+; {
;
ADD r2, r2, #1 ; Increment the interrupt counter
STR r2, [r3] ; Store it back in the variable
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
-; ; scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
+; ; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, lr} ; Store other registers, Note that we don't
-; ; need to save sl and ip since FIQ has
-; ; copies of these registers. Nested
+; ; need to save sl and ip since FIQ has
+; ; copies of these registers. Nested
; ; interrupt processing does need to save
; ; these registers.
;
; /* Save the current stack pointer in the thread's control block. */
-; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
;
; /* Switch to the system stack. */
-; sp = _tx_thread_system_stack_ptr;
+; sp = _tx_thread_system_stack_ptr;
;
MOV r10, #0 ; Clear stack limit
@@ -167,7 +158,7 @@ __tx_thread_fiq_not_nested_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
; else
@@ -187,18 +178,18 @@ __tx_thread_fiq_idle_system_save
#endif
;
; /* Not much to do here, save the current SPSR and LR for possible
-; use in IRQ interrupted in idle system conditions, and return to
+; use in IRQ interrupted in idle system conditions, and return to
; FIQ interrupt processing. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, lr} ; Store other registers that will get used
-; ; or stripped off the stack in context
-; ; restore
- B __tx_fiq_processing_return ; Continue FIQ processing
+; ; or stripped off the stack in context
+; ; restore
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
-;}
+;}
;
;
END
diff --git a/ports/cortex_a7/iar/src/tx_thread_fiq_nesting_end.s b/ports/cortex_a7/iar/src/tx_thread_fiq_nesting_end.s
index 155a79b6..69d252bd 100644
--- a/ports/cortex_a7/iar/src/tx_thread_fiq_nesting_end.s
+++ b/ports/cortex_a7/iar/src/tx_thread_fiq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,55 +34,49 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
FIQ_MODE_BITS DEFINE 0x11 ; FIQ mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_end Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_end Cortex-A7/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-;/* processing from system mode back to FIQ mode prior to the ISR */
-;/* calling _tx_thread_fiq_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with FIQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+;/* processing from system mode back to FIQ mode prior to the ISR */
+;/* calling _tx_thread_fiq_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with FIQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_end(VOID)
diff --git a/ports/cortex_a7/iar/src/tx_thread_fiq_nesting_start.s b/ports/cortex_a7/iar/src/tx_thread_fiq_nesting_start.s
index 8b82e8eb..3a6ebbc7 100644
--- a/ports/cortex_a7/iar/src/tx_thread_fiq_nesting_start.s
+++ b/ports/cortex_a7/iar/src/tx_thread_fiq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ MODE_MASK DEFINE 0x1F ; Mode mask
SYS_MODE_BITS DEFINE 0x1F ; System mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_start Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_start Cortex-A7/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-;/* processing to the system mode so nested FIQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with FIQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+;/* processing to the system mode so nested FIQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with FIQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/cortex_a7/iar/src/tx_thread_interrupt_control.s b/ports/cortex_a7/iar/src/tx_thread_interrupt_control.s
index e4618a59..37aabfe1 100644
--- a/ports/cortex_a7/iar/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_a7/iar/src/tx_thread_interrupt_control.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,42 +35,36 @@ INT_MASK DEFINE 0x80 ; Interrupt bit mask
#endif
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control Cortex-A7/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/cortex_a7/iar/src/tx_thread_interrupt_disable.s b/ports/cortex_a7/iar/src/tx_thread_interrupt_disable.s
index 43c7952d..d35bdb1b 100644
--- a/ports/cortex_a7/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_a7/iar/src/tx_thread_interrupt_disable.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,41 +36,35 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable Cortex-A7/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(VOID)
diff --git a/ports/cortex_a7/iar/src/tx_thread_interrupt_restore.s b/ports/cortex_a7/iar/src/tx_thread_interrupt_restore.s
index 1893ce17..e3f63d52 100644
--- a/ports/cortex_a7/iar/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_a7/iar/src/tx_thread_interrupt_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -28,42 +28,36 @@
;#include "tx_thread.h"
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore Cortex-A7/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function is responsible for restoring interrupts to the state */
;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;void _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/cortex_a7/iar/src/tx_thread_irq_nesting_end.s b/ports/cortex_a7/iar/src/tx_thread_irq_nesting_end.s
index 5de63f0d..525c310d 100644
--- a/ports/cortex_a7/iar/src/tx_thread_irq_nesting_end.s
+++ b/ports/cortex_a7/iar/src/tx_thread_irq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,55 +35,49 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
IRQ_MODE_BITS DEFINE 0x12 ; IRQ mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end Cortex-A7/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
diff --git a/ports/cortex_a7/iar/src/tx_thread_irq_nesting_start.s b/ports/cortex_a7/iar/src/tx_thread_irq_nesting_start.s
index bf465f81..0e27b060 100644
--- a/ports/cortex_a7/iar/src/tx_thread_irq_nesting_start.s
+++ b/ports/cortex_a7/iar/src/tx_thread_irq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ MODE_MASK DEFINE 0x1F ; Mode mask
SYS_MODE_BITS DEFINE 0x1F ; System mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start Cortex-A7/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/cortex_a7/iar/src/tx_thread_schedule.s b/ports/cortex_a7/iar/src/tx_thread_schedule.s
index 985da38e..f0f0bf5b 100644
--- a/ports/cortex_a7/iar/src/tx_thread_schedule.s
+++ b/ports/cortex_a7/iar/src/tx_thread_schedule.s
@@ -1,18 +1,19 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -43,48 +44,39 @@ ENABLE_INTS DEFINE 0x80 ; IRQ Interrupts enabled mask
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule Cortex-A7/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
@@ -114,7 +106,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -123,7 +115,7 @@ __tx_thread_schedule_loop
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
;
- LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
STR r0, [r1, #0] ; Setup current thread pointer
;
; /* Increment the run count for this thread. */
@@ -137,7 +129,7 @@ __tx_thread_schedule_loop
; /* Setup time-slice, if present. */
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
;
- LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
+ LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
; variable
LDR sp, [r0, #8] ; Switch stack pointers
STR r3, [r2, #0] ; Setup time-slice
@@ -198,7 +190,7 @@ _tx_skip_solicited_vfp_restore:
#ifdef __ARMVFP__
PUBLIC tx_thread_vfp_enable
CODE32
-tx_thread_vfp_enable??rA
+tx_thread_vfp_enable??rA
tx_thread_vfp_enable
MRS r2, CPSR ; Pickup the CPSR
#ifdef TX_ENABLE_FIQ_SUPPORT
@@ -218,7 +210,7 @@ __tx_no_thread_to_enable:
PUBLIC tx_thread_vfp_disable
CODE32
-tx_thread_vfp_disable??rA
+tx_thread_vfp_disable??rA
tx_thread_vfp_disable
MRS r2, CPSR ; Pickup the CPSR
#ifdef TX_ENABLE_FIQ_SUPPORT
@@ -239,3 +231,4 @@ __tx_no_thread_to_disable:
END
+
diff --git a/ports/cortex_a7/iar/src/tx_thread_stack_build.s b/ports/cortex_a7/iar/src/tx_thread_stack_build.s
index fc4e5870..306dc03f 100644
--- a/ports/cortex_a7/iar/src/tx_thread_stack_build.s
+++ b/ports/cortex_a7/iar/src/tx_thread_stack_build.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -37,58 +37,52 @@ CPSR_MASK DEFINE 0x9F ; Mask initial CPSR, IRQ ints en
#endif
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build Cortex-A7/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function builds a stack frame on the supplied thread's stack. */
;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
;/* thread_ptr Pointer to thread control blk */
;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
;{
RSEG .text:CODE:NOROOT(2)
PUBLIC _tx_thread_stack_build
-
+
CODE32
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-A7 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports/cortex_a7/iar/src/tx_thread_system_return.s b/ports/cortex_a7/iar/src/tx_thread_system_return.s
index c35bc5f6..3bc43a36 100644
--- a/ports/cortex_a7/iar/src/tx_thread_system_return.s
+++ b/ports/cortex_a7/iar/src/tx_thread_system_return.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -42,47 +42,38 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return Cortex-A7/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
@@ -113,7 +104,7 @@ _tx_skip_solicited_vfp_save:
MOV r0, #0 ; Build a solicited stack type
MRS r1, CPSR ; Pickup the CPSR
STMDB sp!, {r0-r1} ; Save type and CPSR
-;
+;
; /* Lockout interrupts. */
;
ORR r2, r1, #DISABLE_INTS ; Build disable interrupt CPSR
diff --git a/ports/cortex_a7/iar/src/tx_thread_vectored_context_save.s b/ports/cortex_a7/iar/src/tx_thread_vectored_context_save.s
index da8794f7..9427f0a2 100644
--- a/ports/cortex_a7/iar/src/tx_thread_vectored_context_save.s
+++ b/ports/cortex_a7/iar/src/tx_thread_vectored_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -41,46 +41,37 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save Cortex-A7/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_vectored_context_save(VOID)
@@ -142,7 +133,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -174,7 +165,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports/cortex_a7/iar/src/tx_timer_interrupt.s b/ports/cortex_a7/iar/src/tx_timer_interrupt.s
index da4b2f3f..00ecfc46 100644
--- a/ports/cortex_a7/iar/src/tx_timer_interrupt.s
+++ b/ports/cortex_a7/iar/src/tx_timer_interrupt.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Timer */
;/** */
@@ -43,46 +43,40 @@
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt Cortex-A7/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt Cortex-A7/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time-slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time-slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -108,7 +102,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -226,13 +220,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports/cortex_a72/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a72/ac6/example_build/sample_threadx/.cproject
index 1f6965bf..d67ddd58 100644
--- a/ports/cortex_a72/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a72/ac6/example_build/sample_threadx/.cproject
@@ -1,158 +1,158 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a72/ac6/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a72/ac6/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a72/ac6/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a72/ac6/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a72/ac6/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a72/ac6/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a72/ac6/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a72/ac6/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a72/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a72/ac6/example_build/sample_threadx/sample_threadx.scat
index e5783c7c..d8dfde69 100644
--- a/ports/cortex_a72/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a72/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -2,7 +2,7 @@
; Scatter file for Armv8-A Startup code on FVP Base model
; Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;********************************************************
@@ -25,7 +25,7 @@ LOAD 0x80000000
; in source code for this to work correctly
;
ARM_LIB_HEAP +0 ALIGN 64 EMPTY 0xA0000 {}
-
+
;
; Handler stacks for all CPUs
; All stacks and heap are aligned to a cache-line boundary
diff --git a/ports/cortex_a72/ac6/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a72/ac6/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a72/ac6/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a72/ac6/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a72/ac6/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a72/ac6/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a72/ac6/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a72/ac6/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a72/ac6/example_build/tx/.cproject b/ports/cortex_a72/ac6/example_build/tx/.cproject
index 10cb82e1..e0dba893 100644
--- a/ports/cortex_a72/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a72/ac6/example_build/tx/.cproject
@@ -1,148 +1,148 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a72/ac6/inc/tx_port.h b/ports/cortex_a72/ac6/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a72/ac6/inc/tx_port.h
+++ b/ports/cortex_a72/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a72/ac6/src/tx_initialize_low_level.S b/ports/cortex_a72/ac6/src/tx_initialize_low_level.S
index f456574e..7d2a4be3 100644
--- a/ports/cortex_a72/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_a72/ac6/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_a72/ac6/src/tx_thread_context_restore.S b/ports/cortex_a72/ac6/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a72/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a72/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a72/ac6/src/tx_thread_context_save.S b/ports/cortex_a72/ac6/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a72/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a72/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a72/ac6/src/tx_thread_fp_disable.c b/ports/cortex_a72/ac6/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a72/ac6/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a72/ac6/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a72/ac6/src/tx_thread_fp_enable.c b/ports/cortex_a72/ac6/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a72/ac6/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a72/ac6/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a72/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a72/ac6/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a72/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a72/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a72/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a72/ac6/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a72/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a72/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a72/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a72/ac6/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a72/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a72/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a72/ac6/src/tx_thread_schedule.S b/ports/cortex_a72/ac6/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a72/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a72/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a72/ac6/src/tx_thread_stack_build.S b/ports/cortex_a72/ac6/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a72/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a72/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a72/ac6/src/tx_thread_system_return.S b/ports/cortex_a72/ac6/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a72/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a72/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a72/ac6/src/tx_timer_interrupt.S b/ports/cortex_a72/ac6/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a72/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a72/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a72/gnu/example_build/sample_threadx/.cproject b/ports/cortex_a72/gnu/example_build/sample_threadx/.cproject
index 1c32cb32..40d4912d 100644
--- a/ports/cortex_a72/gnu/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a72/gnu/example_build/sample_threadx/.cproject
@@ -1,170 +1,170 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a72/gnu/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a72/gnu/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a72/gnu/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a72/gnu/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a72/gnu/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a72/gnu/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a72/gnu/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a72/gnu/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a72/gnu/example_build/sample_threadx/sample_threadx.ld b/ports/cortex_a72/gnu/example_build/sample_threadx/sample_threadx.ld
index eec8f12b..3bf47736 100644
--- a/ports/cortex_a72/gnu/example_build/sample_threadx/sample_threadx.ld
+++ b/ports/cortex_a72/gnu/example_build/sample_threadx/sample_threadx.ld
@@ -1,7 +1,7 @@
/* Linker script to place sections and symbol values.
* It references following symbols, which must be defined in code:
* start64 : Entry point
- *
+ *
* It defines following symbols, which code can use without definition:
* __cs3_peripherals
* __code_start
diff --git a/ports/cortex_a72/gnu/example_build/sample_threadx/startup.S b/ports/cortex_a72/gnu/example_build/sample_threadx/startup.S
index b71b45f8..b44806fe 100644
--- a/ports/cortex_a72/gnu/example_build/sample_threadx/startup.S
+++ b/ports/cortex_a72/gnu/example_build/sample_threadx/startup.S
@@ -328,7 +328,7 @@ el1_entry_aarch64:
//
// Cortex-A processors automatically invalidate their caches on reset
// (unless suppressed with the DBGL1RSTDISABLE or L2RSTDISABLE pins).
- // It is therefore not necessary for software to invalidate the caches
+ // It is therefore not necessary for software to invalidate the caches
// on startup, however, this is done here in case of a warm reset.
bl InvalidateUDCaches
tlbi VMALLE1
diff --git a/ports/cortex_a72/gnu/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a72/gnu/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a72/gnu/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a72/gnu/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a72/gnu/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a72/gnu/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a72/gnu/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a72/gnu/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a72/gnu/example_build/tx/.cproject b/ports/cortex_a72/gnu/example_build/tx/.cproject
index f1b8ed5b..9e5a975e 100644
--- a/ports/cortex_a72/gnu/example_build/tx/.cproject
+++ b/ports/cortex_a72/gnu/example_build/tx/.cproject
@@ -1,164 +1,164 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a72/gnu/inc/tx_port.h b/ports/cortex_a72/gnu/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a72/gnu/inc/tx_port.h
+++ b/ports/cortex_a72/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a72/gnu/src/tx_initialize_low_level.S b/ports/cortex_a72/gnu/src/tx_initialize_low_level.S
index 3dce3cea..3025f12b 100644
--- a/ports/cortex_a72/gnu/src/tx_initialize_low_level.S
+++ b/ports/cortex_a72/gnu/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
@@ -99,4 +89,4 @@ _tx_initialize_low_level:
/* Done, return to caller. */
RET // Return to caller
-// }
+// }
diff --git a/ports/cortex_a72/gnu/src/tx_thread_context_restore.S b/ports/cortex_a72/gnu/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a72/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a72/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a72/gnu/src/tx_thread_context_save.S b/ports/cortex_a72/gnu/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a72/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a72/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a72/gnu/src/tx_thread_fp_disable.c b/ports/cortex_a72/gnu/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a72/gnu/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a72/gnu/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a72/gnu/src/tx_thread_fp_enable.c b/ports/cortex_a72/gnu/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a72/gnu/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a72/gnu/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a72/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a72/gnu/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a72/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a72/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a72/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a72/gnu/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a72/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a72/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a72/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a72/gnu/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a72/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a72/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a72/gnu/src/tx_thread_schedule.S b/ports/cortex_a72/gnu/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a72/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a72/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a72/gnu/src/tx_thread_stack_build.S b/ports/cortex_a72/gnu/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a72/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a72/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a72/gnu/src/tx_thread_system_return.S b/ports/cortex_a72/gnu/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a72/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a72/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a72/gnu/src/tx_timer_interrupt.S b/ports/cortex_a72/gnu/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a72/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a72/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a73/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a73/ac6/example_build/sample_threadx/.cproject
index 2d2e59d7..2280a7dd 100644
--- a/ports/cortex_a73/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a73/ac6/example_build/sample_threadx/.cproject
@@ -1,158 +1,158 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a73/ac6/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a73/ac6/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a73/ac6/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a73/ac6/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a73/ac6/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a73/ac6/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a73/ac6/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a73/ac6/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a73/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a73/ac6/example_build/sample_threadx/sample_threadx.scat
index e5783c7c..d8dfde69 100644
--- a/ports/cortex_a73/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a73/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -2,7 +2,7 @@
; Scatter file for Armv8-A Startup code on FVP Base model
; Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;********************************************************
@@ -25,7 +25,7 @@ LOAD 0x80000000
; in source code for this to work correctly
;
ARM_LIB_HEAP +0 ALIGN 64 EMPTY 0xA0000 {}
-
+
;
; Handler stacks for all CPUs
; All stacks and heap are aligned to a cache-line boundary
diff --git a/ports/cortex_a73/ac6/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a73/ac6/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a73/ac6/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a73/ac6/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a73/ac6/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a73/ac6/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a73/ac6/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a73/ac6/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a73/ac6/example_build/tx/.cproject b/ports/cortex_a73/ac6/example_build/tx/.cproject
index 1b43e008..2409ff43 100644
--- a/ports/cortex_a73/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a73/ac6/example_build/tx/.cproject
@@ -1,148 +1,148 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a73/ac6/inc/tx_port.h b/ports/cortex_a73/ac6/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a73/ac6/inc/tx_port.h
+++ b/ports/cortex_a73/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a73/ac6/src/tx_initialize_low_level.S b/ports/cortex_a73/ac6/src/tx_initialize_low_level.S
index f456574e..7d2a4be3 100644
--- a/ports/cortex_a73/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_a73/ac6/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_a73/ac6/src/tx_thread_context_restore.S b/ports/cortex_a73/ac6/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a73/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a73/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a73/ac6/src/tx_thread_context_save.S b/ports/cortex_a73/ac6/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a73/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a73/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a73/ac6/src/tx_thread_fp_disable.c b/ports/cortex_a73/ac6/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a73/ac6/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a73/ac6/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a73/ac6/src/tx_thread_fp_enable.c b/ports/cortex_a73/ac6/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a73/ac6/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a73/ac6/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a73/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a73/ac6/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a73/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a73/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a73/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a73/ac6/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a73/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a73/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a73/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a73/ac6/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a73/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a73/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a73/ac6/src/tx_thread_schedule.S b/ports/cortex_a73/ac6/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a73/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a73/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a73/ac6/src/tx_thread_stack_build.S b/ports/cortex_a73/ac6/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a73/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a73/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a73/ac6/src/tx_thread_system_return.S b/ports/cortex_a73/ac6/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a73/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a73/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a73/ac6/src/tx_timer_interrupt.S b/ports/cortex_a73/ac6/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a73/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a73/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a73/gnu/example_build/sample_threadx/.cproject b/ports/cortex_a73/gnu/example_build/sample_threadx/.cproject
index 1c32cb32..40d4912d 100644
--- a/ports/cortex_a73/gnu/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a73/gnu/example_build/sample_threadx/.cproject
@@ -1,170 +1,170 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a73/gnu/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a73/gnu/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a73/gnu/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a73/gnu/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a73/gnu/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a73/gnu/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a73/gnu/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a73/gnu/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a73/gnu/example_build/sample_threadx/sample_threadx.ld b/ports/cortex_a73/gnu/example_build/sample_threadx/sample_threadx.ld
index eec8f12b..3bf47736 100644
--- a/ports/cortex_a73/gnu/example_build/sample_threadx/sample_threadx.ld
+++ b/ports/cortex_a73/gnu/example_build/sample_threadx/sample_threadx.ld
@@ -1,7 +1,7 @@
/* Linker script to place sections and symbol values.
* It references following symbols, which must be defined in code:
* start64 : Entry point
- *
+ *
* It defines following symbols, which code can use without definition:
* __cs3_peripherals
* __code_start
diff --git a/ports/cortex_a73/gnu/example_build/sample_threadx/startup.S b/ports/cortex_a73/gnu/example_build/sample_threadx/startup.S
index b71b45f8..b44806fe 100644
--- a/ports/cortex_a73/gnu/example_build/sample_threadx/startup.S
+++ b/ports/cortex_a73/gnu/example_build/sample_threadx/startup.S
@@ -328,7 +328,7 @@ el1_entry_aarch64:
//
// Cortex-A processors automatically invalidate their caches on reset
// (unless suppressed with the DBGL1RSTDISABLE or L2RSTDISABLE pins).
- // It is therefore not necessary for software to invalidate the caches
+ // It is therefore not necessary for software to invalidate the caches
// on startup, however, this is done here in case of a warm reset.
bl InvalidateUDCaches
tlbi VMALLE1
diff --git a/ports/cortex_a73/gnu/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a73/gnu/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a73/gnu/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a73/gnu/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a73/gnu/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a73/gnu/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a73/gnu/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a73/gnu/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a73/gnu/example_build/tx/.cproject b/ports/cortex_a73/gnu/example_build/tx/.cproject
index f1b8ed5b..9e5a975e 100644
--- a/ports/cortex_a73/gnu/example_build/tx/.cproject
+++ b/ports/cortex_a73/gnu/example_build/tx/.cproject
@@ -1,164 +1,164 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a73/gnu/inc/tx_port.h b/ports/cortex_a73/gnu/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a73/gnu/inc/tx_port.h
+++ b/ports/cortex_a73/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a73/gnu/src/tx_initialize_low_level.S b/ports/cortex_a73/gnu/src/tx_initialize_low_level.S
index 3dce3cea..3025f12b 100644
--- a/ports/cortex_a73/gnu/src/tx_initialize_low_level.S
+++ b/ports/cortex_a73/gnu/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
@@ -99,4 +89,4 @@ _tx_initialize_low_level:
/* Done, return to caller. */
RET // Return to caller
-// }
+// }
diff --git a/ports/cortex_a73/gnu/src/tx_thread_context_restore.S b/ports/cortex_a73/gnu/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a73/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a73/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a73/gnu/src/tx_thread_context_save.S b/ports/cortex_a73/gnu/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a73/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a73/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a73/gnu/src/tx_thread_fp_disable.c b/ports/cortex_a73/gnu/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a73/gnu/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a73/gnu/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a73/gnu/src/tx_thread_fp_enable.c b/ports/cortex_a73/gnu/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a73/gnu/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a73/gnu/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a73/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a73/gnu/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a73/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a73/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a73/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a73/gnu/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a73/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a73/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a73/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a73/gnu/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a73/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a73/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a73/gnu/src/tx_thread_schedule.S b/ports/cortex_a73/gnu/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a73/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a73/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a73/gnu/src/tx_thread_stack_build.S b/ports/cortex_a73/gnu/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a73/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a73/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a73/gnu/src/tx_thread_system_return.S b/ports/cortex_a73/gnu/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a73/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a73/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a73/gnu/src/tx_timer_interrupt.S b/ports/cortex_a73/gnu/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a73/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a73/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a75/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a75/ac6/example_build/sample_threadx/.cproject
index b8d51c26..fdf1a4fa 100644
--- a/ports/cortex_a75/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a75/ac6/example_build/sample_threadx/.cproject
@@ -1,158 +1,158 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a75/ac6/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a75/ac6/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a75/ac6/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a75/ac6/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a75/ac6/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a75/ac6/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a75/ac6/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a75/ac6/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a75/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a75/ac6/example_build/sample_threadx/sample_threadx.scat
index e5783c7c..d8dfde69 100644
--- a/ports/cortex_a75/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a75/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -2,7 +2,7 @@
; Scatter file for Armv8-A Startup code on FVP Base model
; Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;********************************************************
@@ -25,7 +25,7 @@ LOAD 0x80000000
; in source code for this to work correctly
;
ARM_LIB_HEAP +0 ALIGN 64 EMPTY 0xA0000 {}
-
+
;
; Handler stacks for all CPUs
; All stacks and heap are aligned to a cache-line boundary
diff --git a/ports/cortex_a75/ac6/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a75/ac6/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a75/ac6/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a75/ac6/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a75/ac6/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a75/ac6/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a75/ac6/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a75/ac6/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a75/ac6/example_build/tx/.cproject b/ports/cortex_a75/ac6/example_build/tx/.cproject
index e9bbc8ae..55b898b3 100644
--- a/ports/cortex_a75/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a75/ac6/example_build/tx/.cproject
@@ -1,148 +1,148 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a75/ac6/inc/tx_port.h b/ports/cortex_a75/ac6/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a75/ac6/inc/tx_port.h
+++ b/ports/cortex_a75/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a75/ac6/src/tx_initialize_low_level.S b/ports/cortex_a75/ac6/src/tx_initialize_low_level.S
index f456574e..7d2a4be3 100644
--- a/ports/cortex_a75/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_a75/ac6/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_a75/ac6/src/tx_thread_context_restore.S b/ports/cortex_a75/ac6/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a75/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a75/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a75/ac6/src/tx_thread_context_save.S b/ports/cortex_a75/ac6/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a75/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a75/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a75/ac6/src/tx_thread_fp_disable.c b/ports/cortex_a75/ac6/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a75/ac6/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a75/ac6/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a75/ac6/src/tx_thread_fp_enable.c b/ports/cortex_a75/ac6/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a75/ac6/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a75/ac6/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a75/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a75/ac6/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a75/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a75/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a75/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a75/ac6/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a75/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a75/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a75/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a75/ac6/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a75/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a75/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a75/ac6/src/tx_thread_schedule.S b/ports/cortex_a75/ac6/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a75/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a75/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a75/ac6/src/tx_thread_stack_build.S b/ports/cortex_a75/ac6/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a75/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a75/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a75/ac6/src/tx_thread_system_return.S b/ports/cortex_a75/ac6/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a75/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a75/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a75/ac6/src/tx_timer_interrupt.S b/ports/cortex_a75/ac6/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a75/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a75/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a75/gnu/example_build/sample_threadx/.cproject b/ports/cortex_a75/gnu/example_build/sample_threadx/.cproject
index 1c32cb32..40d4912d 100644
--- a/ports/cortex_a75/gnu/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a75/gnu/example_build/sample_threadx/.cproject
@@ -1,170 +1,170 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a75/gnu/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a75/gnu/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a75/gnu/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a75/gnu/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a75/gnu/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a75/gnu/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a75/gnu/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a75/gnu/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a75/gnu/example_build/sample_threadx/sample_threadx.ld b/ports/cortex_a75/gnu/example_build/sample_threadx/sample_threadx.ld
index eec8f12b..3bf47736 100644
--- a/ports/cortex_a75/gnu/example_build/sample_threadx/sample_threadx.ld
+++ b/ports/cortex_a75/gnu/example_build/sample_threadx/sample_threadx.ld
@@ -1,7 +1,7 @@
/* Linker script to place sections and symbol values.
* It references following symbols, which must be defined in code:
* start64 : Entry point
- *
+ *
* It defines following symbols, which code can use without definition:
* __cs3_peripherals
* __code_start
diff --git a/ports/cortex_a75/gnu/example_build/sample_threadx/startup.S b/ports/cortex_a75/gnu/example_build/sample_threadx/startup.S
index b71b45f8..b44806fe 100644
--- a/ports/cortex_a75/gnu/example_build/sample_threadx/startup.S
+++ b/ports/cortex_a75/gnu/example_build/sample_threadx/startup.S
@@ -328,7 +328,7 @@ el1_entry_aarch64:
//
// Cortex-A processors automatically invalidate their caches on reset
// (unless suppressed with the DBGL1RSTDISABLE or L2RSTDISABLE pins).
- // It is therefore not necessary for software to invalidate the caches
+ // It is therefore not necessary for software to invalidate the caches
// on startup, however, this is done here in case of a warm reset.
bl InvalidateUDCaches
tlbi VMALLE1
diff --git a/ports/cortex_a75/gnu/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a75/gnu/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a75/gnu/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a75/gnu/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a75/gnu/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a75/gnu/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a75/gnu/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a75/gnu/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a75/gnu/example_build/tx/.cproject b/ports/cortex_a75/gnu/example_build/tx/.cproject
index f1b8ed5b..9e5a975e 100644
--- a/ports/cortex_a75/gnu/example_build/tx/.cproject
+++ b/ports/cortex_a75/gnu/example_build/tx/.cproject
@@ -1,164 +1,164 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a75/gnu/inc/tx_port.h b/ports/cortex_a75/gnu/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a75/gnu/inc/tx_port.h
+++ b/ports/cortex_a75/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a75/gnu/src/tx_initialize_low_level.S b/ports/cortex_a75/gnu/src/tx_initialize_low_level.S
index 3dce3cea..3025f12b 100644
--- a/ports/cortex_a75/gnu/src/tx_initialize_low_level.S
+++ b/ports/cortex_a75/gnu/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
@@ -99,4 +89,4 @@ _tx_initialize_low_level:
/* Done, return to caller. */
RET // Return to caller
-// }
+// }
diff --git a/ports/cortex_a75/gnu/src/tx_thread_context_restore.S b/ports/cortex_a75/gnu/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a75/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a75/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a75/gnu/src/tx_thread_context_save.S b/ports/cortex_a75/gnu/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a75/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a75/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a75/gnu/src/tx_thread_fp_disable.c b/ports/cortex_a75/gnu/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a75/gnu/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a75/gnu/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a75/gnu/src/tx_thread_fp_enable.c b/ports/cortex_a75/gnu/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a75/gnu/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a75/gnu/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a75/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a75/gnu/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a75/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a75/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a75/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a75/gnu/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a75/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a75/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a75/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a75/gnu/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a75/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a75/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a75/gnu/src/tx_thread_schedule.S b/ports/cortex_a75/gnu/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a75/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a75/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a75/gnu/src/tx_thread_stack_build.S b/ports/cortex_a75/gnu/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a75/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a75/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a75/gnu/src/tx_thread_system_return.S b/ports/cortex_a75/gnu/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a75/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a75/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a75/gnu/src/tx_timer_interrupt.S b/ports/cortex_a75/gnu/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a75/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a75/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a76/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a76/ac6/example_build/sample_threadx/.cproject
index 710476e9..0de7cf84 100644
--- a/ports/cortex_a76/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a76/ac6/example_build/sample_threadx/.cproject
@@ -1,158 +1,158 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a76/ac6/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a76/ac6/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a76/ac6/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a76/ac6/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a76/ac6/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a76/ac6/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a76/ac6/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a76/ac6/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a76/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a76/ac6/example_build/sample_threadx/sample_threadx.scat
index e5783c7c..d8dfde69 100644
--- a/ports/cortex_a76/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a76/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -2,7 +2,7 @@
; Scatter file for Armv8-A Startup code on FVP Base model
; Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;********************************************************
@@ -25,7 +25,7 @@ LOAD 0x80000000
; in source code for this to work correctly
;
ARM_LIB_HEAP +0 ALIGN 64 EMPTY 0xA0000 {}
-
+
;
; Handler stacks for all CPUs
; All stacks and heap are aligned to a cache-line boundary
diff --git a/ports/cortex_a76/ac6/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a76/ac6/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a76/ac6/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a76/ac6/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a76/ac6/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a76/ac6/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a76/ac6/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a76/ac6/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a76/ac6/example_build/tx/.cproject b/ports/cortex_a76/ac6/example_build/tx/.cproject
index 8f5835ec..feedcae1 100644
--- a/ports/cortex_a76/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a76/ac6/example_build/tx/.cproject
@@ -1,148 +1,148 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a76/ac6/inc/tx_port.h b/ports/cortex_a76/ac6/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a76/ac6/inc/tx_port.h
+++ b/ports/cortex_a76/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a76/ac6/src/tx_initialize_low_level.S b/ports/cortex_a76/ac6/src/tx_initialize_low_level.S
index f456574e..7d2a4be3 100644
--- a/ports/cortex_a76/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_a76/ac6/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_a76/ac6/src/tx_thread_context_restore.S b/ports/cortex_a76/ac6/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a76/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a76/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a76/ac6/src/tx_thread_context_save.S b/ports/cortex_a76/ac6/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a76/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a76/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a76/ac6/src/tx_thread_fp_disable.c b/ports/cortex_a76/ac6/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a76/ac6/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a76/ac6/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a76/ac6/src/tx_thread_fp_enable.c b/ports/cortex_a76/ac6/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a76/ac6/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a76/ac6/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a76/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a76/ac6/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a76/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a76/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a76/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a76/ac6/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a76/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a76/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a76/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a76/ac6/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a76/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a76/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a76/ac6/src/tx_thread_schedule.S b/ports/cortex_a76/ac6/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a76/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a76/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a76/ac6/src/tx_thread_stack_build.S b/ports/cortex_a76/ac6/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a76/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a76/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a76/ac6/src/tx_thread_system_return.S b/ports/cortex_a76/ac6/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a76/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a76/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a76/ac6/src/tx_timer_interrupt.S b/ports/cortex_a76/ac6/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a76/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a76/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a76/gnu/example_build/sample_threadx/.cproject b/ports/cortex_a76/gnu/example_build/sample_threadx/.cproject
index 1c32cb32..40d4912d 100644
--- a/ports/cortex_a76/gnu/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a76/gnu/example_build/sample_threadx/.cproject
@@ -1,170 +1,170 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a76/gnu/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a76/gnu/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a76/gnu/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a76/gnu/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a76/gnu/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a76/gnu/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a76/gnu/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a76/gnu/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a76/gnu/example_build/sample_threadx/sample_threadx.ld b/ports/cortex_a76/gnu/example_build/sample_threadx/sample_threadx.ld
index eec8f12b..3bf47736 100644
--- a/ports/cortex_a76/gnu/example_build/sample_threadx/sample_threadx.ld
+++ b/ports/cortex_a76/gnu/example_build/sample_threadx/sample_threadx.ld
@@ -1,7 +1,7 @@
/* Linker script to place sections and symbol values.
* It references following symbols, which must be defined in code:
* start64 : Entry point
- *
+ *
* It defines following symbols, which code can use without definition:
* __cs3_peripherals
* __code_start
diff --git a/ports/cortex_a76/gnu/example_build/sample_threadx/startup.S b/ports/cortex_a76/gnu/example_build/sample_threadx/startup.S
index b71b45f8..b44806fe 100644
--- a/ports/cortex_a76/gnu/example_build/sample_threadx/startup.S
+++ b/ports/cortex_a76/gnu/example_build/sample_threadx/startup.S
@@ -328,7 +328,7 @@ el1_entry_aarch64:
//
// Cortex-A processors automatically invalidate their caches on reset
// (unless suppressed with the DBGL1RSTDISABLE or L2RSTDISABLE pins).
- // It is therefore not necessary for software to invalidate the caches
+ // It is therefore not necessary for software to invalidate the caches
// on startup, however, this is done here in case of a warm reset.
bl InvalidateUDCaches
tlbi VMALLE1
diff --git a/ports/cortex_a76/gnu/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a76/gnu/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a76/gnu/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a76/gnu/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a76/gnu/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a76/gnu/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a76/gnu/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a76/gnu/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a76/gnu/example_build/tx/.cproject b/ports/cortex_a76/gnu/example_build/tx/.cproject
index f1b8ed5b..9e5a975e 100644
--- a/ports/cortex_a76/gnu/example_build/tx/.cproject
+++ b/ports/cortex_a76/gnu/example_build/tx/.cproject
@@ -1,164 +1,164 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a76/gnu/inc/tx_port.h b/ports/cortex_a76/gnu/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a76/gnu/inc/tx_port.h
+++ b/ports/cortex_a76/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a76/gnu/src/tx_initialize_low_level.S b/ports/cortex_a76/gnu/src/tx_initialize_low_level.S
index 3dce3cea..3025f12b 100644
--- a/ports/cortex_a76/gnu/src/tx_initialize_low_level.S
+++ b/ports/cortex_a76/gnu/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
@@ -99,4 +89,4 @@ _tx_initialize_low_level:
/* Done, return to caller. */
RET // Return to caller
-// }
+// }
diff --git a/ports/cortex_a76/gnu/src/tx_thread_context_restore.S b/ports/cortex_a76/gnu/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a76/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a76/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a76/gnu/src/tx_thread_context_save.S b/ports/cortex_a76/gnu/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a76/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a76/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a76/gnu/src/tx_thread_fp_disable.c b/ports/cortex_a76/gnu/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a76/gnu/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a76/gnu/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a76/gnu/src/tx_thread_fp_enable.c b/ports/cortex_a76/gnu/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a76/gnu/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a76/gnu/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a76/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a76/gnu/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a76/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a76/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a76/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a76/gnu/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a76/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a76/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a76/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a76/gnu/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a76/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a76/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a76/gnu/src/tx_thread_schedule.S b/ports/cortex_a76/gnu/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a76/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a76/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a76/gnu/src/tx_thread_stack_build.S b/ports/cortex_a76/gnu/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a76/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a76/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a76/gnu/src/tx_thread_system_return.S b/ports/cortex_a76/gnu/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a76/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a76/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a76/gnu/src/tx_timer_interrupt.S b/ports/cortex_a76/gnu/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a76/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a76/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a76ae/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a76ae/ac6/example_build/sample_threadx/.cproject
index 7d177795..e4ad93db 100644
--- a/ports/cortex_a76ae/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a76ae/ac6/example_build/sample_threadx/.cproject
@@ -1,158 +1,158 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a76ae/ac6/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a76ae/ac6/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a76ae/ac6/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a76ae/ac6/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a76ae/ac6/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a76ae/ac6/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a76ae/ac6/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a76ae/ac6/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a76ae/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a76ae/ac6/example_build/sample_threadx/sample_threadx.scat
index e5783c7c..d8dfde69 100644
--- a/ports/cortex_a76ae/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a76ae/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -2,7 +2,7 @@
; Scatter file for Armv8-A Startup code on FVP Base model
; Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;********************************************************
@@ -25,7 +25,7 @@ LOAD 0x80000000
; in source code for this to work correctly
;
ARM_LIB_HEAP +0 ALIGN 64 EMPTY 0xA0000 {}
-
+
;
; Handler stacks for all CPUs
; All stacks and heap are aligned to a cache-line boundary
diff --git a/ports/cortex_a76ae/ac6/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a76ae/ac6/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a76ae/ac6/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a76ae/ac6/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a76ae/ac6/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a76ae/ac6/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a76ae/ac6/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a76ae/ac6/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a76ae/ac6/example_build/tx/.cproject b/ports/cortex_a76ae/ac6/example_build/tx/.cproject
index e51aafe2..9f404004 100644
--- a/ports/cortex_a76ae/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a76ae/ac6/example_build/tx/.cproject
@@ -1,148 +1,148 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a76ae/ac6/inc/tx_port.h b/ports/cortex_a76ae/ac6/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a76ae/ac6/inc/tx_port.h
+++ b/ports/cortex_a76ae/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a76ae/ac6/src/tx_initialize_low_level.S b/ports/cortex_a76ae/ac6/src/tx_initialize_low_level.S
index f456574e..7d2a4be3 100644
--- a/ports/cortex_a76ae/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_a76ae/ac6/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_a76ae/ac6/src/tx_thread_context_restore.S b/ports/cortex_a76ae/ac6/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a76ae/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a76ae/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a76ae/ac6/src/tx_thread_context_save.S b/ports/cortex_a76ae/ac6/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a76ae/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a76ae/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a76ae/ac6/src/tx_thread_fp_disable.c b/ports/cortex_a76ae/ac6/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a76ae/ac6/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a76ae/ac6/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a76ae/ac6/src/tx_thread_fp_enable.c b/ports/cortex_a76ae/ac6/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a76ae/ac6/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a76ae/ac6/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a76ae/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a76ae/ac6/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a76ae/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a76ae/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a76ae/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a76ae/ac6/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a76ae/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a76ae/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a76ae/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a76ae/ac6/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a76ae/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a76ae/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a76ae/ac6/src/tx_thread_schedule.S b/ports/cortex_a76ae/ac6/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a76ae/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a76ae/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a76ae/ac6/src/tx_thread_stack_build.S b/ports/cortex_a76ae/ac6/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a76ae/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a76ae/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a76ae/ac6/src/tx_thread_system_return.S b/ports/cortex_a76ae/ac6/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a76ae/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a76ae/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a76ae/ac6/src/tx_timer_interrupt.S b/ports/cortex_a76ae/ac6/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a76ae/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a76ae/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a76ae/gnu/example_build/sample_threadx/.cproject b/ports/cortex_a76ae/gnu/example_build/sample_threadx/.cproject
index 1c32cb32..40d4912d 100644
--- a/ports/cortex_a76ae/gnu/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a76ae/gnu/example_build/sample_threadx/.cproject
@@ -1,170 +1,170 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a76ae/gnu/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a76ae/gnu/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a76ae/gnu/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a76ae/gnu/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a76ae/gnu/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a76ae/gnu/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a76ae/gnu/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a76ae/gnu/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a76ae/gnu/example_build/sample_threadx/sample_threadx.ld b/ports/cortex_a76ae/gnu/example_build/sample_threadx/sample_threadx.ld
index eec8f12b..3bf47736 100644
--- a/ports/cortex_a76ae/gnu/example_build/sample_threadx/sample_threadx.ld
+++ b/ports/cortex_a76ae/gnu/example_build/sample_threadx/sample_threadx.ld
@@ -1,7 +1,7 @@
/* Linker script to place sections and symbol values.
* It references following symbols, which must be defined in code:
* start64 : Entry point
- *
+ *
* It defines following symbols, which code can use without definition:
* __cs3_peripherals
* __code_start
diff --git a/ports/cortex_a76ae/gnu/example_build/sample_threadx/startup.S b/ports/cortex_a76ae/gnu/example_build/sample_threadx/startup.S
index b71b45f8..b44806fe 100644
--- a/ports/cortex_a76ae/gnu/example_build/sample_threadx/startup.S
+++ b/ports/cortex_a76ae/gnu/example_build/sample_threadx/startup.S
@@ -328,7 +328,7 @@ el1_entry_aarch64:
//
// Cortex-A processors automatically invalidate their caches on reset
// (unless suppressed with the DBGL1RSTDISABLE or L2RSTDISABLE pins).
- // It is therefore not necessary for software to invalidate the caches
+ // It is therefore not necessary for software to invalidate the caches
// on startup, however, this is done here in case of a warm reset.
bl InvalidateUDCaches
tlbi VMALLE1
diff --git a/ports/cortex_a76ae/gnu/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a76ae/gnu/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a76ae/gnu/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a76ae/gnu/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a76ae/gnu/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a76ae/gnu/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a76ae/gnu/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a76ae/gnu/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a76ae/gnu/example_build/tx/.cproject b/ports/cortex_a76ae/gnu/example_build/tx/.cproject
index f1b8ed5b..9e5a975e 100644
--- a/ports/cortex_a76ae/gnu/example_build/tx/.cproject
+++ b/ports/cortex_a76ae/gnu/example_build/tx/.cproject
@@ -1,164 +1,164 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a76ae/gnu/inc/tx_port.h b/ports/cortex_a76ae/gnu/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a76ae/gnu/inc/tx_port.h
+++ b/ports/cortex_a76ae/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a76ae/gnu/src/tx_initialize_low_level.S b/ports/cortex_a76ae/gnu/src/tx_initialize_low_level.S
index 3dce3cea..3025f12b 100644
--- a/ports/cortex_a76ae/gnu/src/tx_initialize_low_level.S
+++ b/ports/cortex_a76ae/gnu/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
@@ -99,4 +89,4 @@ _tx_initialize_low_level:
/* Done, return to caller. */
RET // Return to caller
-// }
+// }
diff --git a/ports/cortex_a76ae/gnu/src/tx_thread_context_restore.S b/ports/cortex_a76ae/gnu/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a76ae/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a76ae/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a76ae/gnu/src/tx_thread_context_save.S b/ports/cortex_a76ae/gnu/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a76ae/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a76ae/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a76ae/gnu/src/tx_thread_fp_disable.c b/ports/cortex_a76ae/gnu/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a76ae/gnu/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a76ae/gnu/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a76ae/gnu/src/tx_thread_fp_enable.c b/ports/cortex_a76ae/gnu/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a76ae/gnu/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a76ae/gnu/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a76ae/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a76ae/gnu/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a76ae/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a76ae/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a76ae/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a76ae/gnu/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a76ae/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a76ae/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a76ae/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a76ae/gnu/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a76ae/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a76ae/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a76ae/gnu/src/tx_thread_schedule.S b/ports/cortex_a76ae/gnu/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a76ae/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a76ae/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a76ae/gnu/src/tx_thread_stack_build.S b/ports/cortex_a76ae/gnu/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a76ae/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a76ae/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a76ae/gnu/src/tx_thread_system_return.S b/ports/cortex_a76ae/gnu/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a76ae/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a76ae/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a76ae/gnu/src/tx_timer_interrupt.S b/ports/cortex_a76ae/gnu/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a76ae/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a76ae/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a77/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a77/ac6/example_build/sample_threadx/.cproject
index c6e9771f..f097ca78 100644
--- a/ports/cortex_a77/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a77/ac6/example_build/sample_threadx/.cproject
@@ -1,158 +1,158 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a77/ac6/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a77/ac6/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a77/ac6/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a77/ac6/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a77/ac6/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a77/ac6/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a77/ac6/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a77/ac6/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a77/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a77/ac6/example_build/sample_threadx/sample_threadx.scat
index e5783c7c..d8dfde69 100644
--- a/ports/cortex_a77/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a77/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -2,7 +2,7 @@
; Scatter file for Armv8-A Startup code on FVP Base model
; Copyright (c) 2014-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;********************************************************
@@ -25,7 +25,7 @@ LOAD 0x80000000
; in source code for this to work correctly
;
ARM_LIB_HEAP +0 ALIGN 64 EMPTY 0xA0000 {}
-
+
;
; Handler stacks for all CPUs
; All stacks and heap are aligned to a cache-line boundary
diff --git a/ports/cortex_a77/ac6/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a77/ac6/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a77/ac6/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a77/ac6/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a77/ac6/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a77/ac6/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a77/ac6/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a77/ac6/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a77/ac6/example_build/tx/.cproject b/ports/cortex_a77/ac6/example_build/tx/.cproject
index 137a756a..4b3c562b 100644
--- a/ports/cortex_a77/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a77/ac6/example_build/tx/.cproject
@@ -1,148 +1,148 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a77/ac6/inc/tx_port.h b/ports/cortex_a77/ac6/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a77/ac6/inc/tx_port.h
+++ b/ports/cortex_a77/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a77/ac6/src/tx_initialize_low_level.S b/ports/cortex_a77/ac6/src/tx_initialize_low_level.S
index f456574e..7d2a4be3 100644
--- a/ports/cortex_a77/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_a77/ac6/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_a77/ac6/src/tx_thread_context_restore.S b/ports/cortex_a77/ac6/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a77/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a77/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a77/ac6/src/tx_thread_context_save.S b/ports/cortex_a77/ac6/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a77/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a77/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a77/ac6/src/tx_thread_fp_disable.c b/ports/cortex_a77/ac6/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a77/ac6/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a77/ac6/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a77/ac6/src/tx_thread_fp_enable.c b/ports/cortex_a77/ac6/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a77/ac6/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a77/ac6/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a77/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a77/ac6/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a77/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a77/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a77/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a77/ac6/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a77/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a77/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a77/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a77/ac6/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a77/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a77/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a77/ac6/src/tx_thread_schedule.S b/ports/cortex_a77/ac6/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a77/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a77/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a77/ac6/src/tx_thread_stack_build.S b/ports/cortex_a77/ac6/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a77/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a77/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a77/ac6/src/tx_thread_system_return.S b/ports/cortex_a77/ac6/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a77/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a77/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a77/ac6/src/tx_timer_interrupt.S b/ports/cortex_a77/ac6/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a77/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a77/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a77/gnu/example_build/sample_threadx/.cproject b/ports/cortex_a77/gnu/example_build/sample_threadx/.cproject
index 1c32cb32..40d4912d 100644
--- a/ports/cortex_a77/gnu/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a77/gnu/example_build/sample_threadx/.cproject
@@ -1,170 +1,170 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a77/gnu/example_build/sample_threadx/MP_Mutexes.S b/ports/cortex_a77/gnu/example_build/sample_threadx/MP_Mutexes.S
index c787c3f5..e8a87f0b 100644
--- a/ports/cortex_a77/gnu/example_build/sample_threadx/MP_Mutexes.S
+++ b/ports/cortex_a77/gnu/example_build/sample_threadx/MP_Mutexes.S
@@ -92,7 +92,7 @@ _mutex_release:
.type _mutex_acquire, "function"
.cfi_startproc
_mutex_acquire:
- // This uses a "ticket lock". The lock is stored as a 32-bit value:
+ // This uses a "ticket lock". The lock is stored as a 32-bit value:
// - the upper 16-bits record the thread's ticket number ("take a ticket")
// - the lower 16-bits record the ticket being served ("now serving")
diff --git a/ports/cortex_a77/gnu/example_build/sample_threadx/MP_Mutexes.h b/ports/cortex_a77/gnu/example_build/sample_threadx/MP_Mutexes.h
index ec1a1d28..00e9cd60 100644
--- a/ports/cortex_a77/gnu/example_build/sample_threadx/MP_Mutexes.h
+++ b/ports/cortex_a77/gnu/example_build/sample_threadx/MP_Mutexes.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
#ifndef MP_MUTEX_H
diff --git a/ports/cortex_a77/gnu/example_build/sample_threadx/sample_threadx.ld b/ports/cortex_a77/gnu/example_build/sample_threadx/sample_threadx.ld
index eec8f12b..3bf47736 100644
--- a/ports/cortex_a77/gnu/example_build/sample_threadx/sample_threadx.ld
+++ b/ports/cortex_a77/gnu/example_build/sample_threadx/sample_threadx.ld
@@ -1,7 +1,7 @@
/* Linker script to place sections and symbol values.
* It references following symbols, which must be defined in code:
* start64 : Entry point
- *
+ *
* It defines following symbols, which code can use without definition:
* __cs3_peripherals
* __code_start
diff --git a/ports/cortex_a77/gnu/example_build/sample_threadx/startup.S b/ports/cortex_a77/gnu/example_build/sample_threadx/startup.S
index b71b45f8..b44806fe 100644
--- a/ports/cortex_a77/gnu/example_build/sample_threadx/startup.S
+++ b/ports/cortex_a77/gnu/example_build/sample_threadx/startup.S
@@ -328,7 +328,7 @@ el1_entry_aarch64:
//
// Cortex-A processors automatically invalidate their caches on reset
// (unless suppressed with the DBGL1RSTDISABLE or L2RSTDISABLE pins).
- // It is therefore not necessary for software to invalidate the caches
+ // It is therefore not necessary for software to invalidate the caches
// on startup, however, this is done here in case of a warm reset.
bl InvalidateUDCaches
tlbi VMALLE1
diff --git a/ports/cortex_a77/gnu/example_build/sample_threadx/v8_aarch64.h b/ports/cortex_a77/gnu/example_build/sample_threadx/v8_aarch64.h
index b09079a4..91ca9653 100644
--- a/ports/cortex_a77/gnu/example_build/sample_threadx/v8_aarch64.h
+++ b/ports/cortex_a77/gnu/example_build/sample_threadx/v8_aarch64.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 2012-2014 Arm Limited (or its affiliates). All rights reserved.
* Use, modification and redistribution of this file is subject to your possession of a
- * valid End User License Agreement for the Arm Product of which these examples are part of
+ * valid End User License Agreement for the Arm Product of which these examples are part of
* and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_a77/gnu/example_build/sample_threadx/v8_mmu.h b/ports/cortex_a77/gnu/example_build/sample_threadx/v8_mmu.h
index bce62b54..d0c51601 100644
--- a/ports/cortex_a77/gnu/example_build/sample_threadx/v8_mmu.h
+++ b/ports/cortex_a77/gnu/example_build/sample_threadx/v8_mmu.h
@@ -101,7 +101,7 @@
#define TT_S1_ATTR_PXN (1 << 53)
#define TT_S1_ATTR_UXN (1 << 54)
-// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
+// PBHA bits[62:59] - If Armv8.2-TTPBHA is implemented, hardware can use these bits
// for IMPLEMENTATIONDEFINED purposes, otherwise IGNORED
#define TT_S1_MAIR_DEV_nGnRnE 0b00000000
diff --git a/ports/cortex_a77/gnu/example_build/tx/.cproject b/ports/cortex_a77/gnu/example_build/tx/.cproject
index f1b8ed5b..9e5a975e 100644
--- a/ports/cortex_a77/gnu/example_build/tx/.cproject
+++ b/ports/cortex_a77/gnu/example_build/tx/.cproject
@@ -1,164 +1,164 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a77/gnu/inc/tx_port.h b/ports/cortex_a77/gnu/inc/tx_port.h
index f6d81355..e5352338 100644
--- a/ports/cortex_a77/gnu/inc/tx_port.h
+++ b/ports/cortex_a77/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -369,7 +361,7 @@ VOID tx_thread_fp_disable(VOID);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv8-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv8-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a77/gnu/src/tx_initialize_low_level.S b/ports/cortex_a77/gnu/src/tx_initialize_low_level.S
index 3dce3cea..3025f12b 100644
--- a/ports/cortex_a77/gnu/src/tx_initialize_low_level.S
+++ b/ports/cortex_a77/gnu/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,17 +59,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
@@ -99,4 +89,4 @@ _tx_initialize_low_level:
/* Done, return to caller. */
RET // Return to caller
-// }
+// }
diff --git a/ports/cortex_a77/gnu/src/tx_thread_context_restore.S b/ports/cortex_a77/gnu/src/tx_thread_context_restore.S
index 8e0d5515..9ba82827 100644
--- a/ports/cortex_a77/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a77/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_a77/gnu/src/tx_thread_context_save.S b/ports/cortex_a77/gnu/src/tx_thread_context_save.S
index 7768efc2..c2395155 100644
--- a/ports/cortex_a77/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a77/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_a77/gnu/src/tx_thread_fp_disable.c b/ports/cortex_a77/gnu/src/tx_thread_fp_disable.c
index aa175e83..25233f77 100644
--- a/ports/cortex_a77/gnu/src/tx_thread_fp_disable.c
+++ b/ports/cortex_a77/gnu/src/tx_thread_fp_disable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,14 +59,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_disable(VOID)
{
diff --git a/ports/cortex_a77/gnu/src/tx_thread_fp_enable.c b/ports/cortex_a77/gnu/src/tx_thread_fp_enable.c
index 341bb200..7351aee4 100644
--- a/ports/cortex_a77/gnu/src/tx_thread_fp_enable.c
+++ b/ports/cortex_a77/gnu/src/tx_thread_fp_enable.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
VOID _tx_thread_fp_enable(VOID)
{
diff --git a/ports/cortex_a77/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a77/gnu/src/tx_thread_interrupt_control.S
index d8e70ebb..21ec2dd1 100644
--- a/ports/cortex_a77/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a77/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_a77/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a77/gnu/src/tx_thread_interrupt_disable.S
index e398d46a..af2ef874 100644
--- a/ports/cortex_a77/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a77/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(void)
// {
diff --git a/ports/cortex_a77/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a77/gnu/src/tx_thread_interrupt_restore.S
index 7b55fb9f..3e0780d0 100644
--- a/ports/cortex_a77/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a77/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,17 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_restore(UINT old_posture)
// {
diff --git a/ports/cortex_a77/gnu/src/tx_thread_schedule.S b/ports/cortex_a77/gnu/src/tx_thread_schedule.S
index 009a0d5b..057aa538 100644
--- a/ports/cortex_a77/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a77/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -58,18 +59,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* added ARMv8.2-A support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -230,3 +219,4 @@ _skip_solicited_fp_restore:
MSR DAIF, x4 // Recover DAIF
RET // Return to caller
// }
+
diff --git a/ports/cortex_a77/gnu/src/tx_thread_stack_build.S b/ports/cortex_a77/gnu/src/tx_thread_stack_build.S
index 6c675d9b..01084da7 100644
--- a/ports/cortex_a77/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a77/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,17 +58,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Andres Mlinar Updated comments, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_a77/gnu/src/tx_thread_system_return.S b/ports/cortex_a77/gnu/src/tx_thread_system_return.S
index 780bb128..b7593d79 100644
--- a/ports/cortex_a77/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a77/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_a77/gnu/src/tx_timer_interrupt.S b/ports/cortex_a77/gnu/src/tx_timer_interrupt.S
index d84245c6..1b80a7f2 100644
--- a/ports/cortex_a77/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a77/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_a8/ac5/example_build/sample_threadx.c b/ports/cortex_a8/ac5/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/cortex_a8/ac5/example_build/sample_threadx.c
+++ b/ports/cortex_a8/ac5/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_a8/ac5/example_build/tx_initialize_low_level.s b/ports/cortex_a8/ac5/example_build/tx_initialize_low_level.s
index ddf3e8bb..89fec36b 100644
--- a/ports/cortex_a8/ac5/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_a8/ac5/example_build/tx_initialize_low_level.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -90,45 +90,39 @@ __vectors
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level Cortex-A8/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level Cortex-A8/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -179,7 +173,7 @@ _tx_initialize_low_level
; _tx_thread_system_stack_ptr = (VOID_PTR) (sp);
;
LDR r1, =_tx_thread_system_stack_ptr ; Pickup address of system stack ptr
- LDR r0, [r1, #0] ; Pickup system stack
+ LDR r0, [r1, #0] ; Pickup system stack
ADD r0, r0, #4 ; Increment to next free word
;
; /* Save the first available memory address. */
@@ -201,7 +195,7 @@ _tx_initialize_low_level
;
;
;/* Define initial heap/stack routine for the ARM RealView (and ADS) startup code. This
-; routine will set the initial stack to use the ThreadX IRQ & FIQ &
+; routine will set the initial stack to use the ThreadX IRQ & FIQ &
; (optionally SYS) stack areas. */
;
EXPORT __user_initial_stackheap
@@ -253,7 +247,7 @@ __tx_reserved_handler
;
;
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -261,21 +255,21 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
BL _tx_timer_interrupt ; Timer interrupt handler
_tx_not_timer_interrupt
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -285,7 +279,7 @@ _tx_not_timer_interrupt
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -301,28 +295,28 @@ _tx_not_timer_interrupt
__tx_example_vectored_irq_handler
;
;
-; /* Save initial context and call context save to prepare for
+; /* Save initial context and call context save to prepare for
; vectored ISR execution. */
;
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
; BL _tx_thread_vectored_context_save ; Vectored context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -331,7 +325,7 @@ __tx_example_vectored_irq_handler
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
@@ -353,11 +347,11 @@ __tx_fiq_processing_return
; /* At this point execution is still in the FIQ mode. The CPSR, point of
; interrupt, and all C scratch registers are available for use. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
; from FIQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with FIQ interrupts enabled.
+; system mode and returns with FIQ interrupts enabled.
;
-; NOTE: It is very important to ensure all FIQ interrupts are cleared
+; NOTE: It is very important to ensure all FIQ interrupts are cleared
; prior to enabling nested FIQ interrupts. */
IF :DEF:TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/cortex_a8/ac5/inc/tx_port.h b/ports/cortex_a8/ac5/inc/tx_port.h
index 24c52a6c..7dc9a522 100644
--- a/ports/cortex_a8/ac5/inc/tx_port.h
+++ b/ports/cortex_a8/ac5/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-A8/AC5 */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-A8/AC5 */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -75,7 +67,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -111,12 +103,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -126,8 +118,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -174,7 +166,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -186,13 +178,13 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable;
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -206,11 +198,11 @@ typedef unsigned short USHORT;
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -218,8 +210,8 @@ typedef unsigned short USHORT;
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -246,21 +238,21 @@ typedef unsigned short USHORT;
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef __thumb
-
+
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (ULONG) __clz((unsigned int) m); \
- b = 31 - b;
+ b = 31 - b;
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -280,7 +272,7 @@ typedef unsigned short USHORT;
{ \
__enable_irq(); \
__enable_fiq(); \
- }
+ }
#else
@@ -289,7 +281,7 @@ typedef unsigned short USHORT;
#define TX_RESTORE if (!interrupt_save_disabled) \
{ \
__enable_irq(); \
- }
+ }
#endif
#else
@@ -325,8 +317,8 @@ void tx_thread_vfp_disable(void);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-A8/AC5 Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-A8/AC5 Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a8/ac5/readme_threadx.txt b/ports/cortex_a8/ac5/readme_threadx.txt
index 13fa045f..a52ee156 100644
--- a/ports/cortex_a8/ac5/readme_threadx.txt
+++ b/ports/cortex_a8/ac5/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A8
+ Microsoft's Azure RTOS ThreadX for Cortex-A8
Thumb & 32-bit Mode
@@ -6,21 +6,21 @@
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the ARM
-AC5 development environment. At this point you may run the build_threadx.bat
-batch file. This will build the ThreadX run-time environment in the
-"example_build" directory.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the ARM
+AC5 development environment. At this point you may run the build_threadx.bat
+batch file. This will build the ThreadX run-time environment in the
+"example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
1.1 Building with Project Files
-The ThreadX library can also be built via project files. Simply open
-the tx.mcp file with project builder and select make. This will place
+The ThreadX library can also be built via project files. Simply open
+the tx.mcp file with project builder and select make. This will place
the tx.a library file into the Debug sub-directory.
@@ -29,45 +29,45 @@ the tx.a library file into the Debug sub-directory.
The ThreadX demonstration is designed to execute under the ARM
Windows-based simulator.
-Building the demonstration is easy; simply execute the build_threadx_demo.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_demo.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.axf
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.axf
is a binary file that can be downloaded and executed on the ARM simulator.
2.0.1 Building with Project Files
-The ThreadX demonstration can also be built via project files. Simply open
-the sample_threadx.mcp file with project builder and select make. This will place
+The ThreadX demonstration can also be built via project files. Simply open
+the sample_threadx.mcp file with project builder and select make. This will place
the sample_threadx.axf output image into the Debug sub-directory.
3. System Initialization
-The entry point in ThreadX for the Cortex-A8 using AC5 tools is at label
-__main. This is defined within the AC5 compiler's startup code. In
-addition, this is where all static and global pre-set C variable
+The entry point in ThreadX for the Cortex-A8 using AC5 tools is at label
+__main. This is defined within the AC5 compiler's startup code. In
+addition, this is where all static and global pre-set C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source. By default, the vector area is defined to be located in the Init area,
-which is defined at the top of tx_initialize_low_level.s. This area is typically
-located at 0. In situations where this is impossible, the vectors at the beginning
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source. By default, the vector area is defined to be located in the Init area,
+which is defined at the top of tx_initialize_low_level.s. This area is typically
+located at 0. In situations where this is impossible, the vectors at the beginning
of the Init area should be copied to address 0.
This is also where initialization of a periodic timer interrupt source
should take place.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
4. Assembler / Compiler Switches
-The following are compiler switches used in building the demonstration
+The following are compiler switches used in building the demonstration
system:
Compiler Switch Meaning
@@ -83,10 +83,10 @@ Linker Switch Meaning
-o demo.axf Specifies demo output file name
--elf Specifies elf output file format
--ro Specifies that Read-Only memory starts at address 0
- --first tx_initialize_low_level.o(Init)
+ --first tx_initialize_low_level.o(Init)
Specifies that the first area loaded is Init
--remove Remove unused areas
- --list Specifies map file name
+ --list Specifies map file name
--symbols Specifies symbols for map file
--map Creates a map file
@@ -97,161 +97,161 @@ Application Defines
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
--PD "TX_ENABLE_IRQ_NESTING SETL {TRUE}" This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s.
--PD "TX_ENABLE_FIQ_NESTING SETL {TRUE}" This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s. In addition,
IRQ nesting should also be enabled.
-DTX_ENABLE_FIQ_SUPPORT This compiler define enables FIQ
interrupt handling in the ThreadX
- generic C source. This define
+ generic C source. This define
should also be used in conjunction
with the corresponding assembler
- define.
+ define.
-DTX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- -DTX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ -DTX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- -DTX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ -DTX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- -DTX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ -DTX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- -DTX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ -DTX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- -DTX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ -DTX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- -DTX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ -DTX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- -DTX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ -DTX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- -DTX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ -DTX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- -DTX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ -DTX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- -DTX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ -DTX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- -DTX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ -DTX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- -DTX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ -DTX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- -DTX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ -DTX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- -DTX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ -DTX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- -DTX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ -DTX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- -DTX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ -DTX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- -DTX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ -DTX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- -DTX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ -DTX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- -DTX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ -DTX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
-DTX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- -DTX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ -DTX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- -DTX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ -DTX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
5. Register Usage and Stack Frames
-The AC5 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The AC5 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -269,39 +269,39 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
-performance. To make it run faster, you can change the build_threadx.bat file to
-remove the -g option and enable all compiler optimizations.
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
+performance. To make it run faster, you can change the build_threadx.bat file to
+remove the -g option and enable all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A8
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A8 vectors start at address zero. The demonstration system startup
-Init area contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+Init area contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -312,12 +312,12 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -325,7 +325,7 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -338,7 +338,7 @@ __tx_irq_processing_return
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.s:
EXPORT __tx_irq_example_handler
@@ -348,12 +348,12 @@ __tx_irq_example_handler
STMDB sp!, {r0-r3} ; Save some scratch registers
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
BL _tx_thread_vectored_context_save ; Call the vectored IRQ context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -370,22 +370,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested IRQ interrupts are no longer required,
calling the _tx_thread_irq_nesting_end service disables nesting by disabling
-IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
+IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -393,10 +393,10 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* Enable nested IRQ interrupts. NOTE: Since this service returns
-; with IRQ interrupts enabled, all IRQ interrupt sources must be
+; with IRQ interrupts enabled, all IRQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-;
+;
; /* Application ISR call(s) go here! */
;
; /* Disable nested IRQ interrupts. The mode is switched back to
@@ -409,12 +409,12 @@ __tx_irq_processing_return
7.3 FIQ Interrupts
-By default, Cortex-A8 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, Cortex-A8 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -423,7 +423,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.s.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.s:
@@ -451,18 +451,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -478,7 +478,7 @@ __tx_fiq_processing_return
; interrupt, and all C scratch registers are available for use. */
;
; /* Enable nested FIQ interrupts. NOTE: Since this service returns
-; with FIQ interrupts enabled, all FIQ interrupt sources must be
+; with FIQ interrupts enabled, all FIQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
;
@@ -494,29 +494,29 @@ __tx_fiq_processing_return
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.s in the Integrator sub-directories.
9. Thumb/Cortex-A8 Mixed Mode
-By default, ThreadX is setup for running in Cortex-A8 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
-ThreadX file and/or the application in Thumb mode. If any Thumb code
-is used the entire ThreadX source- both C and assembly - should be built
+By default, ThreadX is setup for running in Cortex-A8 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
+ThreadX file and/or the application in Thumb mode. If any Thumb code
+is used the entire ThreadX source- both C and assembly - should be built
with the "-apcs /interwork" option.
10. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a8/ac5/src/tx_thread_context_restore.s b/ports/cortex_a8/ac5/src/tx_thread_context_restore.s
index d2cbdc19..403ddd31 100644
--- a/ports/cortex_a8/ac5/src/tx_thread_context_restore.s
+++ b/ports/cortex_a8/ac5/src/tx_thread_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -54,44 +54,38 @@ SVC_MODE EQU 0x93 ; SVC mode
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore Cortex-A8/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore Cortex-A8/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -121,13 +115,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3, #0] ; Store the counter
+ STR r2, [r3, #0] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
diff --git a/ports/cortex_a8/ac5/src/tx_thread_context_save.s b/ports/cortex_a8/ac5/src/tx_thread_context_save.s
index 6c1d90c8..fbcea2bd 100644
--- a/ports/cortex_a8/ac5/src/tx_thread_context_save.s
+++ b/ports/cortex_a8/ac5/src/tx_thread_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -39,43 +39,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save Cortex-A8/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save Cortex-A8/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
@@ -90,7 +84,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
IF :DEF:TX_ENABLE_FIQ_SUPPORT
CPSID if ; Disable FIQ interrupts
ENDIF
@@ -109,7 +103,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -125,7 +119,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -139,13 +133,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -165,7 +159,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -175,7 +169,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -190,7 +184,7 @@ __tx_thread_idle_system_save
ENDIF
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports/cortex_a8/ac5/src/tx_thread_fiq_context_restore.s b/ports/cortex_a8/ac5/src/tx_thread_fiq_context_restore.s
index 9fb18339..3efdad98 100644
--- a/ports/cortex_a8/ac5/src/tx_thread_fiq_context_restore.s
+++ b/ports/cortex_a8/ac5/src/tx_thread_fiq_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -32,7 +32,7 @@
;
SVC_MODE EQU 0xD3 ; SVC mode
FIQ_MODE EQU 0xD1 ; FIQ mode
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
;
@@ -50,44 +50,38 @@ IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_restore Cortex-A8/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_restore Cortex-A8/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the fiq interrupt context when processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* FIQ ISR Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the fiq interrupt context when processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* FIQ ISR Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_context_restore(VOID)
@@ -113,13 +107,13 @@ _tx_thread_fiq_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -164,7 +158,7 @@ __tx_thread_fiq_no_preempt_restore
; /* Restore interrupted thread or ISR. */
;
; /* Pickup the saved stack pointer. */
-; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
+; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
;
; /* Recover the saved context and return to the point of interrupt. */
;
@@ -209,7 +203,7 @@ _tx_skip_fiq_vfp_save
MOV r3, #1 ; Build interrupt stack type
STMDB sp!, {r3, r4} ; Save interrupt stack type and SPSR
STR sp, [r0, #8] ; Save stack pointer in thread control
- ; block
+ ; block
;
; /* Save the remaining time-slice and disable it. */
; if (_tx_timer_time_slice)
@@ -221,7 +215,7 @@ _tx_skip_fiq_vfp_save
BEQ __tx_thread_fiq_dont_save_ts ; No, don't save it
;
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-; _tx_timer_time_slice = 0;
+; _tx_timer_time_slice = 0;
;
STR r2, [r0, #24] ; Save thread's time-slice
MOV r2, #0 ; Clear value
diff --git a/ports/cortex_a8/ac5/src/tx_thread_fiq_context_save.s b/ports/cortex_a8/ac5/src/tx_thread_fiq_context_save.s
index 7ba4eee3..2f9486dc 100644
--- a/ports/cortex_a8/ac5/src/tx_thread_fiq_context_save.s
+++ b/ports/cortex_a8/ac5/src/tx_thread_fiq_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -39,43 +39,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_save Cortex-A8/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_save Cortex-A8/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
; VOID _tx_thread_fiq_context_save(VOID)
@@ -90,7 +84,7 @@ _tx_thread_fiq_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -105,7 +99,7 @@ _tx_thread_fiq_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -121,38 +115,38 @@ _tx_thread_fiq_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
__tx_thread_fiq_not_nested_save
-; }
+; }
;
; /* Otherwise, not nested, check to see if a thread was running. */
; else if (_tx_thread_current_ptr)
-; {
+; {
;
ADD r2, r2, #1 ; Increment the interrupt counter
STR r2, [r3] ; Store it back in the variable
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
-; ; scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
+; ; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, lr} ; Store other registers, Note that we don't
-; ; need to save sl and ip since FIQ has
-; ; copies of these registers. Nested
+; ; need to save sl and ip since FIQ has
+; ; copies of these registers. Nested
; ; interrupt processing does need to save
; ; these registers.
;
; /* Save the current stack pointer in the thread's control block. */
-; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
;
; /* Switch to the system stack. */
-; sp = _tx_thread_system_stack_ptr;
+; sp = _tx_thread_system_stack_ptr;
;
MOV r10, #0 ; Clear stack limit
@@ -165,7 +159,7 @@ __tx_thread_fiq_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
; else
@@ -185,18 +179,18 @@ __tx_thread_fiq_idle_system_save
ENDIF
;
; /* Not much to do here, save the current SPSR and LR for possible
-; use in IRQ interrupted in idle system conditions, and return to
+; use in IRQ interrupted in idle system conditions, and return to
; FIQ interrupt processing. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, lr} ; Store other registers that will get used
-; ; or stripped off the stack in context
-; ; restore
- B __tx_fiq_processing_return ; Continue FIQ processing
+; ; or stripped off the stack in context
+; ; restore
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
-;}
+;}
;
END
diff --git a/ports/cortex_a8/ac5/src/tx_thread_fiq_nesting_end.s b/ports/cortex_a8/ac5/src/tx_thread_fiq_nesting_end.s
index 0089d6bd..885cbcf8 100644
--- a/ports/cortex_a8/ac5/src/tx_thread_fiq_nesting_end.s
+++ b/ports/cortex_a8/ac5/src/tx_thread_fiq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
FIQ_MODE_BITS EQU 0x11 ; FIQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_end Cortex-A8/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_end Cortex-A8/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-;/* processing from system mode back to FIQ mode prior to the ISR */
-;/* calling _tx_thread_fiq_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+;/* processing from system mode back to FIQ mode prior to the ISR */
+;/* calling _tx_thread_fiq_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_fiq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #FIQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/cortex_a8/ac5/src/tx_thread_fiq_nesting_start.s b/ports/cortex_a8/ac5/src/tx_thread_fiq_nesting_start.s
index 34b3d0a9..585a1e7d 100644
--- a/ports/cortex_a8/ac5/src/tx_thread_fiq_nesting_start.s
+++ b/ports/cortex_a8/ac5/src/tx_thread_fiq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_start Cortex-A8/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_start Cortex-A8/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-;/* processing to the system mode so nested FIQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+;/* processing to the system mode so nested FIQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/cortex_a8/ac5/src/tx_thread_interrupt_control.s b/ports/cortex_a8/ac5/src/tx_thread_interrupt_control.s
index 8339da10..ee782a88 100644
--- a/ports/cortex_a8/ac5/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_a8/ac5/src/tx_thread_interrupt_control.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,42 +36,36 @@ INT_MASK EQU 0x80 ; Interrupt bit mask
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control Cortex-A8/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control Cortex-A8/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/cortex_a8/ac5/src/tx_thread_interrupt_disable.s b/ports/cortex_a8/ac5/src/tx_thread_interrupt_disable.s
index 72586e25..301a33e6 100644
--- a/ports/cortex_a8/ac5/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_a8/ac5/src/tx_thread_interrupt_disable.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -29,41 +29,35 @@
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable Cortex-A8/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable Cortex-A8/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(void)
@@ -80,7 +74,7 @@ _tx_thread_interrupt_disable
IF :DEF:TX_ENABLE_FIQ_SUPPORT
CPSID if ; Disable IRQ and FIQ
ELSE
- CPSID i ; Disable IRQ
+ CPSID i ; Disable IRQ
ENDIF
IF {INTER} = {TRUE}
diff --git a/ports/cortex_a8/ac5/src/tx_thread_interrupt_restore.s b/ports/cortex_a8/ac5/src/tx_thread_interrupt_restore.s
index 630a5dc9..25b1dbae 100644
--- a/ports/cortex_a8/ac5/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_a8/ac5/src/tx_thread_interrupt_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -29,42 +29,36 @@
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore Cortex-A8/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore Cortex-A8/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function is responsible for restoring interrupts to the state */
;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/cortex_a8/ac5/src/tx_thread_irq_nesting_end.s b/ports/cortex_a8/ac5/src/tx_thread_irq_nesting_end.s
index c3ff143f..5be031b4 100644
--- a/ports/cortex_a8/ac5/src/tx_thread_irq_nesting_end.s
+++ b/ports/cortex_a8/ac5/src/tx_thread_irq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end Cortex-A8/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end Cortex-A8/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_irq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #IRQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/cortex_a8/ac5/src/tx_thread_irq_nesting_start.s b/ports/cortex_a8/ac5/src/tx_thread_irq_nesting_start.s
index 67f48378..72b194a8 100644
--- a/ports/cortex_a8/ac5/src/tx_thread_irq_nesting_start.s
+++ b/ports/cortex_a8/ac5/src/tx_thread_irq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start Cortex-A8/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start Cortex-A8/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/cortex_a8/ac5/src/tx_thread_schedule.s b/ports/cortex_a8/ac5/src/tx_thread_schedule.s
index f5982192..55808cb7 100644
--- a/ports/cortex_a8/ac5/src/tx_thread_schedule.s
+++ b/ports/cortex_a8/ac5/src/tx_thread_schedule.s
@@ -1,18 +1,19 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -40,45 +41,39 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule Cortex-A8/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule Cortex-A8/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
@@ -107,7 +102,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -120,7 +115,7 @@ __tx_thread_schedule_loop
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
;
- LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
STR r0, [r1, #0] ; Setup current thread pointer
;
; /* Increment the run count for this thread. */
@@ -134,7 +129,7 @@ __tx_thread_schedule_loop
; /* Setup time-slice, if present. */
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
;
- LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
+ LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
; variable
LDR sp, [r0, #8] ; Switch stack pointers
STR r3, [r2, #0] ; Setup time-slice
@@ -233,3 +228,4 @@ __tx_no_thread_to_disable
END
+
diff --git a/ports/cortex_a8/ac5/src/tx_thread_stack_build.s b/ports/cortex_a8/ac5/src/tx_thread_stack_build.s
index 18f16095..571c5d78 100644
--- a/ports/cortex_a8/ac5/src/tx_thread_stack_build.s
+++ b/ports/cortex_a8/ac5/src/tx_thread_stack_build.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -41,44 +41,38 @@ THUMB_BIT EQU 0x20 ; Thumb-bit
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build Cortex-A8/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build Cortex-A8/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function builds a stack frame on the supplied thread's stack. */
;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
;/* thread_ptr Pointer to thread control blk */
;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -86,10 +80,10 @@ THUMB_BIT EQU 0x20 ; Thumb-bit
EXPORT _tx_thread_stack_build
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-A8 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports/cortex_a8/ac5/src/tx_thread_system_return.s b/ports/cortex_a8/ac5/src/tx_thread_system_return.s
index 62155944..d0a1e738 100644
--- a/ports/cortex_a8/ac5/src/tx_thread_system_return.s
+++ b/ports/cortex_a8/ac5/src/tx_thread_system_return.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -33,50 +33,44 @@
IMPORT _tx_timer_time_slice
IMPORT _tx_thread_schedule
IF :DEF:TX_ENABLE_EXECUTION_CHANGE_NOTIFY
- IMPORT _tx_execution_thread_exit
+ IMPORT _tx_execution_thread_exit
ENDIF
;
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return Cortex-A8/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return Cortex-A8/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
@@ -104,7 +98,7 @@ _tx_skip_solicited_vfp_save
MOV r0, #0 ; Build a solicited stack type
MRS r1, CPSR ; Pickup the CPSR
STMDB sp!, {r0-r1} ; Save type and CPSR
-;
+;
; /* Lockout interrupts. */
;
IF :DEF:TX_ENABLE_FIQ_SUPPORT
diff --git a/ports/cortex_a8/ac5/src/tx_thread_vectored_context_save.s b/ports/cortex_a8/ac5/src/tx_thread_vectored_context_save.s
index e7d10bfb..f5cb7e2a 100644
--- a/ports/cortex_a8/ac5/src/tx_thread_vectored_context_save.s
+++ b/ports/cortex_a8/ac5/src/tx_thread_vectored_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -38,43 +38,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save Cortex-A8/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save Cortex-A8/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_vectored_context_save(VOID)
@@ -135,7 +129,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -171,7 +165,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports/cortex_a8/ac5/src/tx_timer_interrupt.s b/ports/cortex_a8/ac5/src/tx_timer_interrupt.s
index 41b21a33..00a0b30c 100644
--- a/ports/cortex_a8/ac5/src/tx_timer_interrupt.s
+++ b/ports/cortex_a8/ac5/src/tx_timer_interrupt.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Timer */
;/** */
@@ -44,46 +44,40 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt Cortex-A8/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt Cortex-A8/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -107,7 +101,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -225,13 +219,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports/cortex_a8/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a8/ac6/example_build/sample_threadx/.cproject
index e039b0b0..00f3c7c7 100644
--- a/ports/cortex_a8/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a8/ac6/example_build/sample_threadx/.cproject
@@ -1,176 +1,176 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a8/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a8/ac6/example_build/sample_threadx/sample_threadx.scat
index d23881cd..66d0d95a 100644
--- a/ports/cortex_a8/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a8/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -1,7 +1,7 @@
;*******************************************************
; Copyright (c) 2011-2016 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;*******************************************************
diff --git a/ports/cortex_a8/ac6/example_build/sample_threadx/tx_initialize_low_level.S b/ports/cortex_a8/ac6/example_build/sample_threadx/tx_initialize_low_level.S
index 083a57a7..76395459 100644
--- a/ports/cortex_a8/ac6/example_build/sample_threadx/tx_initialize_low_level.S
+++ b/ports/cortex_a8/ac6/example_build/sample_threadx/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -91,14 +92,6 @@ $_tx_initialize_low_level:
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* */
/**************************************************************************/
.global _tx_initialize_low_level
.type _tx_initialize_low_level,function
diff --git a/ports/cortex_a8/ac6/example_build/tx/.cproject b/ports/cortex_a8/ac6/example_build/tx/.cproject
index 3d1f0818..e2f1d00b 100644
--- a/ports/cortex_a8/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a8/ac6/example_build/tx/.cproject
@@ -1,146 +1,146 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a8/ac6/inc/tx_port.h b/ports/cortex_a8/ac6/inc/tx_port.h
index d80ddec1..f0153046 100644
--- a/ports/cortex_a8/ac6/inc/tx_port.h
+++ b/ports/cortex_a8/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,20 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -320,7 +307,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv7-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv7-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a8/ac6/readme_threadx.txt b/ports/cortex_a8/ac6/readme_threadx.txt
index a6e5a5c0..37125d30 100644
--- a/ports/cortex_a8/ac6/readme_threadx.txt
+++ b/ports/cortex_a8/ac6/readme_threadx.txt
@@ -1,18 +1,18 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A8
+ Microsoft's Azure RTOS ThreadX for Cortex-A8
Using ARM Compiler 6 & DS
1. Import the ThreadX Projects
-In order to build the ThreadX library and the ThreadX demonstration, first import
-the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
+In order to build the ThreadX library and the ThreadX demonstration, first import
+the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
into your DS workspace.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply right-click the Eclipse project
-"tx" and then select the "Build Project" button. You should now observe the compilation
+Building the ThreadX library is easy; simply right-click the Eclipse project
+"tx" and then select the "Build Project" button. You should now observe the compilation
and assembly of the ThreadX library. This project build produces the ThreadX
library file tx.a.
@@ -23,40 +23,40 @@ Since there is no ARM Cortex-A8 FVP, there are no instructions here for running
the demonstration; users are expected to run the demonstration on their platform
of choice.
-Building the demonstration is easy; simply right-click the Eclipse project
-"sample_threadx" and then select the "Build Project" button. You should now observe
-the compilation and assembly of the ThreadX demonstration. This project build produces
+Building the demonstration is easy; simply right-click the Eclipse project
+"sample_threadx" and then select the "Build Project" button. You should now observe
+the compilation and assembly of the ThreadX demonstration. This project build produces
the ThreadX library file sample_threadx.axf.
4. System Initialization
-The entry point in ThreadX for the Cortex-A8 using ARM tools is at label
-"Vectors". This is defined within startup.S in the sample_threadx project. In addition,
-this is where all static and global pre-set C variable initialization processing
+The entry point in ThreadX for the Cortex-A8 using ARM tools is at label
+"Vectors". This is defined within startup.S in the sample_threadx project. In addition,
+this is where all static and global pre-set C variable initialization processing
takes place.
-This is also where initialization of a periodic timer interrupt source should take
+This is also where initialization of a periodic timer interrupt source should take
place.
-In addition, _tx_initialize_low_level defines the first available address
-for use by the application, which is supplied as the sole input parameter
+In addition, _tx_initialize_low_level defines the first available address
+for use by the application, which is supplied as the sole input parameter
to your application definition function, tx_application_define.
5. Register Usage and Stack Frames
-The AC6 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The AC6 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -74,52 +74,52 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A8
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A8 vectors start at address zero. The demonstration system startup
-reset.S file contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+reset.S file contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
-ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
+ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
nested IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.S:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -127,7 +127,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -140,7 +140,7 @@ __tx_irq_processing_return:
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.S:
.global __tx_irq_example_handler
@@ -150,12 +150,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} @ Save some scratch registers
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
BL _tx_thread_vectored_context_save @ Call the vectored IRQ context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -172,22 +172,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -195,10 +195,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* Enable nested IRQ interrupts. NOTE: Since this service returns
-@ with IRQ interrupts enabled, all IRQ interrupt sources must be
+@ with IRQ interrupts enabled, all IRQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-@
+@
@ /* Application ISR call(s) go here! */
@
@ /* Disable nested IRQ interrupts. The mode is switched back to
@@ -211,12 +211,12 @@ __tx_irq_processing_return:
7.3 FIQ Interrupts
-By default, FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.S.
@@ -225,7 +225,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.S.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.S:
@@ -253,18 +253,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.S. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -280,7 +280,7 @@ __tx_fiq_processing_return:
@ interrupt, and all C scratch registers are available for use. */
@
@ /* Enable nested FIQ interrupts. NOTE: Since this service returns
-@ with FIQ interrupts enabled, all FIQ interrupt sources must be
+@ with FIQ interrupts enabled, all FIQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@
@@ -296,12 +296,12 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
-interrupt source, these services are not functional but the remainder of
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
+interrupt source, these services are not functional but the remainder of
ThreadX will still run.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.S for the demonstration system.
@@ -309,7 +309,7 @@ found in the file tx_initialize_low_level.S for the demonstration system.
9. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a8/ac6/src/tx_thread_context_restore.S b/ports/cortex_a8/ac6/src/tx_thread_context_restore.S
index 6b4a561d..41b0b0d0 100644
--- a/ports/cortex_a8/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a8/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,23 +80,6 @@ IRQ_MODE = 0x12 // IRQ mode
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_restore
.type _tx_thread_context_restore,function
diff --git a/ports/cortex_a8/ac6/src/tx_thread_context_save.S b/ports/cortex_a8/ac6/src/tx_thread_context_save.S
index eff06283..d2d29d34 100644
--- a/ports/cortex_a8/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a8/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,23 +72,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_save
.type _tx_thread_context_save,function
diff --git a/ports/cortex_a8/ac6/src/tx_thread_fiq_context_restore.S b/ports/cortex_a8/ac6/src/tx_thread_fiq_context_restore.S
index d2fbebe1..921c322c 100644
--- a/ports/cortex_a8/ac6/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_a8/ac6/src/tx_thread_fiq_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,20 +79,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* FIQ ISR Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_restore
.type _tx_thread_fiq_context_restore,function
diff --git a/ports/cortex_a8/ac6/src/tx_thread_fiq_context_save.S b/ports/cortex_a8/ac6/src/tx_thread_fiq_context_save.S
index 88472a3d..2f1a6c40 100644
--- a/ports/cortex_a8/ac6/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_a8/ac6/src/tx_thread_fiq_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_save
.type _tx_thread_fiq_context_save,function
diff --git a/ports/cortex_a8/ac6/src/tx_thread_fiq_nesting_end.S b/ports/cortex_a8/ac6/src/tx_thread_fiq_nesting_end.S
index fa3886b8..a7ce701e 100644
--- a/ports/cortex_a8/ac6/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_a8/ac6/src/tx_thread_fiq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ FIQ_MODE_BITS = 0x11 // FIQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/ac6/src/tx_thread_fiq_nesting_start.S b/ports/cortex_a8/ac6/src/tx_thread_fiq_nesting_start.S
index dbed1cf2..4f095dde 100644
--- a/ports/cortex_a8/ac6/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_a8/ac6/src/tx_thread_fiq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a8/ac6/src/tx_thread_interrupt_control.S
index d1223cb8..a5bc47f7 100644
--- a/ports/cortex_a8/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a8/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,20 +69,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a8/ac6/src/tx_thread_interrupt_disable.S
index a87d1a06..d7b53bc2 100644
--- a/ports/cortex_a8/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a8/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,20 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a8/ac6/src/tx_thread_interrupt_restore.S
index 53ff2813..3c31e94b 100644
--- a/ports/cortex_a8/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a8/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,20 +68,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/ac6/src/tx_thread_irq_nesting_end.S b/ports/cortex_a8/ac6/src/tx_thread_irq_nesting_end.S
index 18aebc7c..cc4db3a7 100644
--- a/ports/cortex_a8/ac6/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_a8/ac6/src/tx_thread_irq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/ac6/src/tx_thread_irq_nesting_start.S b/ports/cortex_a8/ac6/src/tx_thread_irq_nesting_start.S
index a2ffd35d..3635874d 100644
--- a/ports/cortex_a8/ac6/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_a8/ac6/src/tx_thread_irq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/ac6/src/tx_thread_schedule.S b/ports/cortex_a8/ac6/src/tx_thread_schedule.S
index 07dd6f7f..a74e2050 100644
--- a/ports/cortex_a8/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a8/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,6 +40,14 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode
+#ifdef TX_ENABLE_VFP_SUPPORT
+#define IRQ_MASK 0x80
+#endif
+
+#ifdef TX_ENABLE_FIQ_SUPPORT
+#define FIQ_MASK 0x40
+#endif
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
@@ -73,23 +82,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
@@ -259,3 +251,4 @@ no_fiq:
BX lr
#endif
+
diff --git a/ports/cortex_a8/ac6/src/tx_thread_stack_build.S b/ports/cortex_a8/ac6/src/tx_thread_stack_build.S
index 3876225a..827554a7 100644
--- a/ports/cortex_a8/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a8/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,20 +75,6 @@ CPSR_MASK = 0xBF // Mask initial CPSR, T, IRQ int
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/ac6/src/tx_thread_system_return.S b/ports/cortex_a8/ac6/src/tx_thread_system_return.S
index 0eed478d..1a17446b 100644
--- a/ports/cortex_a8/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a8/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,23 +69,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/ac6/src/tx_thread_vectored_context_save.S b/ports/cortex_a8/ac6/src/tx_thread_vectored_context_save.S
index fe8a98e8..91653b75 100644
--- a/ports/cortex_a8/ac6/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_a8/ac6/src/tx_thread_vectored_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_vectored_context_save
.type _tx_thread_vectored_context_save,function
diff --git a/ports/cortex_a8/ac6/src/tx_timer_interrupt.S b/ports/cortex_a8/ac6/src/tx_timer_interrupt.S
index cb0c1fa2..179ac894 100644
--- a/ports/cortex_a8/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a8/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,20 +78,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/ghs/example_build/tx_initialize_low_level.arm b/ports/cortex_a8/ghs/example_build/tx_initialize_low_level.arm
index 2fa61dc0..96b77de4 100644
--- a/ports/cortex_a8/ghs/example_build/tx_initialize_low_level.arm
+++ b/ports/cortex_a8/ghs/example_build/tx_initialize_low_level.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/ghs/inc/tx_el.h b/ports/cortex_a8/ghs/inc/tx_el.h
index b8926921..72e5bbe3 100644
--- a/ports/cortex_a8/ghs/inc/tx_el.h
+++ b/ports/cortex_a8/ghs/inc/tx_el.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,12 +37,6 @@
/* EventAnalyzer. It is assumed that tx_api.h and tx_port.h have */
/* already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_EL_H
diff --git a/ports/cortex_a8/ghs/inc/tx_port.h b/ports/cortex_a8/ghs/inc/tx_port.h
index c80497a8..d9dd3413 100644
--- a/ports/cortex_a8/ghs/inc/tx_port.h
+++ b/ports/cortex_a8/ghs/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -394,7 +386,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-A8/Green Hills Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-A8/Green Hills Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a8/ghs/readme_threadx.txt b/ports/cortex_a8/ghs/readme_threadx.txt
index be5de73a..849c7efe 100644
--- a/ports/cortex_a8/ghs/readme_threadx.txt
+++ b/ports/cortex_a8/ghs/readme_threadx.txt
@@ -1,19 +1,19 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A8
+ Microsoft's Azure RTOS ThreadX for Cortex-A8
Using the Green Hills Software Tools
1. Open the ThreadX Project Workspace
-In order to build the ThreadX library and the ThreadX demonstration first load
-the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
-"example_build" directory.
+In order to build the ThreadX library and the ThreadX demonstration first load
+the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
+"example_build" directory.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply select the MULTI project file
-tx.gpj and then select the build button. You should now observe the
-compilation and assembly of the ThreadX library. This project build produces
+Building the ThreadX library is easy; simply select the MULTI project file
+tx.gpj and then select the build button. You should now observe the
+compilation and assembly of the ThreadX library. This project build produces
the ThreadX library file tx.a.
@@ -21,55 +21,55 @@ the ThreadX library file tx.a.
The ThreadX demonstration is designed to execute under the MULTI environment
on the Green Hills Cortex-A8 simulator. The instructions that follow describe
-how to get the ThreadX evaluation running under the MULTI Cortex-A8 simulation
+how to get the ThreadX evaluation running under the MULTI Cortex-A8 simulation
environment.
-Building the demonstration is easy; simply select the MULTI project file
-sample_threadx.gpj. At this point, select the "Project Build" button and observe
-the compilation, assembly, and linkage of the ThreadX demonstration application.
+Building the demonstration is easy; simply select the MULTI project file
+sample_threadx.gpj. At this point, select the "Project Build" button and observe
+the compilation, assembly, and linkage of the ThreadX demonstration application.
-After the demonstration is built, invoke the MULTI ARM simulator by selecting
-the simulator connection from within the sample_threadx.con connection file.
-Once connected to the simulator, select the "Debug" button. You should now
-observe the main function of sample_threadx.c.
+After the demonstration is built, invoke the MULTI ARM simulator by selecting
+the simulator connection from within the sample_threadx.con connection file.
+Once connected to the simulator, select the "Debug" button. You should now
+observe the main function of sample_threadx.c.
At this point, you should setup a simulated timer interrupt for ThreadX
by entering "timer 9999 irq" in the "target" window of the debugger.
-You are now ready to execute the ThreadX demonstration system. Select
-breakpoints and data watches to observe the execution of the sample_threadx.c
+You are now ready to execute the ThreadX demonstration system. Select
+breakpoints and data watches to observe the execution of the sample_threadx.c
application.
4. EventAnalyzer Demonstration
-To build a demonstration system that also logs events for the MULTI EventAnalyzer,
-perform the same steps as the regular demo, except build the ThreadX library with
-txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
-The resulting image will log all system events, which can then be displayed by the
+To build a demonstration system that also logs events for the MULTI EventAnalyzer,
+perform the same steps as the regular demo, except build the ThreadX library with
+txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
+The resulting image will log all system events, which can then be displayed by the
MULTI EventAnalyzer.
5. System Initialization
-The system entry point using the Green Hills tools is at the label _start.
-This is defined within the crt0.arm file supplied by Green Hills. In addition,
-this is where all static and global preset C variable initialization
+The system entry point using the Green Hills tools is at the label _start.
+This is defined within the crt0.arm file supplied by Green Hills. In addition,
+this is where all static and global preset C variable initialization
processing is called from.
After the Green Hills startup function returns, ThreadX initialization is
called. The main initialization function is _tx_initialize_low_level and
-is located in the file tx_initialize_low_level.arm. This function is responsible
-for setting up various system data structures, interrupt vectors, and the
+is located in the file tx_initialize_low_level.arm. This function is responsible
+for setting up various system data structures, interrupt vectors, and the
periodic timer interrupt source of ThreadX.
-In addition, _tx_initialize_low_level determines where the first available
+In addition, _tx_initialize_low_level determines where the first available
RAM memory address is located. This address is supplied to tx_application_define.
-By default, the first available RAM memory address is assumed to start at the
-beginning of the ThreadX section .free_mem. If changes are made to the
-sample_threadx.ld file, the .free_mem section should remain the last allocated
-section in the main RAM area. The starting address of this section is passed
+By default, the first available RAM memory address is assumed to start at the
+beginning of the ThreadX section .free_mem. If changes are made to the
+sample_threadx.ld file, the .free_mem section should remain the last allocated
+section in the main RAM area. The starting address of this section is passed
to tx_application_define.
@@ -87,27 +87,27 @@ The following defines and their associated action are as follows:
TX_ENABLE_FIQ_NESTING If defined, this brings in special FIQ
interrupt nesting logic into the ThreadX
library. This define should be applied
- to the entire ThreadX library and the
+ to the entire ThreadX library and the
define TX_ENABLE_FIQ_SUPPORT should also
be defined.
TX_ENABLE_FIQ_SUPPORT If defined, this brings in FIQ context
save and restore logic necessary for
applications to call ThreadX services from
- FIQ interrupt handlers. This define
- should be applied to the entire ThreadX
+ FIQ interrupt handlers. This define
+ should be applied to the entire ThreadX
library.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 4 in the "ThreadX User Guide"
+ Chapter 4 in the "ThreadX User Guide"
for more details.
TX_ENABLE_EVENT_LOGGING This define enables event logging for any
or all of the ThreadX source code. If this
- option is used anywhere, the tx_initialize_high_level.c
+ option is used anywhere, the tx_initialize_high_level.c
file must be compiled with it as well, since this
is where the event log is initialized.
@@ -119,121 +119,121 @@ The following defines and their associated action are as follows:
If this is enabled, run-time filtering logic
is added to the event logging code.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
7. Register Usage and Stack Frames
-The Green Hills compiler assumes that registers r0-r3 (a1-a4) and r12 (ip)
-are scratch registers for each function. All other registers used by a C
-function must be preserved by the function. ThreadX takes advantage of this
-in situations where a context switch happens as a result of making a ThreadX
-service call (which is itself a C function). In such cases, the saved
+The Green Hills compiler assumes that registers r0-r3 (a1-a4) and r12 (ip)
+are scratch registers for each function. All other registers used by a C
+function must be preserved by the function. ThreadX takes advantage of this
+in situations where a context switch happens as a result of making a ThreadX
+service call (which is itself a C function). In such cases, the saved
context of a thread is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -251,40 +251,40 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
8. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make ThreadX run faster, you can change the tx.gpj project
-to disable debug information and enable the desired optimizations.
+to disable debug information and enable the desired optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined before tx_api.h is included.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined before tx_api.h is included.
9. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A8
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
9.1 Vector Area
The Cortex-A8 vectors start at address zero. The demonstration system reset.arm
-file contains the reset section (which contains all the ARM vectors) and is
+file contains the reset section (which contains all the ARM vectors) and is
typically loaded at address zero. On actual hardware platforms, this section
-might have to be copied to address 0.
+might have to be copied to address 0.
9.2 IRQ ISRs
@@ -294,13 +294,13 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
9.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.arm:
.globl __tx_irq_handler
- .globl __tx_irq_processing_return
+ .globl __tx_irq_processing_return
__tx_irq_handler:
/* Jump to context save to save system context. */
@@ -308,7 +308,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
/* At this point execution is still in the IRQ mode. The CPSR, point of
- interrupt, and all C scratch registers are available for use. Note
+ interrupt, and all C scratch registers are available for use. Note
that IRQ interrupts are still disabled upon return from the context
save function. */
@@ -321,7 +321,7 @@ __tx_irq_processing_return:
9.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.arm:
.globl __tx_irq_example_handler
@@ -331,12 +331,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} # Save some scratch registers
MRS r0, SPSR # Pickup saved SPSR
- SUB lr, lr, #4 # Adjust point of interrupt
+ SUB lr, lr, #4 # Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} # Store other scratch registers
BL _tx_thread_vectored_context_save # Call the vectored IRQ context save
/* At this point execution is still in the IRQ mode. The CPSR, point of
- interrupt, and all C scratch registers are available for use. Note
+ interrupt, and all C scratch registers are available for use. Note
that IRQ interrupts are still disabled upon return from the context
save function. */
@@ -353,22 +353,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.arm. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables nesting
-by disabling IRQ interrupts and switching back to IRQ mode in preparation for
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.arm. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables nesting
+by disabling IRQ interrupts and switching back to IRQ mode in preparation for
the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in the
+The following is an example of enabling IRQ nested interrupts in the
typical IRQ handler:
.globl __tx_irq_handler
- .globl __tx_irq_processing_return
+ .globl __tx_irq_processing_return
__tx_irq_handler:
/* Jump to context save to save system context. */
@@ -376,10 +376,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
/* Enable nested IRQ interrupts. NOTE: Since this service returns
- with IRQ interrupts enabled, all IRQ interrupt sources must be
+ with IRQ interrupts enabled, all IRQ interrupt sources must be
cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-
+
/* Application ISR call(s) go here! */
/* Disable nested IRQ interrupts. The mode is switched back to
@@ -392,9 +392,9 @@ __tx_irq_processing_return:
9.3 FIQ Interrupts
-By default, Cortex-A8 FIQ interrupts are left completely enabled by ThreadX.
-Of course, this means that the application is fully responsible for
-saving/restoring any registers used in the FIQ ISR processing. In addition,
+By default, Cortex-A8 FIQ interrupts are left completely enabled by ThreadX.
+Of course, this means that the application is fully responsible for
+saving/restoring any registers used in the FIQ ISR processing. In addition,
no ThreadX service calls are allowed from the default FIQ ISRs. The default
FIQ interrupt shell is located in tx_initialize_low_level.arm.
@@ -403,7 +403,7 @@ FIQ interrupt shell is located in tx_initialize_low_level.arm.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.arm:
@@ -431,18 +431,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.arm. When nested FIQ interrupts are no longer
-required, calling the _tx_thread_fiq_nesting_end service disables nesting by
-disabling FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.arm. When nested FIQ interrupts are no longer
+required, calling the _tx_thread_fiq_nesting_end service disables nesting by
+disabling FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -458,7 +458,7 @@ __tx_fiq_processing_return:
interrupt, and all C scratch registers are available for use. */
/* Enable nested FIQ interrupts. NOTE: Since this service returns
- with FIQ interrupts enabled, all FIQ interrupt sources must be
+ with FIQ interrupts enabled, all FIQ interrupt sources must be
cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@@ -475,29 +475,29 @@ __tx_fiq_processing_return:
10. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.arm.
11. Thumb/Cortex-A8 Mixed Mode
-By default, ThreadX is setup for running in Cortex-A8 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
+By default, ThreadX is setup for running in Cortex-A8 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
ThreadX file and/or the application in Thumb mode. The only exception
-to this is the file tx_thread_shell_entry.c. This file must always be
+to this is the file tx_thread_shell_entry.c. This file must always be
built in 32-bit mode.
12. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
@@ -521,7 +521,7 @@ information associated with this specific port of ThreadX:
04-02-2021 Release 6.1.6 changes:
tx_port.h Updated macro definition
-05/19/2020 Initial ThreadX version of Cortex-A8/Green Hills port.
+05/19/2020 Initial ThreadX version of Cortex-A8/Green Hills port.
Copyright(c) 1996-2020 Microsoft Corporation
diff --git a/ports/cortex_a8/ghs/src/tx_el.c b/ports/cortex_a8/ghs/src/tx_el.c
index 365622cd..b5d3b8b7 100644
--- a/ports/cortex_a8/ghs/src/tx_el.c
+++ b/ports/cortex_a8/ghs/src/tx_el.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -82,12 +83,6 @@ UINT _tx_thread_interrupt_control(UINT new_posture);
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_el_initialize(VOID)
{
diff --git a/ports/cortex_a8/ghs/src/tx_thread_context_restore.arm b/ports/cortex_a8/ghs/src/tx_thread_context_restore.arm
index 95465a10..8bc0eb43 100644
--- a/ports/cortex_a8/ghs/src/tx_thread_context_restore.arm
+++ b/ports/cortex_a8/ghs/src/tx_thread_context_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/ghs/src/tx_thread_context_save.arm b/ports/cortex_a8/ghs/src/tx_thread_context_save.arm
index eb40e4c8..e0dead86 100644
--- a/ports/cortex_a8/ghs/src/tx_thread_context_save.arm
+++ b/ports/cortex_a8/ghs/src/tx_thread_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/ghs/src/tx_thread_fiq_context_restore.arm b/ports/cortex_a8/ghs/src/tx_thread_fiq_context_restore.arm
index dc0f5050..a1ae9cc0 100644
--- a/ports/cortex_a8/ghs/src/tx_thread_fiq_context_restore.arm
+++ b/ports/cortex_a8/ghs/src/tx_thread_fiq_context_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/ghs/src/tx_thread_fiq_context_save.arm b/ports/cortex_a8/ghs/src/tx_thread_fiq_context_save.arm
index a233eb30..4befded9 100644
--- a/ports/cortex_a8/ghs/src/tx_thread_fiq_context_save.arm
+++ b/ports/cortex_a8/ghs/src/tx_thread_fiq_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/ghs/src/tx_thread_fiq_nesting_end.arm b/ports/cortex_a8/ghs/src/tx_thread_fiq_nesting_end.arm
index 6f78dabb..48065cce 100644
--- a/ports/cortex_a8/ghs/src/tx_thread_fiq_nesting_end.arm
+++ b/ports/cortex_a8/ghs/src/tx_thread_fiq_nesting_end.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/ghs/src/tx_thread_fiq_nesting_start.arm b/ports/cortex_a8/ghs/src/tx_thread_fiq_nesting_start.arm
index ea667ebb..178e2ac6 100644
--- a/ports/cortex_a8/ghs/src/tx_thread_fiq_nesting_start.arm
+++ b/ports/cortex_a8/ghs/src/tx_thread_fiq_nesting_start.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/ghs/src/tx_thread_interrupt_control.arm b/ports/cortex_a8/ghs/src/tx_thread_interrupt_control.arm
index d43559b4..11283b99 100644
--- a/ports/cortex_a8/ghs/src/tx_thread_interrupt_control.arm
+++ b/ports/cortex_a8/ghs/src/tx_thread_interrupt_control.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/ghs/src/tx_thread_interrupt_disable.arm b/ports/cortex_a8/ghs/src/tx_thread_interrupt_disable.arm
index 66db3d04..f693d578 100644
--- a/ports/cortex_a8/ghs/src/tx_thread_interrupt_disable.arm
+++ b/ports/cortex_a8/ghs/src/tx_thread_interrupt_disable.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/ghs/src/tx_thread_interrupt_restore.arm b/ports/cortex_a8/ghs/src/tx_thread_interrupt_restore.arm
index 372bde01..c344a482 100644
--- a/ports/cortex_a8/ghs/src/tx_thread_interrupt_restore.arm
+++ b/ports/cortex_a8/ghs/src/tx_thread_interrupt_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/ghs/src/tx_thread_irq_nesting_end.arm b/ports/cortex_a8/ghs/src/tx_thread_irq_nesting_end.arm
index b16499ad..ebb1692b 100644
--- a/ports/cortex_a8/ghs/src/tx_thread_irq_nesting_end.arm
+++ b/ports/cortex_a8/ghs/src/tx_thread_irq_nesting_end.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/ghs/src/tx_thread_irq_nesting_start.arm b/ports/cortex_a8/ghs/src/tx_thread_irq_nesting_start.arm
index 1edd8c56..26d03b01 100644
--- a/ports/cortex_a8/ghs/src/tx_thread_irq_nesting_start.arm
+++ b/ports/cortex_a8/ghs/src/tx_thread_irq_nesting_start.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/ghs/src/tx_thread_schedule.arm b/ports/cortex_a8/ghs/src/tx_thread_schedule.arm
index f6ae087b..eca5af9c 100644
--- a/ports/cortex_a8/ghs/src/tx_thread_schedule.arm
+++ b/ports/cortex_a8/ghs/src/tx_thread_schedule.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/ghs/src/tx_thread_stack_build.arm b/ports/cortex_a8/ghs/src/tx_thread_stack_build.arm
index a9c921d4..d5320f10 100644
--- a/ports/cortex_a8/ghs/src/tx_thread_stack_build.arm
+++ b/ports/cortex_a8/ghs/src/tx_thread_stack_build.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/ghs/src/tx_thread_system_return.arm b/ports/cortex_a8/ghs/src/tx_thread_system_return.arm
index 32a1c85f..af41522e 100644
--- a/ports/cortex_a8/ghs/src/tx_thread_system_return.arm
+++ b/ports/cortex_a8/ghs/src/tx_thread_system_return.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/ghs/src/tx_thread_vectored_context_save.arm b/ports/cortex_a8/ghs/src/tx_thread_vectored_context_save.arm
index 0fcc99c3..ddbea71e 100644
--- a/ports/cortex_a8/ghs/src/tx_thread_vectored_context_save.arm
+++ b/ports/cortex_a8/ghs/src/tx_thread_vectored_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/ghs/src/tx_timer_interrupt.arm b/ports/cortex_a8/ghs/src/tx_timer_interrupt.arm
index eeb14672..8a64d59e 100644
--- a/ports/cortex_a8/ghs/src/tx_timer_interrupt.arm
+++ b/ports/cortex_a8/ghs/src/tx_timer_interrupt.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/gnu/example_build/MP_GIC.h b/ports/cortex_a8/gnu/example_build/MP_GIC.h
index 82f2ea13..070a4936 100644
--- a/ports/cortex_a8/gnu/example_build/MP_GIC.h
+++ b/ports/cortex_a8/gnu/example_build/MP_GIC.h
@@ -4,7 +4,7 @@
//
// Copyright (c) 2011-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
diff --git a/ports/cortex_a8/gnu/example_build/MP_GIC.s b/ports/cortex_a8/gnu/example_build/MP_GIC.s
index 6626d583..1387a5b5 100644
--- a/ports/cortex_a8/gnu/example_build/MP_GIC.s
+++ b/ports/cortex_a8/gnu/example_build/MP_GIC.s
@@ -1,7 +1,7 @@
//----------------------------------------------------------------
// Copyright (c) 2005-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
//
// Cortex-A8MP example - Startup Code
@@ -37,7 +37,7 @@ enableGIC:
STR r1, [r0] // Write the GIC Enable Register (ICDDCR)
BX lr
-
+
// ------------------------------------------------------------
.global disableGIC
@@ -54,7 +54,7 @@ disableGIC:
STR r1, [r0] // Write the GIC Enable Register (ICDDCR)
BX lr
-
+
// ------------------------------------------------------------
@@ -84,10 +84,10 @@ enableIntID:
STR r3, [r0, r2] // Store out (ICDISER)
BX lr
-
+
// ------------------------------------------------------------
-
+
.global disableIntID
.type disableIntID,function
// void disableIntID(unsigned int ID)
@@ -112,7 +112,7 @@ disableIntID:
STR r3, [r0, r2] // Store out (ICDICER)
BX lr
-
+
// ------------------------------------------------------------
@@ -130,7 +130,7 @@ setIntPriority:
// r0 = base addr
// r1 = priority
// r2 = ID
-
+
// Make sure that priority value is only 5 bits, and convert to expected format
AND r1, r1, #0x1F
MOV r1, r1, LSL #3
@@ -156,7 +156,7 @@ setIntPriority:
STR r3, [r0] // And store it back again (ICDIPR)
BX lr
-
+
// ------------------------------------------------------------
@@ -175,7 +175,7 @@ enableGICProcessorInterface:
STR r1, [r0, #0x0] // Write the Processor Interface Control register (ICCICR/ICPICR)
BX lr
-
+
// ------------------------------------------------------------
@@ -195,7 +195,7 @@ disableGICProcessorInterface:
STR r1, [r0, #0x0] // Write the Processor Interface Control register (ICCICR/ICPICR)
BX lr
-
+
// ------------------------------------------------------------
@@ -214,8 +214,8 @@ setPriorityMask:
STR r0, [r1, #0x4] // Write the Priority Mask register (ICCPMR/ICCIPMR)
BX lr
-
-
+
+
// ------------------------------------------------------------
.global setBinaryPoint
@@ -231,7 +231,7 @@ setBinaryPoint:
STR r0, [r1, #0x8] // Write the Binary register (ICCBPR/ICCBPR)
BX lr
-
+
// ------------------------------------------------------------
@@ -245,7 +245,7 @@ readIntAck:
LDR r0, [r0, #0xC] // Read the Interrupt Acknowledge Register (ICCIAR)
BX lr
-
+
// ------------------------------------------------------------
@@ -262,8 +262,8 @@ writeEOI:
STR r0, [r1, #0x10] // Write ID to the End of Interrupt register (ICCEOIR)
BX lr
-
-
+
+
//----------------------------------------------------------------
// SGI
//----------------------------------------------------------------
diff --git a/ports/cortex_a8/gnu/example_build/MP_PrivateTimer.S b/ports/cortex_a8/gnu/example_build/MP_PrivateTimer.S
index b1e2701b..7b83be9e 100644
--- a/ports/cortex_a8/gnu/example_build/MP_PrivateTimer.S
+++ b/ports/cortex_a8/gnu/example_build/MP_PrivateTimer.S
@@ -64,7 +64,7 @@ stop_private_timer:
get_private_timer_count:
BX lr
-
+
// ------------------------------------------------------------
// void clear_private_timer_irq(void)
diff --git a/ports/cortex_a8/gnu/example_build/reset.S b/ports/cortex_a8/gnu/example_build/reset.S
index 3ce9efb7..f2e0522b 100644
--- a/ports/cortex_a8/gnu/example_build/reset.S
+++ b/ports/cortex_a8/gnu/example_build/reset.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a8/gnu/example_build/sample_threadx.ld b/ports/cortex_a8/gnu/example_build/sample_threadx.ld
index cb42c11c..d43e28f1 100644
--- a/ports/cortex_a8/gnu/example_build/sample_threadx.ld
+++ b/ports/cortex_a8/gnu/example_build/sample_threadx.ld
@@ -7,7 +7,7 @@ OUTPUT_ARCH(arm)
SECTIONS
{
. = 0x00000000;
-
+
.vectors : {reset.o(.text) }
/* Read-only sections, merged into text segment: */
@@ -94,8 +94,8 @@ SECTIONS
*(.gnu.linkonce.t*)
*(.glue_7t) *(.glue_7)
} =0
- .init :
- {
+ .init :
+ {
KEEP (*(.init))
} =0
_etext = .;
@@ -120,7 +120,7 @@ SECTIONS
.data1 : { *(.data1) }
.eh_frame : { KEEP (*(.eh_frame)) }
.gcc_except_table : { *(.gcc_except_table) }
- .ctors :
+ .ctors :
{
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
@@ -153,9 +153,9 @@ SECTIONS
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata :
+ .sdata :
{
- *(.sdata)
+ *(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
}
@@ -191,7 +191,7 @@ SECTIONS
_stack_bottom = ABSOLUTE(.) ;
- /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
+ /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
SYS stack if nested interrupts are enabled. */
. = ALIGN(8) ;
. += 4096 ;
diff --git a/ports/cortex_a8/gnu/example_build/tx_initialize_low_level.S b/ports/cortex_a8/gnu/example_build/tx_initialize_low_level.S
index a0adb55d..1120db44 100644
--- a/ports/cortex_a8/gnu/example_build/tx_initialize_low_level.S
+++ b/ports/cortex_a8/gnu/example_build/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -100,17 +101,6 @@ $_tx_initialize_low_level:
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_initialize_low_level
.type _tx_initialize_low_level,function
@@ -242,7 +232,7 @@ __tx_irq_processing_return:
if nested IRQ interrupts are desired. Interrupts may be re-enabled over
small code sequences where lr is saved before enabling interrupts and
restored after interrupts are again disabled. */
-
+
PUSH {r4, r5} // Save some preserved registers (r5 is saved just for 8-byte alignment)
BL readIntAck
MOV r4, r0
diff --git a/ports/cortex_a8/gnu/example_build/v7.h b/ports/cortex_a8/gnu/example_build/v7.h
index 5a08b43f..1133b0ac 100644
--- a/ports/cortex_a8/gnu/example_build/v7.h
+++ b/ports/cortex_a8/gnu/example_build/v7.h
@@ -4,7 +4,7 @@
//
// Copyright (c) 2011-2016 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
@@ -37,7 +37,6 @@ void disableInterrupts(void);
void invalidateCaches_IS(void);
void cleanInvalidateDCache(void);
-void invalidateCaches_IS(void);
void enableCaches(void);
void disableCaches(void);
void invalidateCaches(void);
diff --git a/ports/cortex_a8/gnu/example_build/v7.s b/ports/cortex_a8/gnu/example_build/v7.s
index 82c9ab1e..9487ddde 100644
--- a/ports/cortex_a8/gnu/example_build/v7.s
+++ b/ports/cortex_a8/gnu/example_build/v7.s
@@ -3,7 +3,7 @@
//
// Copyright (c) 2011-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
@@ -20,7 +20,7 @@
enableInterrupts:
CPSIE i
BX lr
-
+
.global disableInterrupts
.type disableInterrupts,function
@@ -28,7 +28,7 @@ enableInterrupts:
disableInterrupts:
CPSID i
BX lr
-
+
// ------------------------------------------------------------
// Cache Maintenance
@@ -44,7 +44,7 @@ enableCaches:
MCR p15, 0, r0, c1, c0, 0 // Write System Control Register
ISB
BX lr
-
+
.global disableCaches
@@ -57,7 +57,7 @@ disableCaches:
MCR p15, 0, r0, c1, c0, 0 // Write System Control Register
ISB
BX lr
-
+
.global cleanDCache
@@ -114,7 +114,7 @@ clean_dcache_finished:
POP {r4-r12}
BX lr
-
+
.global cleanInvalidateDCache
.type cleanInvalidateDCache,function
@@ -170,7 +170,7 @@ clean_invalidate_dcache_finished:
POP {r4-r12}
BX lr
-
+
.global invalidateCaches
@@ -229,7 +229,7 @@ invalidate_caches_skip:
invalidate_caches_finished:
POP {r4-r12}
BX lr
-
+
.global invalidateCaches_IS
@@ -284,7 +284,7 @@ invalidate_caches_is_skip:
invalidate_caches_is_finished:
POP {r4-r12}
BX lr
-
+
// ------------------------------------------------------------
// TLB
@@ -297,7 +297,7 @@ invalidateUnifiedTLB:
MOV r0, #0
MCR p15, 0, r0, c8, c7, 0 // TLBIALL - Invalidate entire unified TLB
BX lr
-
+
.global invalidateUnifiedTLB_IS
.type invalidateUnifiedTLB_IS,function
@@ -306,7 +306,7 @@ invalidateUnifiedTLB_IS:
MOV r0, #1
MCR p15, 0, r0, c8, c3, 0 // TLBIALLIS - Invalidate entire unified TLB Inner Shareable
BX lr
-
+
// ------------------------------------------------------------
// Branch Prediction
@@ -319,7 +319,7 @@ flushBranchTargetCache:
MOV r0, #0
MCR p15, 0, r0, c7, c5, 6 // BPIALL - Invalidate entire branch predictor array
BX lr
-
+
.global flushBranchTargetCache_IS
.type flushBranchTargetCache_IS,function
@@ -328,7 +328,7 @@ flushBranchTargetCache_IS:
MOV r0, #0
MCR p15, 0, r0, c7, c1, 6 // BPIALLIS - Invalidate entire branch predictor array Inner Shareable
BX lr
-
+
// ------------------------------------------------------------
// High Vecs
@@ -343,7 +343,7 @@ enableHighVecs:
MCR p15, 0, r0, c1, c0, 0 // Write Control Register
ISB
BX lr
-
+
.global disableHighVecs
.type disableHighVecs,function
@@ -354,7 +354,7 @@ disableHighVecs:
MCR p15, 0, r0, c1, c0, 0 // Write Control Register
ISB
BX lr
-
+
// ------------------------------------------------------------
// Context ID
@@ -366,7 +366,7 @@ disableHighVecs:
getContextID:
MRC p15, 0, r0, c13, c0, 1 // Read Context ID Register
BX lr
-
+
.global setContextID
.type setContextID,function
@@ -374,7 +374,7 @@ getContextID:
setContextID:
MCR p15, 0, r0, c13, c0, 1 // Write Context ID Register
BX lr
-
+
// ------------------------------------------------------------
// ID registers
@@ -386,7 +386,7 @@ setContextID:
getMIDR:
MRC p15, 0, r0, c0, c0, 0 // Read Main ID Register (MIDR)
BX lr
-
+
.global getMPIDR
.type getMPIDR,function
@@ -394,7 +394,7 @@ getMIDR:
getMPIDR:
MRC p15, 0, r0, c0 ,c0, 5// Read Multiprocessor ID register (MPIDR)
BX lr
-
+
// ------------------------------------------------------------
// CP15 SMP related
@@ -407,7 +407,7 @@ getMPIDR:
getBaseAddr:
MRC p15, 4, r0, c15, c0, 0 // Read peripheral base address
BX lr
-
+
// ------------------------------------------------------------
@@ -419,7 +419,7 @@ getCPUID:
MRC p15, 0, r0, c0, c0, 5 // Read CPU ID register
AND r0, r0, #0x03 // Mask off, leaving the CPU ID field
BX lr
-
+
// ------------------------------------------------------------
@@ -431,7 +431,7 @@ goToSleep:
WFI // Go into standby
B goToSleep // Catch in case of rogue events
BX lr
-
+
// ------------------------------------------------------------
@@ -451,7 +451,7 @@ joinSMP:
ISB
BX lr
-
+
// ------------------------------------------------------------
@@ -469,7 +469,7 @@ leaveSMP:
ISB
BX lr
-
+
// ------------------------------------------------------------
// End of v7.s
diff --git a/ports/cortex_a8/gnu/inc/tx_port.h b/ports/cortex_a8/gnu/inc/tx_port.h
index d80ddec1..f0153046 100644
--- a/ports/cortex_a8/gnu/inc/tx_port.h
+++ b/ports/cortex_a8/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,20 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -320,7 +307,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv7-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv7-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a8/gnu/readme_threadx.txt b/ports/cortex_a8/gnu/readme_threadx.txt
index 8f57bf4a..437f49d8 100644
--- a/ports/cortex_a8/gnu/readme_threadx.txt
+++ b/ports/cortex_a8/gnu/readme_threadx.txt
@@ -1,55 +1,55 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A8
+ Microsoft's Azure RTOS ThreadX for Cortex-A8
Using the GNU Tools
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the GNU
-development environment.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the GNU
+development environment.
-At this point you may run the build_threadx.bat batch file. This will build the
-ThreadX run-time environment in the "example_build" directory.
+At this point you may run the build_threadx.bat batch file. This will build the
+ThreadX run-time environment in the "example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
2. Demonstration System
-Building the demonstration is easy; simply execute the build_threadx_sample.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_sample.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with TX.A. The resulting file DEMO is a binary file
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with TX.A. The resulting file DEMO is a binary file
that can be downloaded and executed.
3. System Initialization
-The entry point in ThreadX for the Cortex-A8 using GNU tools is at label _start.
+The entry point in ThreadX for the Cortex-A8 using GNU tools is at label _start.
This is defined within the modified version of the GNU startup code - crt0.S.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up various
-system data structures, the interrupt vectors, and a periodic timer interrupt source.
-By default, the vector area is defined to be located at the "__vectors" label,
-which is defined in reset.S. This area is typically located at 0. In situations
-where this is impossible, the vectors at the "__vectors" label should be copied
+The ThreadX tx_initialize_low_level.S file is responsible for setting up various
+system data structures, the interrupt vectors, and a periodic timer interrupt source.
+By default, the vector area is defined to be located at the "__vectors" label,
+which is defined in reset.S. This area is typically located at 0. In situations
+where this is impossible, the vectors at the "__vectors" label should be copied
to address 0.
-This is also where initialization of a periodic timer interrupt source should take
+This is also where initialization of a periodic timer interrupt source should take
place.
-In addition, _tx_initialize_low_level defines the first available address
-for use by the application, which is supplied as the sole input parameter
+In addition, _tx_initialize_low_level defines the first available address
+for use by the application, which is supplied as the sole input parameter
to your application definition function, tx_application_define.
4. Assembler / Compiler Switches
-The following are compiler switches used in building the demonstration
+The following are compiler switches used in building the demonstration
system:
Compiler/Assembler Meaning
@@ -73,164 +73,164 @@ Application Defines ( -D option)
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S.
TX_ENABLE_FIQ_NESTING This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S. In addition,
IRQ nesting should also be enabled.
TX_ENABLE_FIQ_SUPPORT This compiler define enables FIQ
interrupt handling in the ThreadX
- generic C source. This define
+ generic C source. This define
should also be used in conjunction
with the corresponding assembler
- define.
+ define.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
5. Register Usage and Stack Frames
-The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -248,52 +248,52 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A8
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A8 vectors start at address zero. The demonstration system startup
-reset.S file contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+reset.S file contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
-ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
+ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
nested IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.S:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -301,7 +301,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -314,7 +314,7 @@ __tx_irq_processing_return:
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.S:
.global __tx_irq_example_handler
@@ -324,12 +324,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} @ Save some scratch registers
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
BL _tx_thread_vectored_context_save @ Call the vectored IRQ context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -346,22 +346,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -369,10 +369,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* Enable nested IRQ interrupts. NOTE: Since this service returns
-@ with IRQ interrupts enabled, all IRQ interrupt sources must be
+@ with IRQ interrupts enabled, all IRQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-@
+@
@ /* Application ISR call(s) go here! */
@
@ /* Disable nested IRQ interrupts. The mode is switched back to
@@ -385,12 +385,12 @@ __tx_irq_processing_return:
7.3 FIQ Interrupts
-By default, FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.S.
@@ -399,7 +399,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.S.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.S:
@@ -427,18 +427,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.S. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -454,7 +454,7 @@ __tx_fiq_processing_return:
@ interrupt, and all C scratch registers are available for use. */
@
@ /* Enable nested FIQ interrupts. NOTE: Since this service returns
-@ with FIQ interrupts enabled, all FIQ interrupt sources must be
+@ with FIQ interrupts enabled, all FIQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@
@@ -470,12 +470,12 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
-interrupt source, these services are not functional but the remainder of
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
+interrupt source, these services are not functional but the remainder of
ThreadX will still run.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.S for the demonstration system.
@@ -483,7 +483,7 @@ found in the file tx_initialize_low_level.S for the demonstration system.
9. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a8/gnu/src/tx_thread_context_restore.S b/ports/cortex_a8/gnu/src/tx_thread_context_restore.S
index 6b4a561d..41b0b0d0 100644
--- a/ports/cortex_a8/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a8/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,23 +80,6 @@ IRQ_MODE = 0x12 // IRQ mode
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_restore
.type _tx_thread_context_restore,function
diff --git a/ports/cortex_a8/gnu/src/tx_thread_context_save.S b/ports/cortex_a8/gnu/src/tx_thread_context_save.S
index eff06283..d2d29d34 100644
--- a/ports/cortex_a8/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a8/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,23 +72,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_save
.type _tx_thread_context_save,function
diff --git a/ports/cortex_a8/gnu/src/tx_thread_fiq_context_restore.S b/ports/cortex_a8/gnu/src/tx_thread_fiq_context_restore.S
index d2fbebe1..921c322c 100644
--- a/ports/cortex_a8/gnu/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_a8/gnu/src/tx_thread_fiq_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,20 +79,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* FIQ ISR Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_restore
.type _tx_thread_fiq_context_restore,function
diff --git a/ports/cortex_a8/gnu/src/tx_thread_fiq_context_save.S b/ports/cortex_a8/gnu/src/tx_thread_fiq_context_save.S
index 88472a3d..2f1a6c40 100644
--- a/ports/cortex_a8/gnu/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_a8/gnu/src/tx_thread_fiq_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_save
.type _tx_thread_fiq_context_save,function
diff --git a/ports/cortex_a8/gnu/src/tx_thread_fiq_nesting_end.S b/ports/cortex_a8/gnu/src/tx_thread_fiq_nesting_end.S
index fa3886b8..a7ce701e 100644
--- a/ports/cortex_a8/gnu/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_a8/gnu/src/tx_thread_fiq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ FIQ_MODE_BITS = 0x11 // FIQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/gnu/src/tx_thread_fiq_nesting_start.S b/ports/cortex_a8/gnu/src/tx_thread_fiq_nesting_start.S
index dbed1cf2..4f095dde 100644
--- a/ports/cortex_a8/gnu/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_a8/gnu/src/tx_thread_fiq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a8/gnu/src/tx_thread_interrupt_control.S
index d1223cb8..a5bc47f7 100644
--- a/ports/cortex_a8/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a8/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,20 +69,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a8/gnu/src/tx_thread_interrupt_disable.S
index a87d1a06..d7b53bc2 100644
--- a/ports/cortex_a8/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a8/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,20 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a8/gnu/src/tx_thread_interrupt_restore.S
index 53ff2813..3c31e94b 100644
--- a/ports/cortex_a8/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a8/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,20 +68,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/gnu/src/tx_thread_irq_nesting_end.S b/ports/cortex_a8/gnu/src/tx_thread_irq_nesting_end.S
index 18aebc7c..cc4db3a7 100644
--- a/ports/cortex_a8/gnu/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_a8/gnu/src/tx_thread_irq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/gnu/src/tx_thread_irq_nesting_start.S b/ports/cortex_a8/gnu/src/tx_thread_irq_nesting_start.S
index a2ffd35d..3635874d 100644
--- a/ports/cortex_a8/gnu/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_a8/gnu/src/tx_thread_irq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/gnu/src/tx_thread_schedule.S b/ports/cortex_a8/gnu/src/tx_thread_schedule.S
index 07dd6f7f..a74e2050 100644
--- a/ports/cortex_a8/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a8/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,6 +40,14 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode
+#ifdef TX_ENABLE_VFP_SUPPORT
+#define IRQ_MASK 0x80
+#endif
+
+#ifdef TX_ENABLE_FIQ_SUPPORT
+#define FIQ_MASK 0x40
+#endif
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
@@ -73,23 +82,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
@@ -259,3 +251,4 @@ no_fiq:
BX lr
#endif
+
diff --git a/ports/cortex_a8/gnu/src/tx_thread_stack_build.S b/ports/cortex_a8/gnu/src/tx_thread_stack_build.S
index 3876225a..827554a7 100644
--- a/ports/cortex_a8/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a8/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,20 +75,6 @@ CPSR_MASK = 0xBF // Mask initial CPSR, T, IRQ int
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/gnu/src/tx_thread_system_return.S b/ports/cortex_a8/gnu/src/tx_thread_system_return.S
index 0eed478d..1a17446b 100644
--- a/ports/cortex_a8/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a8/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,23 +69,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/gnu/src/tx_thread_vectored_context_save.S b/ports/cortex_a8/gnu/src/tx_thread_vectored_context_save.S
index fe8a98e8..91653b75 100644
--- a/ports/cortex_a8/gnu/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_a8/gnu/src/tx_thread_vectored_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_vectored_context_save
.type _tx_thread_vectored_context_save,function
diff --git a/ports/cortex_a8/gnu/src/tx_timer_interrupt.S b/ports/cortex_a8/gnu/src/tx_timer_interrupt.S
index cb0c1fa2..179ac894 100644
--- a/ports/cortex_a8/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a8/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,20 +78,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a8/iar/example_build/cstartup.s b/ports/cortex_a8/iar/example_build/cstartup.s
index b95efc0e..3da2b79d 100644
--- a/ports/cortex_a8/iar/example_build/cstartup.s
+++ b/ports/cortex_a8/iar/example_build/cstartup.s
@@ -1,7 +1,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; Part one of the system initialization code,
+;; Part one of the system initialization code,
;; contains low-level
;; initialization.
;;
@@ -71,13 +71,13 @@ FIQ_Addr: DCD __tx_fiq_handler
SECTION .text:CODE:NOROOT(2)
-; PUBLIC ?cstartup
+; PUBLIC ?cstartup
EXTERN ?main
REQUIRE __vector
- ARM
-
-__iar_program_start:
+ ARM
+
+__iar_program_start:
?cstartup:
;
diff --git a/ports/cortex_a8/iar/example_build/sample_threadx.c b/ports/cortex_a8/iar/example_build/sample_threadx.c
index c7c300cb..afbd4ea8 100644
--- a/ports/cortex_a8/iar/example_build/sample_threadx.c
+++ b/ports/cortex_a8/iar/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -83,42 +83,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -126,23 +126,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -245,11 +245,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -308,7 +308,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -361,7 +361,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_a8/iar/example_build/tx_initialize_low_level.s b/ports/cortex_a8/iar/example_build/tx_initialize_low_level.s
index f6ed88d7..eff62877 100644
--- a/ports/cortex_a8/iar/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_a8/iar/example_build/tx_initialize_low_level.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -62,7 +62,7 @@ SYS_MODE DEFINE 0xDF ; Disable irq,fiq SYS mode
;
;
;
-;/* Define the FREE_MEM segment that will specify where free memory is
+;/* Define the FREE_MEM segment that will specify where free memory is
; defined. This must also be located in at the end of other RAM segments
; in the linker control file. The value of this segment is what is passed
; to tx_application_define. */
@@ -75,45 +75,39 @@ __tx_free_memory_start
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level Cortex-A8/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level Cortex-A8/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -146,7 +140,7 @@ _tx_initialize_low_level
;
LDR r2, =_tx_initialize_unused_memory ; Pickup unused memory ptr address
STR r0, [r2, #0] ; Save first free memory address
-;
+;
; /* Setup Timer for periodic interrupts. */
;
; /* Done, return to caller. */
@@ -188,7 +182,7 @@ __tx_reserved_handler
RSEG .text:CODE:NOROOT(2)
PUBLIC __tx_irq_handler
RSEG .text:CODE:NOROOT(2)
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -196,17 +190,17 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -221,7 +215,7 @@ __tx_irq_processing_return
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -240,22 +234,22 @@ __tx_irq_processing_return
; /* Jump to context save to save system context. */
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other registers
; BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -264,7 +258,7 @@ __tx_irq_processing_return
; /* Application IRQ handler is called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
@@ -288,11 +282,11 @@ __tx_fiq_processing_return
; /* At this point execution is still in the FIQ mode. The CPSR, point of
; interrupt, and all C scratch registers are available for use. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
; from FIQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with FIQ interrupts enabled.
+; system mode and returns with FIQ interrupts enabled.
;
-; NOTE: It is very important to ensure all FIQ interrupts are cleared
+; NOTE: It is very important to ensure all FIQ interrupts are cleared
; prior to enabling nested FIQ interrupts. */
#ifdef TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/cortex_a8/iar/inc/tx_port.h b/ports/cortex_a8/iar/inc/tx_port.h
index 827c0cdf..940d7f68 100644
--- a/ports/cortex_a8/iar/inc/tx_port.h
+++ b/ports/cortex_a8/iar/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-A8/IAR */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-A8/IAR */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -79,7 +71,7 @@
#endif
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -115,12 +107,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -130,8 +122,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -188,7 +180,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -202,18 +194,18 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable; \
- VOID *tx_thread_iar_tls_pointer;
+ VOID *tx_thread_iar_tls_pointer;
#else
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable;
#endif
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -227,11 +219,11 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -241,23 +233,23 @@ ULONG _tx_misra_time_stamp_get(VOID);
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#if (__VER__ < 8000000)
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {_tx_iar_destroy_per_thread_tls_area(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
-#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
+#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#endif
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -285,8 +277,8 @@ void __iar_Initlocks(void);
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef TX_DISABLE_INLINE
@@ -297,22 +289,22 @@ void __iar_Initlocks(void);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (UINT) __CLZ(m); \
- b = 31 - b;
+ b = 31 - b;
#endif
#endif
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
/* First, check and see what mode the file is being compiled in. The IAR compiler
- defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
+ defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
is present. If ARM 32-bit mode is present, the fast CPSR manipulation macros
are available. Otherwise, if Thumb mode is present, we must use function calls. */
@@ -382,8 +374,8 @@ void tx_thread_vfp_disable(void);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-A8/IAR Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-A8/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_a8/iar/readme_threadx.txt b/ports/cortex_a8/iar/readme_threadx.txt
index 9c55e729..cd01608c 100644
--- a/ports/cortex_a8/iar/readme_threadx.txt
+++ b/ports/cortex_a8/iar/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A8
+ Microsoft's Azure RTOS ThreadX for Cortex-A8
Thumb & 32-bit Mode
@@ -7,10 +7,10 @@
1. Building the ThreadX run-time Library
Building the ThreadX library is easy. First, open the Azure RTOS workspace
-azure_rtos.eww. Next, make the TX project the "active project" in the
-IAR Embedded Workbench and select the "Make" button. You should observe
-assembly and compilation of a series of ThreadX source files. This
-results in the ThreadX run-time library file tx.a, which is needed by
+azure_rtos.eww. Next, make the TX project the "active project" in the
+IAR Embedded Workbench and select the "Make" button. You should observe
+assembly and compilation of a series of ThreadX source files. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
@@ -20,47 +20,47 @@ The ThreadX demonstration is designed to execute under the IAR
Windows-based Cortex-A8 simulator.
Building the demonstration is easy; simply make the sample_threadx.ewp project
-the "active project" in the IAR Embedded Workbench and select the
+the "active project" in the IAR Embedded Workbench and select the
"Make" button.
-You should observe the compilation of sample_threadx.c (which is the demonstration
+You should observe the compilation of sample_threadx.c (which is the demonstration
application) and linking with tx.a. The resulting file sample_threadx.out is a
binary file that can be downloaded and executed on IAR's Cortex-A8 simulator.
3. System Initialization
-The entry point in ThreadX for the Cortex-A8 using IAR tools is at label
-?cstartup. This is defined within the IAR compiler's startup code. In
-addition, this is where all static and global preset C variable
+The entry point in ThreadX for the Cortex-A8 using IAR tools is at label
+?cstartup. This is defined within the IAR compiler's startup code. In
+addition, this is where all static and global preset C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, and a periodic timer interrupt source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, and a periodic timer interrupt source.
By default, the vector area is defined at the top of cstartup.s, which is
-a slightly modified from the base IAR file.
+a slightly modified from the base IAR file.
The _tx_initialize_low_level function inside of tx_initialize_low_level.s
-also determines the first available address for use by the application, which
-is supplied as the sole input parameter to your application definition function,
-tx_application_define. To accomplish this, a section is created in
-tx_initialize_low_level.s called FREE_MEM, which must be located after all
+also determines the first available address for use by the application, which
+is supplied as the sole input parameter to your application definition function,
+tx_application_define. To accomplish this, a section is created in
+tx_initialize_low_level.s called FREE_MEM, which must be located after all
other RAM sections in memory.
4. Register Usage and Stack Frames
-The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
-scratch registers for each function. All other registers used by a C function
-must be preserved by the function. ThreadX takes advantage of this in
-situations where a context switch happens as a result of making a ThreadX
-service call (which is itself a C function). In such cases, the saved
+The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
+scratch registers for each function. All other registers used by a C function
+must be preserved by the function. ThreadX takes advantage of this in
+situations where a context switch happens as a result of making a ThreadX
+service call (which is itself a C function). In such cases, the saved
context of a thread is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -78,12 +78,12 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
5. Conditional Compilation Switches
@@ -92,146 +92,146 @@ The following are conditional compilation options for building the ThreadX libra
and application:
- TX_ENABLE_FIQ_SUPPORT This assembler/compiler define enables
+ TX_ENABLE_FIQ_SUPPORT This assembler/compiler define enables
FIQ interrupt handling support in the
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s.
TX_ENABLE_FIQ_NESTING This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s. In addition,
IRQ nesting should also be enabled.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
TX_THUMB Defined, this option enables the BX LR calling return sequence
@@ -245,29 +245,29 @@ and application:
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
-project to enable various compiler optimizations.
+project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A8
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A8 vectors start at address zero. The demonstration system startup
-cstartup.s file contains the vectors and is loaded at address zero.
-On actual hardware platforms, this area might have to be copied to address 0.
+cstartup.s file contains the vectors and is loaded at address zero.
+On actual hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -278,12 +278,12 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
PUBLIC __tx_irq_handler
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -291,7 +291,7 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -304,7 +304,7 @@ __tx_irq_processing_return
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.s:
@@ -315,12 +315,12 @@ __tx_example_vectored_irq_handler
; /* Jump to context save to save system context. */
STMDB sp!, {r0-r3} ; Save some scratch registers
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -337,24 +337,24 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
RSEG .text:CODE:NOROOT(2)
PUBLIC __tx_irq_handler
RSEG .text:CODE:NOROOT(2)
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -362,15 +362,15 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;
BL _tx_thread_irq_nesting_start
@@ -378,7 +378,7 @@ __tx_irq_processing_return
; /* Application ISR dispatch call goes here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;
BL _tx_thread_irq_nesting_end
@@ -389,12 +389,12 @@ __tx_irq_processing_return
7.3 FIQ Interrupts
-By default, Cortex-A8 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, Cortex-A8 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -403,7 +403,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.s.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.s:
@@ -434,18 +434,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.s. When nested FIQ interrupts are no
-longer required, calling the _tx_thread_fiq_nesting_end service disables
-nesting by disabling FIQ interrupts and switching back to FIQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.s. When nested FIQ interrupts are no
+longer required, calling the _tx_thread_fiq_nesting_end service disables
+nesting by disabling FIQ interrupts and switching back to FIQ mode in
preparation for the FIQ context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -463,7 +463,7 @@ __tx_fiq_processing_return:
; interrupt, and all C scratch registers are available for use. */
;
; /* Enable nested FIQ interrupts. NOTE: Since this service returns
-; with FIQ interrupts enabled, all FIQ interrupt sources must be
+; with FIQ interrupts enabled, all FIQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
;
@@ -479,22 +479,22 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
+To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
in the IRQ processing.
9. Thumb/Cortex-A8 Mixed Mode
-By default, ThreadX is setup for running in Cortex-A8 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
+By default, ThreadX is setup for running in Cortex-A8 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
ThreadX file and/or the application in Thumb mode. The only exception
-to this is the file tx_thread_shell_entry.c. This file must always be
-built in 32-bit mode. In addition, if any Thumb code is used the entire
+to this is the file tx_thread_shell_entry.c. This file must always be
+built in 32-bit mode. In addition, if any Thumb code is used the entire
ThreadX assembly source should be built with TX_THUMB defined.
@@ -506,14 +506,14 @@ should have the following line added (if not already in place):
initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
-The project options "General Options -> Library Configuration" should also have the
+The project options "General Options -> Library Configuration" should also have the
"Enable thread support in library" box selected.
11. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a8/iar/src/tx_iar.c b/ports/cortex_a8/iar/src/tx_iar.c
index a37231c8..238b485e 100644
--- a/ports/cortex_a8/iar/src/tx_iar.c
+++ b/ports/cortex_a8/iar/src/tx_iar.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** IAR Multithreaded Library Support */
/** */
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,24 +423,24 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#include
+#include
void * __aeabi_read_tp();
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports/cortex_a8/iar/src/tx_thread_context_restore.s b/ports/cortex_a8/iar/src/tx_thread_context_restore.s
index b189af01..fb356284 100644
--- a/ports/cortex_a8/iar/src/tx_thread_context_restore.s
+++ b/ports/cortex_a8/iar/src/tx_thread_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,7 +36,7 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
THUMB_MASK DEFINE 0x20 ; Thumb bit mask
SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
@@ -51,47 +51,38 @@ SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore Cortex-A8/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore Cortex-A8/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -121,13 +112,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3, #0] ; Store the counter
+ STR r2, [r3, #0] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -193,7 +184,7 @@ __tx_thread_preempt_restore
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
-
+
#ifdef __ARMVFP__
LDR r2, [r0, #144] ; Pickup the VFP enabled flag
CMP r2, #0 ; Is the VFP enabled?
diff --git a/ports/cortex_a8/iar/src/tx_thread_context_save.s b/ports/cortex_a8/iar/src/tx_thread_context_save.s
index cf9c22eb..98f88283 100644
--- a/ports/cortex_a8/iar/src/tx_thread_context_save.s
+++ b/ports/cortex_a8/iar/src/tx_thread_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -43,46 +43,37 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save Cortex-A8/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save Cortex-A8/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
@@ -99,7 +90,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
#ifdef TX_ENABLE_FIQ_SUPPORT
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt CPSR
@@ -119,7 +110,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -135,7 +126,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -149,13 +140,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -175,7 +166,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -185,7 +176,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -200,7 +191,7 @@ __tx_thread_idle_system_save
#endif
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports/cortex_a8/iar/src/tx_thread_fiq_context_restore.s b/ports/cortex_a8/iar/src/tx_thread_fiq_context_restore.s
index 723d0ba5..091a5551 100644
--- a/ports/cortex_a8/iar/src/tx_thread_fiq_context_restore.s
+++ b/ports/cortex_a8/iar/src/tx_thread_fiq_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -37,7 +37,7 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
THUMB_MASK DEFINE 0x20 ; Thumb bit mask
IRQ_MODE_BITS DEFINE 0x12 ; IRQ mode bits
SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
@@ -52,47 +52,38 @@ SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
EXTERN _tx_execution_isr_exit
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_restore Cortex-A8/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_restore Cortex-A8/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the fiq interrupt context when processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* FIQ ISR Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function restores the fiq interrupt context when processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* FIQ ISR Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_context_restore(VOID)
@@ -122,13 +113,13 @@ _tx_thread_fiq_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -172,7 +163,7 @@ __tx_thread_fiq_no_preempt_restore
; /* Restore interrupted thread or ISR. */
;
; /* Pickup the saved stack pointer. */
-; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
+; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
;
; /* Recover the saved context and return to the point of interrupt. */
;
@@ -232,7 +223,7 @@ _tx_skip_irq_vfp_save:
BEQ __tx_thread_fiq_dont_save_ts ; No, don't save it
;
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-; _tx_timer_time_slice = 0;
+; _tx_timer_time_slice = 0;
;
STR r2, [r0, #24] ; Save thread's time-slice
MOV r2, #0 ; Clear value
diff --git a/ports/cortex_a8/iar/src/tx_thread_fiq_context_save.s b/ports/cortex_a8/iar/src/tx_thread_fiq_context_save.s
index a9fa3890..c9cdc190 100644
--- a/ports/cortex_a8/iar/src/tx_thread_fiq_context_save.s
+++ b/ports/cortex_a8/iar/src/tx_thread_fiq_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,46 +36,37 @@
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_save Cortex-A8/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_save Cortex-A8/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
; VOID _tx_thread_fiq_context_save(VOID)
@@ -92,7 +83,7 @@ _tx_thread_fiq_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -107,7 +98,7 @@ _tx_thread_fiq_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -123,38 +114,38 @@ _tx_thread_fiq_context_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
__tx_thread_fiq_not_nested_save
-; }
+; }
;
; /* Otherwise, not nested, check to see if a thread was running. */
; else if (_tx_thread_current_ptr)
-; {
+; {
;
ADD r2, r2, #1 ; Increment the interrupt counter
STR r2, [r3] ; Store it back in the variable
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
-; ; scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
+; ; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, lr} ; Store other registers, Note that we don't
-; ; need to save sl and ip since FIQ has
-; ; copies of these registers. Nested
+; ; need to save sl and ip since FIQ has
+; ; copies of these registers. Nested
; ; interrupt processing does need to save
; ; these registers.
;
; /* Save the current stack pointer in the thread's control block. */
-; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
;
; /* Switch to the system stack. */
-; sp = _tx_thread_system_stack_ptr;
+; sp = _tx_thread_system_stack_ptr;
;
MOV r10, #0 ; Clear stack limit
@@ -167,7 +158,7 @@ __tx_thread_fiq_not_nested_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
; else
@@ -187,18 +178,18 @@ __tx_thread_fiq_idle_system_save
#endif
;
; /* Not much to do here, save the current SPSR and LR for possible
-; use in IRQ interrupted in idle system conditions, and return to
+; use in IRQ interrupted in idle system conditions, and return to
; FIQ interrupt processing. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, lr} ; Store other registers that will get used
-; ; or stripped off the stack in context
-; ; restore
- B __tx_fiq_processing_return ; Continue FIQ processing
+; ; or stripped off the stack in context
+; ; restore
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
-;}
+;}
;
;
END
diff --git a/ports/cortex_a8/iar/src/tx_thread_fiq_nesting_end.s b/ports/cortex_a8/iar/src/tx_thread_fiq_nesting_end.s
index ea0855c5..980a803e 100644
--- a/ports/cortex_a8/iar/src/tx_thread_fiq_nesting_end.s
+++ b/ports/cortex_a8/iar/src/tx_thread_fiq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,55 +34,49 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
FIQ_MODE_BITS DEFINE 0x11 ; FIQ mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_end Cortex-A8/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_end Cortex-A8/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-;/* processing from system mode back to FIQ mode prior to the ISR */
-;/* calling _tx_thread_fiq_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with FIQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+;/* processing from system mode back to FIQ mode prior to the ISR */
+;/* calling _tx_thread_fiq_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with FIQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_end(VOID)
diff --git a/ports/cortex_a8/iar/src/tx_thread_fiq_nesting_start.s b/ports/cortex_a8/iar/src/tx_thread_fiq_nesting_start.s
index 76fe6bb5..8ec71833 100644
--- a/ports/cortex_a8/iar/src/tx_thread_fiq_nesting_start.s
+++ b/ports/cortex_a8/iar/src/tx_thread_fiq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ MODE_MASK DEFINE 0x1F ; Mode mask
SYS_MODE_BITS DEFINE 0x1F ; System mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_start Cortex-A8/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_start Cortex-A8/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-;/* processing to the system mode so nested FIQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with FIQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+;/* processing to the system mode so nested FIQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with FIQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/cortex_a8/iar/src/tx_thread_interrupt_control.s b/ports/cortex_a8/iar/src/tx_thread_interrupt_control.s
index c1a42e43..a8c64050 100644
--- a/ports/cortex_a8/iar/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_a8/iar/src/tx_thread_interrupt_control.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,42 +35,36 @@ INT_MASK DEFINE 0x80 ; Interrupt bit mask
#endif
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control Cortex-A8/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control Cortex-A8/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/cortex_a8/iar/src/tx_thread_interrupt_disable.s b/ports/cortex_a8/iar/src/tx_thread_interrupt_disable.s
index 15f9c425..5dbf7181 100644
--- a/ports/cortex_a8/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_a8/iar/src/tx_thread_interrupt_disable.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,41 +36,35 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable Cortex-A8/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable Cortex-A8/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(VOID)
diff --git a/ports/cortex_a8/iar/src/tx_thread_interrupt_restore.s b/ports/cortex_a8/iar/src/tx_thread_interrupt_restore.s
index 90fc68e9..3d40ceef 100644
--- a/ports/cortex_a8/iar/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_a8/iar/src/tx_thread_interrupt_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -28,42 +28,36 @@
;#include "tx_thread.h"
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore Cortex-A8/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore Cortex-A8/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function is responsible for restoring interrupts to the state */
;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;void _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/cortex_a8/iar/src/tx_thread_irq_nesting_end.s b/ports/cortex_a8/iar/src/tx_thread_irq_nesting_end.s
index b0c927b2..de93f738 100644
--- a/ports/cortex_a8/iar/src/tx_thread_irq_nesting_end.s
+++ b/ports/cortex_a8/iar/src/tx_thread_irq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,55 +35,49 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
IRQ_MODE_BITS DEFINE 0x12 ; IRQ mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end Cortex-A8/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end Cortex-A8/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
diff --git a/ports/cortex_a8/iar/src/tx_thread_irq_nesting_start.s b/ports/cortex_a8/iar/src/tx_thread_irq_nesting_start.s
index 0b9e4a77..2a327a17 100644
--- a/ports/cortex_a8/iar/src/tx_thread_irq_nesting_start.s
+++ b/ports/cortex_a8/iar/src/tx_thread_irq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ MODE_MASK DEFINE 0x1F ; Mode mask
SYS_MODE_BITS DEFINE 0x1F ; System mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start Cortex-A8/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start Cortex-A8/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/cortex_a8/iar/src/tx_thread_schedule.s b/ports/cortex_a8/iar/src/tx_thread_schedule.s
index 0688152e..4044a81f 100644
--- a/ports/cortex_a8/iar/src/tx_thread_schedule.s
+++ b/ports/cortex_a8/iar/src/tx_thread_schedule.s
@@ -1,18 +1,19 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -43,48 +44,39 @@ ENABLE_INTS DEFINE 0x80 ; IRQ Interrupts enabled mask
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule Cortex-A8/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule Cortex-A8/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
@@ -114,7 +106,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -123,7 +115,7 @@ __tx_thread_schedule_loop
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
;
- LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
STR r0, [r1, #0] ; Setup current thread pointer
;
; /* Increment the run count for this thread. */
@@ -137,7 +129,7 @@ __tx_thread_schedule_loop
; /* Setup time-slice, if present. */
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
;
- LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
+ LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
; variable
LDR sp, [r0, #8] ; Switch stack pointers
STR r3, [r2, #0] ; Setup time-slice
@@ -198,7 +190,7 @@ _tx_skip_solicited_vfp_restore:
#ifdef __ARMVFP__
PUBLIC tx_thread_vfp_enable
CODE32
-tx_thread_vfp_enable??rA
+tx_thread_vfp_enable??rA
tx_thread_vfp_enable
MRS r2, CPSR ; Pickup the CPSR
#ifdef TX_ENABLE_FIQ_SUPPORT
@@ -218,7 +210,7 @@ __tx_no_thread_to_enable:
PUBLIC tx_thread_vfp_disable
CODE32
-tx_thread_vfp_disable??rA
+tx_thread_vfp_disable??rA
tx_thread_vfp_disable
MRS r2, CPSR ; Pickup the CPSR
#ifdef TX_ENABLE_FIQ_SUPPORT
@@ -239,3 +231,4 @@ __tx_no_thread_to_disable:
END
+
diff --git a/ports/cortex_a8/iar/src/tx_thread_stack_build.s b/ports/cortex_a8/iar/src/tx_thread_stack_build.s
index 962f7813..ed90c4a3 100644
--- a/ports/cortex_a8/iar/src/tx_thread_stack_build.s
+++ b/ports/cortex_a8/iar/src/tx_thread_stack_build.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -37,58 +37,52 @@ CPSR_MASK DEFINE 0x9F ; Mask initial CPSR, IRQ ints en
#endif
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build Cortex-A8/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build Cortex-A8/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function builds a stack frame on the supplied thread's stack. */
;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
;/* thread_ptr Pointer to thread control blk */
;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
;{
RSEG .text:CODE:NOROOT(2)
PUBLIC _tx_thread_stack_build
-
+
CODE32
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-A8 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports/cortex_a8/iar/src/tx_thread_system_return.s b/ports/cortex_a8/iar/src/tx_thread_system_return.s
index 13e04f6c..42f5c9a3 100644
--- a/ports/cortex_a8/iar/src/tx_thread_system_return.s
+++ b/ports/cortex_a8/iar/src/tx_thread_system_return.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -42,47 +42,38 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return Cortex-A8/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return Cortex-A8/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
@@ -113,7 +104,7 @@ _tx_skip_solicited_vfp_save:
MOV r0, #0 ; Build a solicited stack type
MRS r1, CPSR ; Pickup the CPSR
STMDB sp!, {r0-r1} ; Save type and CPSR
-;
+;
; /* Lockout interrupts. */
;
ORR r2, r1, #DISABLE_INTS ; Build disable interrupt CPSR
diff --git a/ports/cortex_a8/iar/src/tx_thread_vectored_context_save.s b/ports/cortex_a8/iar/src/tx_thread_vectored_context_save.s
index 2e1ac10c..0816576f 100644
--- a/ports/cortex_a8/iar/src/tx_thread_vectored_context_save.s
+++ b/ports/cortex_a8/iar/src/tx_thread_vectored_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -41,46 +41,37 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save Cortex-A8/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save Cortex-A8/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_vectored_context_save(VOID)
@@ -142,7 +133,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -174,7 +165,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports/cortex_a8/iar/src/tx_timer_interrupt.s b/ports/cortex_a8/iar/src/tx_timer_interrupt.s
index 49d4219b..03ca45db 100644
--- a/ports/cortex_a8/iar/src/tx_timer_interrupt.s
+++ b/ports/cortex_a8/iar/src/tx_timer_interrupt.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Timer */
;/** */
@@ -43,46 +43,40 @@
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt Cortex-A8/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt Cortex-A8/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time-slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time-slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -108,7 +102,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -226,13 +220,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports/cortex_a9/ac5/example_build/sample_threadx.c b/ports/cortex_a9/ac5/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/cortex_a9/ac5/example_build/sample_threadx.c
+++ b/ports/cortex_a9/ac5/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_a9/ac5/example_build/tx_initialize_low_level.s b/ports/cortex_a9/ac5/example_build/tx_initialize_low_level.s
index a15994e1..c9b06bd1 100644
--- a/ports/cortex_a9/ac5/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_a9/ac5/example_build/tx_initialize_low_level.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -110,45 +110,39 @@ Reset_Vector
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level Cortex-A9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level Cortex-A9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -199,7 +193,7 @@ _tx_initialize_low_level
; _tx_thread_system_stack_ptr = (VOID_PTR) (sp);
;
LDR r1, =_tx_thread_system_stack_ptr ; Pickup address of system stack ptr
- LDR r0, [r1, #0] ; Pickup system stack
+ LDR r0, [r1, #0] ; Pickup system stack
ADD r0, r0, #4 ; Increment to next free word
;
; /* Save the first available memory address. */
@@ -221,7 +215,7 @@ _tx_initialize_low_level
;
;
;/* Define initial heap/stack routine for the ARM RealView (and ADS) startup code. This
-; routine will set the initial stack to use the ThreadX IRQ & FIQ &
+; routine will set the initial stack to use the ThreadX IRQ & FIQ &
; (optionally SYS) stack areas. */
;
EXPORT __user_initial_stackheap
@@ -273,7 +267,7 @@ __tx_reserved_handler
;
;
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -281,21 +275,21 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
BL _tx_timer_interrupt ; Timer interrupt handler
_tx_not_timer_interrupt
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -305,7 +299,7 @@ _tx_not_timer_interrupt
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -321,28 +315,28 @@ _tx_not_timer_interrupt
__tx_example_vectored_irq_handler
;
;
-; /* Save initial context and call context save to prepare for
+; /* Save initial context and call context save to prepare for
; vectored ISR execution. */
;
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
; BL _tx_thread_vectored_context_save ; Vectored context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -351,7 +345,7 @@ __tx_example_vectored_irq_handler
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
@@ -373,11 +367,11 @@ __tx_fiq_processing_return
; /* At this point execution is still in the FIQ mode. The CPSR, point of
; interrupt, and all C scratch registers are available for use. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
; from FIQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with FIQ interrupts enabled.
+; system mode and returns with FIQ interrupts enabled.
;
-; NOTE: It is very important to ensure all FIQ interrupts are cleared
+; NOTE: It is very important to ensure all FIQ interrupts are cleared
; prior to enabling nested FIQ interrupts. */
IF :DEF:TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/cortex_a9/ac5/inc/tx_port.h b/ports/cortex_a9/ac5/inc/tx_port.h
index d6980a5c..0c145156 100644
--- a/ports/cortex_a9/ac5/inc/tx_port.h
+++ b/ports/cortex_a9/ac5/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-A9/AC5 */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-A9/AC5 */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -75,7 +67,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -111,12 +103,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -126,8 +118,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -174,7 +166,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -186,13 +178,13 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable;
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -206,11 +198,11 @@ typedef unsigned short USHORT;
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -218,8 +210,8 @@ typedef unsigned short USHORT;
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -246,21 +238,21 @@ typedef unsigned short USHORT;
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef __thumb
-
+
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (ULONG) __clz((unsigned int) m); \
- b = 31 - b;
+ b = 31 - b;
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -280,7 +272,7 @@ typedef unsigned short USHORT;
{ \
__enable_irq(); \
__enable_fiq(); \
- }
+ }
#else
@@ -289,7 +281,7 @@ typedef unsigned short USHORT;
#define TX_RESTORE if (!interrupt_save_disabled) \
{ \
__enable_irq(); \
- }
+ }
#endif
#else
@@ -325,8 +317,8 @@ void tx_thread_vfp_disable(void);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-A9/AC5 Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-A9/AC5 Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a9/ac5/readme_threadx.txt b/ports/cortex_a9/ac5/readme_threadx.txt
index 56cff19c..b29a95e2 100644
--- a/ports/cortex_a9/ac5/readme_threadx.txt
+++ b/ports/cortex_a9/ac5/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A9
+ Microsoft's Azure RTOS ThreadX for Cortex-A9
Thumb & 32-bit Mode
@@ -6,21 +6,21 @@
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the ARM
-AC5 development environment. At this point you may run the build_threadx.bat
-batch file. This will build the ThreadX run-time environment in the
-"example_build" directory.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the ARM
+AC5 development environment. At this point you may run the build_threadx.bat
+batch file. This will build the ThreadX run-time environment in the
+"example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
1.1 Building with Project Files
-The ThreadX library can also be built via project files. Simply open
-the tx.mcp file with project builder and select make. This will place
+The ThreadX library can also be built via project files. Simply open
+the tx.mcp file with project builder and select make. This will place
the tx.a library file into the Debug sub-directory.
@@ -29,45 +29,45 @@ the tx.a library file into the Debug sub-directory.
The ThreadX demonstration is designed to execute under the ARM
Windows-based simulator.
-Building the demonstration is easy; simply execute the build_threadx_demo.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_demo.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.axf
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.axf
is a binary file that can be downloaded and executed on the ARM simulator.
2.0.1 Building with Project Files
-The ThreadX demonstration can also be built via project files. Simply open
-the sample_threadx.mcp file with project builder and select make. This will place
+The ThreadX demonstration can also be built via project files. Simply open
+the sample_threadx.mcp file with project builder and select make. This will place
the sample_threadx.axf output image into the Debug sub-directory.
3. System Initialization
-The entry point in ThreadX for the Cortex-A9 using AC5 tools is at label
-__main. This is defined within the AC5 compiler's startup code. In
-addition, this is where all static and global pre-set C variable
+The entry point in ThreadX for the Cortex-A9 using AC5 tools is at label
+__main. This is defined within the AC5 compiler's startup code. In
+addition, this is where all static and global pre-set C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source. By default, the vector area is defined to be located in the Init area,
-which is defined at the top of tx_initialize_low_level.s. This area is typically
-located at 0. In situations where this is impossible, the vectors at the beginning
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source. By default, the vector area is defined to be located in the Init area,
+which is defined at the top of tx_initialize_low_level.s. This area is typically
+located at 0. In situations where this is impossible, the vectors at the beginning
of the Init area should be copied to address 0.
This is also where initialization of a periodic timer interrupt source
should take place.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
4. Assembler / Compiler Switches
-The following are compiler switches used in building the demonstration
+The following are compiler switches used in building the demonstration
system:
Compiler Switch Meaning
@@ -83,10 +83,10 @@ Linker Switch Meaning
-o demo.axf Specifies demo output file name
--elf Specifies elf output file format
--ro Specifies that Read-Only memory starts at address 0
- --first tx_initialize_low_level.o(Init)
+ --first tx_initialize_low_level.o(Init)
Specifies that the first area loaded is Init
--remove Remove unused areas
- --list Specifies map file name
+ --list Specifies map file name
--symbols Specifies symbols for map file
--map Creates a map file
@@ -97,161 +97,161 @@ Application Defines
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
--PD "TX_ENABLE_IRQ_NESTING SETL {TRUE}" This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s.
--PD "TX_ENABLE_FIQ_NESTING SETL {TRUE}" This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s. In addition,
IRQ nesting should also be enabled.
-DTX_ENABLE_FIQ_SUPPORT This compiler define enables FIQ
interrupt handling in the ThreadX
- generic C source. This define
+ generic C source. This define
should also be used in conjunction
with the corresponding assembler
- define.
+ define.
-DTX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- -DTX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ -DTX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- -DTX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ -DTX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- -DTX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ -DTX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- -DTX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ -DTX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- -DTX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ -DTX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- -DTX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ -DTX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- -DTX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ -DTX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- -DTX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ -DTX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- -DTX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ -DTX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- -DTX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ -DTX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- -DTX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ -DTX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- -DTX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ -DTX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- -DTX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ -DTX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- -DTX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ -DTX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- -DTX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ -DTX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- -DTX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ -DTX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- -DTX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ -DTX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- -DTX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ -DTX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- -DTX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ -DTX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
-DTX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- -DTX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ -DTX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- -DTX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ -DTX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
5. Register Usage and Stack Frames
-The AC5 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The AC5 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -269,39 +269,39 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
-performance. To make it run faster, you can change the build_threadx.bat file to
-remove the -g option and enable all compiler optimizations.
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
+performance. To make it run faster, you can change the build_threadx.bat file to
+remove the -g option and enable all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A9
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A9 vectors start at address zero. The demonstration system startup
-Init area contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+Init area contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -312,12 +312,12 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -325,7 +325,7 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -338,7 +338,7 @@ __tx_irq_processing_return
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.s:
EXPORT __tx_irq_example_handler
@@ -348,12 +348,12 @@ __tx_irq_example_handler
STMDB sp!, {r0-r3} ; Save some scratch registers
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
BL _tx_thread_vectored_context_save ; Call the vectored IRQ context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -370,22 +370,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested IRQ interrupts are no longer required,
calling the _tx_thread_irq_nesting_end service disables nesting by disabling
-IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
+IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -393,10 +393,10 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* Enable nested IRQ interrupts. NOTE: Since this service returns
-; with IRQ interrupts enabled, all IRQ interrupt sources must be
+; with IRQ interrupts enabled, all IRQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-;
+;
; /* Application ISR call(s) go here! */
;
; /* Disable nested IRQ interrupts. The mode is switched back to
@@ -409,12 +409,12 @@ __tx_irq_processing_return
7.3 FIQ Interrupts
-By default, Cortex-A9 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, Cortex-A9 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -423,7 +423,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.s.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.s:
@@ -451,18 +451,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -478,7 +478,7 @@ __tx_fiq_processing_return
; interrupt, and all C scratch registers are available for use. */
;
; /* Enable nested FIQ interrupts. NOTE: Since this service returns
-; with FIQ interrupts enabled, all FIQ interrupt sources must be
+; with FIQ interrupts enabled, all FIQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
;
@@ -494,28 +494,28 @@ __tx_fiq_processing_return
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.s in the Integrator sub-directories.
9. Thumb/Cortex-A9 Mixed Mode
-By default, ThreadX is setup for running in Cortex-A9 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
-ThreadX file and/or the application in Thumb mode. If any Thumb code
-is used the entire ThreadX source- both C and assembly - should be built
+By default, ThreadX is setup for running in Cortex-A9 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
+ThreadX file and/or the application in Thumb mode. If any Thumb code
+is used the entire ThreadX source- both C and assembly - should be built
with the "-apcs /interwork" option.
10. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a9/ac5/src/tx_thread_context_restore.s b/ports/cortex_a9/ac5/src/tx_thread_context_restore.s
index 49add8f8..147719a2 100644
--- a/ports/cortex_a9/ac5/src/tx_thread_context_restore.s
+++ b/ports/cortex_a9/ac5/src/tx_thread_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -54,44 +54,38 @@ SVC_MODE EQU 0x93 ; SVC mode
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore Cortex-A9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore Cortex-A9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -121,13 +115,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3, #0] ; Store the counter
+ STR r2, [r3, #0] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
diff --git a/ports/cortex_a9/ac5/src/tx_thread_context_save.s b/ports/cortex_a9/ac5/src/tx_thread_context_save.s
index 2ccb6ba9..234277a5 100644
--- a/ports/cortex_a9/ac5/src/tx_thread_context_save.s
+++ b/ports/cortex_a9/ac5/src/tx_thread_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -39,43 +39,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save Cortex-A9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save Cortex-A9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
@@ -90,7 +84,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
IF :DEF:TX_ENABLE_FIQ_SUPPORT
CPSID if ; Disable FIQ interrupts
ENDIF
@@ -108,7 +102,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -124,7 +118,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -138,13 +132,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -164,7 +158,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -174,7 +168,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -189,7 +183,7 @@ __tx_thread_idle_system_save
ENDIF
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports/cortex_a9/ac5/src/tx_thread_fiq_context_restore.s b/ports/cortex_a9/ac5/src/tx_thread_fiq_context_restore.s
index 3069b0de..5f75fa49 100644
--- a/ports/cortex_a9/ac5/src/tx_thread_fiq_context_restore.s
+++ b/ports/cortex_a9/ac5/src/tx_thread_fiq_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -32,7 +32,7 @@
;
SVC_MODE EQU 0xD3 ; SVC mode
FIQ_MODE EQU 0xD1 ; FIQ mode
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
;
@@ -50,44 +50,38 @@ IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_restore Cortex-A9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_restore Cortex-A9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the fiq interrupt context when processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* FIQ ISR Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the fiq interrupt context when processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* FIQ ISR Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_context_restore(VOID)
@@ -113,13 +107,13 @@ _tx_thread_fiq_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -163,7 +157,7 @@ __tx_thread_fiq_no_preempt_restore
; /* Restore interrupted thread or ISR. */
;
; /* Pickup the saved stack pointer. */
-; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
+; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
;
; /* Recover the saved context and return to the point of interrupt. */
;
@@ -208,7 +202,7 @@ _tx_skip_fiq_vfp_save
MOV r3, #1 ; Build interrupt stack type
STMDB sp!, {r3, r4} ; Save interrupt stack type and SPSR
STR sp, [r0, #8] ; Save stack pointer in thread control
- ; block
+ ; block
;
; /* Save the remaining time-slice and disable it. */
; if (_tx_timer_time_slice)
@@ -220,7 +214,7 @@ _tx_skip_fiq_vfp_save
BEQ __tx_thread_fiq_dont_save_ts ; No, don't save it
;
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-; _tx_timer_time_slice = 0;
+; _tx_timer_time_slice = 0;
;
STR r2, [r0, #24] ; Save thread's time-slice
MOV r2, #0 ; Clear value
diff --git a/ports/cortex_a9/ac5/src/tx_thread_fiq_context_save.s b/ports/cortex_a9/ac5/src/tx_thread_fiq_context_save.s
index 7faeb3c8..ce4ac25f 100644
--- a/ports/cortex_a9/ac5/src/tx_thread_fiq_context_save.s
+++ b/ports/cortex_a9/ac5/src/tx_thread_fiq_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -39,43 +39,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_save Cortex-A9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_save Cortex-A9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
; VOID _tx_thread_fiq_context_save(VOID)
@@ -90,7 +84,7 @@ _tx_thread_fiq_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -105,7 +99,7 @@ _tx_thread_fiq_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -121,38 +115,38 @@ _tx_thread_fiq_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
__tx_thread_fiq_not_nested_save
-; }
+; }
;
; /* Otherwise, not nested, check to see if a thread was running. */
; else if (_tx_thread_current_ptr)
-; {
+; {
;
ADD r2, r2, #1 ; Increment the interrupt counter
STR r2, [r3] ; Store it back in the variable
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
-; ; scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
+; ; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, lr} ; Store other registers, Note that we don't
-; ; need to save sl and ip since FIQ has
-; ; copies of these registers. Nested
+; ; need to save sl and ip since FIQ has
+; ; copies of these registers. Nested
; ; interrupt processing does need to save
; ; these registers.
;
; /* Save the current stack pointer in the thread's control block. */
-; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
;
; /* Switch to the system stack. */
-; sp = _tx_thread_system_stack_ptr;
+; sp = _tx_thread_system_stack_ptr;
;
MOV r10, #0 ; Clear stack limit
@@ -165,7 +159,7 @@ __tx_thread_fiq_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
; else
@@ -185,18 +179,18 @@ __tx_thread_fiq_idle_system_save
ENDIF
;
; /* Not much to do here, save the current SPSR and LR for possible
-; use in IRQ interrupted in idle system conditions, and return to
+; use in IRQ interrupted in idle system conditions, and return to
; FIQ interrupt processing. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, lr} ; Store other registers that will get used
-; ; or stripped off the stack in context
-; ; restore
- B __tx_fiq_processing_return ; Continue FIQ processing
+; ; or stripped off the stack in context
+; ; restore
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
-;}
+;}
;
END
diff --git a/ports/cortex_a9/ac5/src/tx_thread_fiq_nesting_end.s b/ports/cortex_a9/ac5/src/tx_thread_fiq_nesting_end.s
index 43ae1483..db3131d3 100644
--- a/ports/cortex_a9/ac5/src/tx_thread_fiq_nesting_end.s
+++ b/ports/cortex_a9/ac5/src/tx_thread_fiq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
FIQ_MODE_BITS EQU 0x11 ; FIQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_end Cortex-A9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_end Cortex-A9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-;/* processing from system mode back to FIQ mode prior to the ISR */
-;/* calling _tx_thread_fiq_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+;/* processing from system mode back to FIQ mode prior to the ISR */
+;/* calling _tx_thread_fiq_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_fiq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #FIQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/cortex_a9/ac5/src/tx_thread_fiq_nesting_start.s b/ports/cortex_a9/ac5/src/tx_thread_fiq_nesting_start.s
index 876f19a5..d5bac9db 100644
--- a/ports/cortex_a9/ac5/src/tx_thread_fiq_nesting_start.s
+++ b/ports/cortex_a9/ac5/src/tx_thread_fiq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_start Cortex-A9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_start Cortex-A9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-;/* processing to the system mode so nested FIQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+;/* processing to the system mode so nested FIQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/cortex_a9/ac5/src/tx_thread_interrupt_control.s b/ports/cortex_a9/ac5/src/tx_thread_interrupt_control.s
index eb141f70..0a4caa71 100644
--- a/ports/cortex_a9/ac5/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_a9/ac5/src/tx_thread_interrupt_control.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,42 +36,36 @@ INT_MASK EQU 0x80 ; Interrupt bit mask
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control Cortex-A9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control Cortex-A9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/cortex_a9/ac5/src/tx_thread_interrupt_disable.s b/ports/cortex_a9/ac5/src/tx_thread_interrupt_disable.s
index f3014ace..b17a2404 100644
--- a/ports/cortex_a9/ac5/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_a9/ac5/src/tx_thread_interrupt_disable.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -29,41 +29,35 @@
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable Cortex-A9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable Cortex-A9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(void)
@@ -80,7 +74,7 @@ _tx_thread_interrupt_disable
IF :DEF:TX_ENABLE_FIQ_SUPPORT
CPSID if ; Disable IRQ and FIQ
ELSE
- CPSID i ; Disable IRQ
+ CPSID i ; Disable IRQ
ENDIF
IF {INTER} = {TRUE}
diff --git a/ports/cortex_a9/ac5/src/tx_thread_interrupt_restore.s b/ports/cortex_a9/ac5/src/tx_thread_interrupt_restore.s
index b00872b3..701a21cd 100644
--- a/ports/cortex_a9/ac5/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_a9/ac5/src/tx_thread_interrupt_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -29,42 +29,36 @@
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore Cortex-A9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore Cortex-A9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function is responsible for restoring interrupts to the state */
;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/cortex_a9/ac5/src/tx_thread_irq_nesting_end.s b/ports/cortex_a9/ac5/src/tx_thread_irq_nesting_end.s
index 4ef900fa..76efaf8a 100644
--- a/ports/cortex_a9/ac5/src/tx_thread_irq_nesting_end.s
+++ b/ports/cortex_a9/ac5/src/tx_thread_irq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end Cortex-A9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end Cortex-A9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_irq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #IRQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/cortex_a9/ac5/src/tx_thread_irq_nesting_start.s b/ports/cortex_a9/ac5/src/tx_thread_irq_nesting_start.s
index 1f9dfc8d..0f2719d8 100644
--- a/ports/cortex_a9/ac5/src/tx_thread_irq_nesting_start.s
+++ b/ports/cortex_a9/ac5/src/tx_thread_irq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start Cortex-A9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start Cortex-A9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/cortex_a9/ac5/src/tx_thread_schedule.s b/ports/cortex_a9/ac5/src/tx_thread_schedule.s
index 664bc10e..c03f7f2b 100644
--- a/ports/cortex_a9/ac5/src/tx_thread_schedule.s
+++ b/ports/cortex_a9/ac5/src/tx_thread_schedule.s
@@ -1,18 +1,19 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -40,45 +41,39 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule Cortex-A9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule Cortex-A9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
@@ -107,7 +102,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -120,7 +115,7 @@ __tx_thread_schedule_loop
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
;
- LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
STR r0, [r1, #0] ; Setup current thread pointer
;
; /* Increment the run count for this thread. */
@@ -134,7 +129,7 @@ __tx_thread_schedule_loop
; /* Setup time-slice, if present. */
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
;
- LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
+ LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
; variable
LDR sp, [r0, #8] ; Switch stack pointers
STR r3, [r2, #0] ; Setup time-slice
@@ -233,3 +228,4 @@ __tx_no_thread_to_disable
END
+
diff --git a/ports/cortex_a9/ac5/src/tx_thread_stack_build.s b/ports/cortex_a9/ac5/src/tx_thread_stack_build.s
index f10d9769..eda5cb08 100644
--- a/ports/cortex_a9/ac5/src/tx_thread_stack_build.s
+++ b/ports/cortex_a9/ac5/src/tx_thread_stack_build.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -41,44 +41,38 @@ THUMB_BIT EQU 0x20 ; Thumb-bit
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build Cortex-A9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build Cortex-A9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function builds a stack frame on the supplied thread's stack. */
;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
;/* thread_ptr Pointer to thread control blk */
;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -86,10 +80,10 @@ THUMB_BIT EQU 0x20 ; Thumb-bit
EXPORT _tx_thread_stack_build
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-A9 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports/cortex_a9/ac5/src/tx_thread_system_return.s b/ports/cortex_a9/ac5/src/tx_thread_system_return.s
index bc6f3087..0dee4ef3 100644
--- a/ports/cortex_a9/ac5/src/tx_thread_system_return.s
+++ b/ports/cortex_a9/ac5/src/tx_thread_system_return.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -33,50 +33,44 @@
IMPORT _tx_timer_time_slice
IMPORT _tx_thread_schedule
IF :DEF:TX_ENABLE_EXECUTION_CHANGE_NOTIFY
- IMPORT _tx_execution_thread_exit
+ IMPORT _tx_execution_thread_exit
ENDIF
;
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return Cortex-A9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return Cortex-A9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
@@ -104,7 +98,7 @@ _tx_skip_solicited_vfp_save
MOV r0, #0 ; Build a solicited stack type
MRS r1, CPSR ; Pickup the CPSR
STMDB sp!, {r0-r1} ; Save type and CPSR
-;
+;
; /* Lockout interrupts. */
;
IF :DEF:TX_ENABLE_FIQ_SUPPORT
diff --git a/ports/cortex_a9/ac5/src/tx_thread_vectored_context_save.s b/ports/cortex_a9/ac5/src/tx_thread_vectored_context_save.s
index e2a5a8c4..eb71247a 100644
--- a/ports/cortex_a9/ac5/src/tx_thread_vectored_context_save.s
+++ b/ports/cortex_a9/ac5/src/tx_thread_vectored_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -38,43 +38,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save Cortex-A9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save Cortex-A9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_vectored_context_save(VOID)
@@ -135,7 +129,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -171,7 +165,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports/cortex_a9/ac5/src/tx_timer_interrupt.s b/ports/cortex_a9/ac5/src/tx_timer_interrupt.s
index 05e9fdda..e88155cc 100644
--- a/ports/cortex_a9/ac5/src/tx_timer_interrupt.s
+++ b/ports/cortex_a9/ac5/src/tx_timer_interrupt.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Timer */
;/** */
@@ -44,46 +44,40 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt Cortex-A9/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt Cortex-A9/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -107,7 +101,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -225,13 +219,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports/cortex_a9/ac6/example_build/sample_threadx/.cproject b/ports/cortex_a9/ac6/example_build/sample_threadx/.cproject
index 72d51c5b..9aa9b1e3 100644
--- a/ports/cortex_a9/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_a9/ac6/example_build/sample_threadx/.cproject
@@ -1,176 +1,176 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a9/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_a9/ac6/example_build/sample_threadx/sample_threadx.scat
index d23881cd..66d0d95a 100644
--- a/ports/cortex_a9/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_a9/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -1,7 +1,7 @@
;*******************************************************
; Copyright (c) 2011-2016 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;*******************************************************
diff --git a/ports/cortex_a9/ac6/example_build/sample_threadx/tx_initialize_low_level.S b/ports/cortex_a9/ac6/example_build/sample_threadx/tx_initialize_low_level.S
index 083a57a7..76395459 100644
--- a/ports/cortex_a9/ac6/example_build/sample_threadx/tx_initialize_low_level.S
+++ b/ports/cortex_a9/ac6/example_build/sample_threadx/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -91,14 +92,6 @@ $_tx_initialize_low_level:
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* */
/**************************************************************************/
.global _tx_initialize_low_level
.type _tx_initialize_low_level,function
diff --git a/ports/cortex_a9/ac6/example_build/tx/.cproject b/ports/cortex_a9/ac6/example_build/tx/.cproject
index 52a6e44b..59f20612 100644
--- a/ports/cortex_a9/ac6/example_build/tx/.cproject
+++ b/ports/cortex_a9/ac6/example_build/tx/.cproject
@@ -1,146 +1,146 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_a9/ac6/inc/tx_port.h b/ports/cortex_a9/ac6/inc/tx_port.h
index d80ddec1..f0153046 100644
--- a/ports/cortex_a9/ac6/inc/tx_port.h
+++ b/ports/cortex_a9/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,20 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -320,7 +307,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv7-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv7-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a9/ac6/readme_threadx.txt b/ports/cortex_a9/ac6/readme_threadx.txt
index f8196fb5..84c154af 100644
--- a/ports/cortex_a9/ac6/readme_threadx.txt
+++ b/ports/cortex_a9/ac6/readme_threadx.txt
@@ -1,18 +1,18 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A9
+ Microsoft's Azure RTOS ThreadX for Cortex-A9
Using ARM Compiler 6 & DS
1. Import the ThreadX Projects
-In order to build the ThreadX library and the ThreadX demonstration, first import
-the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
+In order to build the ThreadX library and the ThreadX demonstration, first import
+the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
into your DS workspace.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply right-click the Eclipse project
-"tx" and then select the "Build Project" button. You should now observe the compilation
+Building the ThreadX library is easy; simply right-click the Eclipse project
+"tx" and then select the "Build Project" button. You should now observe the compilation
and assembly of the ThreadX library. This project build produces the ThreadX
library file tx.a.
@@ -22,44 +22,44 @@ library file tx.a.
The ThreadX demonstration is designed to execute under the DS debugger on the
VE_Cortex-A9 Bare Metal simulator.
-Building the demonstration is easy; simply right-click the Eclipse project
-"sample_threadx" and then select the "Build Project" button. You should now observe
-the compilation and assembly of the ThreadX demonstration. This project build produces
-the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
+Building the demonstration is easy; simply right-click the Eclipse project
+"sample_threadx" and then select the "Build Project" button. You should now observe
+the compilation and assembly of the ThreadX demonstration. This project build produces
+the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
in the Project Explorer window, right-click on the 'cortex-a9_tx.launch' file, click
'Debug As', and then click 'cortex-a9_tx' from the submenu. This will cause the
-debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
+debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
to execute the ThreadX demonstration.
4. System Initialization
-The entry point in ThreadX for the Cortex-A9 using ARM tools is at label
-"Vectors". This is defined within startup.S in the sample_threadx project. In addition,
-this is where all static and global pre-set C variable initialization processing
+The entry point in ThreadX for the Cortex-A9 using ARM tools is at label
+"Vectors". This is defined within startup.S in the sample_threadx project. In addition,
+this is where all static and global pre-set C variable initialization processing
takes place.
-This is also where initialization of a periodic timer interrupt source should take
+This is also where initialization of a periodic timer interrupt source should take
place.
-In addition, _tx_initialize_low_level defines the first available address
-for use by the application, which is supplied as the sole input parameter
+In addition, _tx_initialize_low_level defines the first available address
+for use by the application, which is supplied as the sole input parameter
to your application definition function, tx_application_define.
5. Register Usage and Stack Frames
-The AC6 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The AC6 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -77,52 +77,52 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A9
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A9 vectors start at address zero. The demonstration system startup
-reset.S file contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+reset.S file contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
-ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
+ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
nested IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.S:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -130,7 +130,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -143,7 +143,7 @@ __tx_irq_processing_return:
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.S:
.global __tx_irq_example_handler
@@ -153,12 +153,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} @ Save some scratch registers
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
BL _tx_thread_vectored_context_save @ Call the vectored IRQ context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -175,22 +175,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -198,10 +198,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* Enable nested IRQ interrupts. NOTE: Since this service returns
-@ with IRQ interrupts enabled, all IRQ interrupt sources must be
+@ with IRQ interrupts enabled, all IRQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-@
+@
@ /* Application ISR call(s) go here! */
@
@ /* Disable nested IRQ interrupts. The mode is switched back to
@@ -214,12 +214,12 @@ __tx_irq_processing_return:
7.3 FIQ Interrupts
-By default, FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.S.
@@ -228,7 +228,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.S.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.S:
@@ -256,18 +256,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.S. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -283,7 +283,7 @@ __tx_fiq_processing_return:
@ interrupt, and all C scratch registers are available for use. */
@
@ /* Enable nested FIQ interrupts. NOTE: Since this service returns
-@ with FIQ interrupts enabled, all FIQ interrupt sources must be
+@ with FIQ interrupts enabled, all FIQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@
@@ -299,12 +299,12 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
-interrupt source, these services are not functional but the remainder of
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
+interrupt source, these services are not functional but the remainder of
ThreadX will still run.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.S for the demonstration system.
@@ -312,7 +312,7 @@ found in the file tx_initialize_low_level.S for the demonstration system.
9. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a9/ac6/src/tx_thread_context_restore.S b/ports/cortex_a9/ac6/src/tx_thread_context_restore.S
index 6b4a561d..41b0b0d0 100644
--- a/ports/cortex_a9/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_a9/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,23 +80,6 @@ IRQ_MODE = 0x12 // IRQ mode
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_restore
.type _tx_thread_context_restore,function
diff --git a/ports/cortex_a9/ac6/src/tx_thread_context_save.S b/ports/cortex_a9/ac6/src/tx_thread_context_save.S
index eff06283..d2d29d34 100644
--- a/ports/cortex_a9/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_a9/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,23 +72,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_save
.type _tx_thread_context_save,function
diff --git a/ports/cortex_a9/ac6/src/tx_thread_fiq_context_restore.S b/ports/cortex_a9/ac6/src/tx_thread_fiq_context_restore.S
index d2fbebe1..921c322c 100644
--- a/ports/cortex_a9/ac6/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_a9/ac6/src/tx_thread_fiq_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,20 +79,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* FIQ ISR Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_restore
.type _tx_thread_fiq_context_restore,function
diff --git a/ports/cortex_a9/ac6/src/tx_thread_fiq_context_save.S b/ports/cortex_a9/ac6/src/tx_thread_fiq_context_save.S
index 88472a3d..2f1a6c40 100644
--- a/ports/cortex_a9/ac6/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_a9/ac6/src/tx_thread_fiq_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_save
.type _tx_thread_fiq_context_save,function
diff --git a/ports/cortex_a9/ac6/src/tx_thread_fiq_nesting_end.S b/ports/cortex_a9/ac6/src/tx_thread_fiq_nesting_end.S
index fa3886b8..a7ce701e 100644
--- a/ports/cortex_a9/ac6/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_a9/ac6/src/tx_thread_fiq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ FIQ_MODE_BITS = 0x11 // FIQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/ac6/src/tx_thread_fiq_nesting_start.S b/ports/cortex_a9/ac6/src/tx_thread_fiq_nesting_start.S
index dbed1cf2..4f095dde 100644
--- a/ports/cortex_a9/ac6/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_a9/ac6/src/tx_thread_fiq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_a9/ac6/src/tx_thread_interrupt_control.S
index d1223cb8..a5bc47f7 100644
--- a/ports/cortex_a9/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a9/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,20 +69,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_a9/ac6/src/tx_thread_interrupt_disable.S
index a87d1a06..d7b53bc2 100644
--- a/ports/cortex_a9/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a9/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,20 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_a9/ac6/src/tx_thread_interrupt_restore.S
index 53ff2813..3c31e94b 100644
--- a/ports/cortex_a9/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a9/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,20 +68,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/ac6/src/tx_thread_irq_nesting_end.S b/ports/cortex_a9/ac6/src/tx_thread_irq_nesting_end.S
index 18aebc7c..cc4db3a7 100644
--- a/ports/cortex_a9/ac6/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_a9/ac6/src/tx_thread_irq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/ac6/src/tx_thread_irq_nesting_start.S b/ports/cortex_a9/ac6/src/tx_thread_irq_nesting_start.S
index a2ffd35d..3635874d 100644
--- a/ports/cortex_a9/ac6/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_a9/ac6/src/tx_thread_irq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/ac6/src/tx_thread_schedule.S b/ports/cortex_a9/ac6/src/tx_thread_schedule.S
index 07dd6f7f..a74e2050 100644
--- a/ports/cortex_a9/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_a9/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,6 +40,14 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode
+#ifdef TX_ENABLE_VFP_SUPPORT
+#define IRQ_MASK 0x80
+#endif
+
+#ifdef TX_ENABLE_FIQ_SUPPORT
+#define FIQ_MASK 0x40
+#endif
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
@@ -73,23 +82,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
@@ -259,3 +251,4 @@ no_fiq:
BX lr
#endif
+
diff --git a/ports/cortex_a9/ac6/src/tx_thread_stack_build.S b/ports/cortex_a9/ac6/src/tx_thread_stack_build.S
index 3876225a..827554a7 100644
--- a/ports/cortex_a9/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_a9/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,20 +75,6 @@ CPSR_MASK = 0xBF // Mask initial CPSR, T, IRQ int
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/ac6/src/tx_thread_system_return.S b/ports/cortex_a9/ac6/src/tx_thread_system_return.S
index 0eed478d..1a17446b 100644
--- a/ports/cortex_a9/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_a9/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,23 +69,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/ac6/src/tx_thread_vectored_context_save.S b/ports/cortex_a9/ac6/src/tx_thread_vectored_context_save.S
index fe8a98e8..91653b75 100644
--- a/ports/cortex_a9/ac6/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_a9/ac6/src/tx_thread_vectored_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_vectored_context_save
.type _tx_thread_vectored_context_save,function
diff --git a/ports/cortex_a9/ac6/src/tx_timer_interrupt.S b/ports/cortex_a9/ac6/src/tx_timer_interrupt.S
index cb0c1fa2..179ac894 100644
--- a/ports/cortex_a9/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_a9/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,20 +78,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/ghs/example_build/tx_initialize_low_level.arm b/ports/cortex_a9/ghs/example_build/tx_initialize_low_level.arm
index c0fe4cce..b19d5e00 100644
--- a/ports/cortex_a9/ghs/example_build/tx_initialize_low_level.arm
+++ b/ports/cortex_a9/ghs/example_build/tx_initialize_low_level.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/ghs/inc/tx_el.h b/ports/cortex_a9/ghs/inc/tx_el.h
index b8926921..72e5bbe3 100644
--- a/ports/cortex_a9/ghs/inc/tx_el.h
+++ b/ports/cortex_a9/ghs/inc/tx_el.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,12 +37,6 @@
/* EventAnalyzer. It is assumed that tx_api.h and tx_port.h have */
/* already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_EL_H
diff --git a/ports/cortex_a9/ghs/inc/tx_port.h b/ports/cortex_a9/ghs/inc/tx_port.h
index ece52496..75e76900 100644
--- a/ports/cortex_a9/ghs/inc/tx_port.h
+++ b/ports/cortex_a9/ghs/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -394,7 +386,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-A9/Green Hills Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-A9/Green Hills Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a9/ghs/readme_threadx.txt b/ports/cortex_a9/ghs/readme_threadx.txt
index db232e1f..b32d1003 100644
--- a/ports/cortex_a9/ghs/readme_threadx.txt
+++ b/ports/cortex_a9/ghs/readme_threadx.txt
@@ -1,19 +1,19 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A9
+ Microsoft's Azure RTOS ThreadX for Cortex-A9
Using the Green Hills Software Tools
1. Open the ThreadX Project Workspace
-In order to build the ThreadX library and the ThreadX demonstration first load
-the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
-"example_build" directory.
+In order to build the ThreadX library and the ThreadX demonstration first load
+the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
+"example_build" directory.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply select the MULTI project file
-tx.gpj and then select the build button. You should now observe the
-compilation and assembly of the ThreadX library. This project build produces
+Building the ThreadX library is easy; simply select the MULTI project file
+tx.gpj and then select the build button. You should now observe the
+compilation and assembly of the ThreadX library. This project build produces
the ThreadX library file tx.a.
@@ -21,55 +21,55 @@ the ThreadX library file tx.a.
The ThreadX demonstration is designed to execute under the MULTI environment
on the Green Hills Cortex-A9 simulator. The instructions that follow describe
-how to get the ThreadX evaluation running under the MULTI Cortex-A9 simulation
+how to get the ThreadX evaluation running under the MULTI Cortex-A9 simulation
environment.
-Building the demonstration is easy; simply select the MULTI project file
-sample_threadx.gpj. At this point, select the "Project Build" button and observe
-the compilation, assembly, and linkage of the ThreadX demonstration application.
+Building the demonstration is easy; simply select the MULTI project file
+sample_threadx.gpj. At this point, select the "Project Build" button and observe
+the compilation, assembly, and linkage of the ThreadX demonstration application.
-After the demonstration is built, invoke the MULTI ARM simulator by selecting
-the simulator connection from within the sample_threadx.con connection file.
-Once connected to the simulator, select the "Debug" button. You should now
-observe the main function of sample_threadx.c.
+After the demonstration is built, invoke the MULTI ARM simulator by selecting
+the simulator connection from within the sample_threadx.con connection file.
+Once connected to the simulator, select the "Debug" button. You should now
+observe the main function of sample_threadx.c.
At this point, you should setup a simulated timer interrupt for ThreadX
by entering "timer 9999 irq" in the "target" window of the debugger.
-You are now ready to execute the ThreadX demonstration system. Select
-breakpoints and data watches to observe the execution of the sample_threadx.c
+You are now ready to execute the ThreadX demonstration system. Select
+breakpoints and data watches to observe the execution of the sample_threadx.c
application.
4. EventAnalyzer Demonstration
-To build a demonstration system that also logs events for the MULTI EventAnalyzer,
-perform the same steps as the regular demo, except build the ThreadX library with
-txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
-The resulting image will log all system events, which can then be displayed by the
+To build a demonstration system that also logs events for the MULTI EventAnalyzer,
+perform the same steps as the regular demo, except build the ThreadX library with
+txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
+The resulting image will log all system events, which can then be displayed by the
MULTI EventAnalyzer.
5. System Initialization
-The system entry point using the Green Hills tools is at the label _start.
-This is defined within the crt0.arm file supplied by Green Hills. In addition,
-this is where all static and global preset C variable initialization
+The system entry point using the Green Hills tools is at the label _start.
+This is defined within the crt0.arm file supplied by Green Hills. In addition,
+this is where all static and global preset C variable initialization
processing is called from.
After the Green Hills startup function returns, ThreadX initialization is
called. The main initialization function is _tx_initialize_low_level and
-is located in the file tx_initialize_low_level.arm. This function is responsible
-for setting up various system data structures, interrupt vectors, and the
+is located in the file tx_initialize_low_level.arm. This function is responsible
+for setting up various system data structures, interrupt vectors, and the
periodic timer interrupt source of ThreadX.
-In addition, _tx_initialize_low_level determines where the first available
+In addition, _tx_initialize_low_level determines where the first available
RAM memory address is located. This address is supplied to tx_application_define.
-By default, the first available RAM memory address is assumed to start at the
-beginning of the ThreadX section .free_mem. If changes are made to the
-sample_threadx.ld file, the .free_mem section should remain the last allocated
-section in the main RAM area. The starting address of this section is passed
+By default, the first available RAM memory address is assumed to start at the
+beginning of the ThreadX section .free_mem. If changes are made to the
+sample_threadx.ld file, the .free_mem section should remain the last allocated
+section in the main RAM area. The starting address of this section is passed
to tx_application_define.
@@ -87,27 +87,27 @@ The following defines and their associated action are as follows:
TX_ENABLE_FIQ_NESTING If defined, this brings in special FIQ
interrupt nesting logic into the ThreadX
library. This define should be applied
- to the entire ThreadX library and the
+ to the entire ThreadX library and the
define TX_ENABLE_FIQ_SUPPORT should also
be defined.
TX_ENABLE_FIQ_SUPPORT If defined, this brings in FIQ context
save and restore logic necessary for
applications to call ThreadX services from
- FIQ interrupt handlers. This define
- should be applied to the entire ThreadX
+ FIQ interrupt handlers. This define
+ should be applied to the entire ThreadX
library.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 4 in the "ThreadX User Guide"
+ Chapter 4 in the "ThreadX User Guide"
for more details.
TX_ENABLE_EVENT_LOGGING This define enables event logging for any
or all of the ThreadX source code. If this
- option is used anywhere, the tx_initialize_high_level.c
+ option is used anywhere, the tx_initialize_high_level.c
file must be compiled with it as well, since this
is where the event log is initialized.
@@ -119,121 +119,121 @@ The following defines and their associated action are as follows:
If this is enabled, run-time filtering logic
is added to the event logging code.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
7. Register Usage and Stack Frames
-The Green Hills compiler assumes that registers r0-r3 (a1-a4) and r12 (ip)
-are scratch registers for each function. All other registers used by a C
-function must be preserved by the function. ThreadX takes advantage of this
-in situations where a context switch happens as a result of making a ThreadX
-service call (which is itself a C function). In such cases, the saved
+The Green Hills compiler assumes that registers r0-r3 (a1-a4) and r12 (ip)
+are scratch registers for each function. All other registers used by a C
+function must be preserved by the function. ThreadX takes advantage of this
+in situations where a context switch happens as a result of making a ThreadX
+service call (which is itself a C function). In such cases, the saved
context of a thread is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -251,40 +251,40 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
8. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make ThreadX run faster, you can change the tx.gpj project
-to disable debug information and enable the desired optimizations.
+to disable debug information and enable the desired optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined before tx_api.h is included.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined before tx_api.h is included.
9. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A9
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
9.1 Vector Area
The Cortex-A9 vectors start at address zero. The demonstration system reset.arm
-file contains the reset section (which contains all the ARM vectors) and is
+file contains the reset section (which contains all the ARM vectors) and is
typically loaded at address zero. On actual hardware platforms, this section
-might have to be copied to address 0.
+might have to be copied to address 0.
9.2 IRQ ISRs
@@ -294,13 +294,13 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
9.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.arm:
.globl __tx_irq_handler
- .globl __tx_irq_processing_return
+ .globl __tx_irq_processing_return
__tx_irq_handler:
/* Jump to context save to save system context. */
@@ -308,7 +308,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
/* At this point execution is still in the IRQ mode. The CPSR, point of
- interrupt, and all C scratch registers are available for use. Note
+ interrupt, and all C scratch registers are available for use. Note
that IRQ interrupts are still disabled upon return from the context
save function. */
@@ -321,7 +321,7 @@ __tx_irq_processing_return:
9.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.arm:
.globl __tx_irq_example_handler
@@ -331,12 +331,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} # Save some scratch registers
MRS r0, SPSR # Pickup saved SPSR
- SUB lr, lr, #4 # Adjust point of interrupt
+ SUB lr, lr, #4 # Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} # Store other scratch registers
BL _tx_thread_vectored_context_save # Call the vectored IRQ context save
/* At this point execution is still in the IRQ mode. The CPSR, point of
- interrupt, and all C scratch registers are available for use. Note
+ interrupt, and all C scratch registers are available for use. Note
that IRQ interrupts are still disabled upon return from the context
save function. */
@@ -353,22 +353,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.arm. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables nesting
-by disabling IRQ interrupts and switching back to IRQ mode in preparation for
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.arm. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables nesting
+by disabling IRQ interrupts and switching back to IRQ mode in preparation for
the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in the
+The following is an example of enabling IRQ nested interrupts in the
typical IRQ handler:
.globl __tx_irq_handler
- .globl __tx_irq_processing_return
+ .globl __tx_irq_processing_return
__tx_irq_handler:
/* Jump to context save to save system context. */
@@ -376,10 +376,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
/* Enable nested IRQ interrupts. NOTE: Since this service returns
- with IRQ interrupts enabled, all IRQ interrupt sources must be
+ with IRQ interrupts enabled, all IRQ interrupt sources must be
cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-
+
/* Application ISR call(s) go here! */
/* Disable nested IRQ interrupts. The mode is switched back to
@@ -392,9 +392,9 @@ __tx_irq_processing_return:
9.3 FIQ Interrupts
-By default, Cortex-A9 FIQ interrupts are left completely enabled by ThreadX.
-Of course, this means that the application is fully responsible for
-saving/restoring any registers used in the FIQ ISR processing. In addition,
+By default, Cortex-A9 FIQ interrupts are left completely enabled by ThreadX.
+Of course, this means that the application is fully responsible for
+saving/restoring any registers used in the FIQ ISR processing. In addition,
no ThreadX service calls are allowed from the default FIQ ISRs. The default
FIQ interrupt shell is located in tx_initialize_low_level.arm.
@@ -403,7 +403,7 @@ FIQ interrupt shell is located in tx_initialize_low_level.arm.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.arm:
@@ -431,18 +431,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.arm. When nested FIQ interrupts are no longer
-required, calling the _tx_thread_fiq_nesting_end service disables nesting by
-disabling FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.arm. When nested FIQ interrupts are no longer
+required, calling the _tx_thread_fiq_nesting_end service disables nesting by
+disabling FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -458,7 +458,7 @@ __tx_fiq_processing_return:
interrupt, and all C scratch registers are available for use. */
/* Enable nested FIQ interrupts. NOTE: Since this service returns
- with FIQ interrupts enabled, all FIQ interrupt sources must be
+ with FIQ interrupts enabled, all FIQ interrupt sources must be
cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@@ -475,29 +475,29 @@ __tx_fiq_processing_return:
10. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.arm.
11. Thumb/Cortex-A9 Mixed Mode
-By default, ThreadX is setup for running in Cortex-A9 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
+By default, ThreadX is setup for running in Cortex-A9 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
ThreadX file and/or the application in Thumb mode. The only exception
-to this is the file tx_thread_shell_entry.c. This file must always be
+to this is the file tx_thread_shell_entry.c. This file must always be
built in 32-bit mode.
12. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
@@ -520,7 +520,7 @@ information associated with this specific port of ThreadX:
04-02-2021 Release 6.1.6 changes:
tx_port.h Updated macro definition
-05/19/2020 Initial ThreadX version of Cortex-A9/Green Hills port.
+05/19/2020 Initial ThreadX version of Cortex-A9/Green Hills port.
Copyright(c) 1996-2020 Microsoft Corporation
diff --git a/ports/cortex_a9/ghs/src/tx_el.c b/ports/cortex_a9/ghs/src/tx_el.c
index 365622cd..b5d3b8b7 100644
--- a/ports/cortex_a9/ghs/src/tx_el.c
+++ b/ports/cortex_a9/ghs/src/tx_el.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -82,12 +83,6 @@ UINT _tx_thread_interrupt_control(UINT new_posture);
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_el_initialize(VOID)
{
diff --git a/ports/cortex_a9/ghs/src/tx_thread_context_restore.arm b/ports/cortex_a9/ghs/src/tx_thread_context_restore.arm
index d28b0066..5366e496 100644
--- a/ports/cortex_a9/ghs/src/tx_thread_context_restore.arm
+++ b/ports/cortex_a9/ghs/src/tx_thread_context_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/ghs/src/tx_thread_context_save.arm b/ports/cortex_a9/ghs/src/tx_thread_context_save.arm
index 5930e4ce..304acf64 100644
--- a/ports/cortex_a9/ghs/src/tx_thread_context_save.arm
+++ b/ports/cortex_a9/ghs/src/tx_thread_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/ghs/src/tx_thread_fiq_context_restore.arm b/ports/cortex_a9/ghs/src/tx_thread_fiq_context_restore.arm
index a2abbcde..14cb3624 100644
--- a/ports/cortex_a9/ghs/src/tx_thread_fiq_context_restore.arm
+++ b/ports/cortex_a9/ghs/src/tx_thread_fiq_context_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/ghs/src/tx_thread_fiq_context_save.arm b/ports/cortex_a9/ghs/src/tx_thread_fiq_context_save.arm
index c305529e..75298816 100644
--- a/ports/cortex_a9/ghs/src/tx_thread_fiq_context_save.arm
+++ b/ports/cortex_a9/ghs/src/tx_thread_fiq_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/ghs/src/tx_thread_fiq_nesting_end.arm b/ports/cortex_a9/ghs/src/tx_thread_fiq_nesting_end.arm
index c7b1e54a..c4f8b98c 100644
--- a/ports/cortex_a9/ghs/src/tx_thread_fiq_nesting_end.arm
+++ b/ports/cortex_a9/ghs/src/tx_thread_fiq_nesting_end.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/ghs/src/tx_thread_fiq_nesting_start.arm b/ports/cortex_a9/ghs/src/tx_thread_fiq_nesting_start.arm
index 26641c10..195899b4 100644
--- a/ports/cortex_a9/ghs/src/tx_thread_fiq_nesting_start.arm
+++ b/ports/cortex_a9/ghs/src/tx_thread_fiq_nesting_start.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/ghs/src/tx_thread_interrupt_control.arm b/ports/cortex_a9/ghs/src/tx_thread_interrupt_control.arm
index b517aa84..a3a629ef 100644
--- a/ports/cortex_a9/ghs/src/tx_thread_interrupt_control.arm
+++ b/ports/cortex_a9/ghs/src/tx_thread_interrupt_control.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/ghs/src/tx_thread_interrupt_disable.arm b/ports/cortex_a9/ghs/src/tx_thread_interrupt_disable.arm
index 863408dd..2016da56 100644
--- a/ports/cortex_a9/ghs/src/tx_thread_interrupt_disable.arm
+++ b/ports/cortex_a9/ghs/src/tx_thread_interrupt_disable.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/ghs/src/tx_thread_interrupt_restore.arm b/ports/cortex_a9/ghs/src/tx_thread_interrupt_restore.arm
index 89b7868d..3dd8866f 100644
--- a/ports/cortex_a9/ghs/src/tx_thread_interrupt_restore.arm
+++ b/ports/cortex_a9/ghs/src/tx_thread_interrupt_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/ghs/src/tx_thread_irq_nesting_end.arm b/ports/cortex_a9/ghs/src/tx_thread_irq_nesting_end.arm
index 0ffd056e..17e98e41 100644
--- a/ports/cortex_a9/ghs/src/tx_thread_irq_nesting_end.arm
+++ b/ports/cortex_a9/ghs/src/tx_thread_irq_nesting_end.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/ghs/src/tx_thread_irq_nesting_start.arm b/ports/cortex_a9/ghs/src/tx_thread_irq_nesting_start.arm
index b287af00..570ffd77 100644
--- a/ports/cortex_a9/ghs/src/tx_thread_irq_nesting_start.arm
+++ b/ports/cortex_a9/ghs/src/tx_thread_irq_nesting_start.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/ghs/src/tx_thread_schedule.arm b/ports/cortex_a9/ghs/src/tx_thread_schedule.arm
index 4ff185d6..3ab6fee4 100644
--- a/ports/cortex_a9/ghs/src/tx_thread_schedule.arm
+++ b/ports/cortex_a9/ghs/src/tx_thread_schedule.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/ghs/src/tx_thread_stack_build.arm b/ports/cortex_a9/ghs/src/tx_thread_stack_build.arm
index a445c985..93739563 100644
--- a/ports/cortex_a9/ghs/src/tx_thread_stack_build.arm
+++ b/ports/cortex_a9/ghs/src/tx_thread_stack_build.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/ghs/src/tx_thread_system_return.arm b/ports/cortex_a9/ghs/src/tx_thread_system_return.arm
index 10d5413e..84240480 100644
--- a/ports/cortex_a9/ghs/src/tx_thread_system_return.arm
+++ b/ports/cortex_a9/ghs/src/tx_thread_system_return.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/ghs/src/tx_thread_vectored_context_save.arm b/ports/cortex_a9/ghs/src/tx_thread_vectored_context_save.arm
index c21bb410..d8d3a946 100644
--- a/ports/cortex_a9/ghs/src/tx_thread_vectored_context_save.arm
+++ b/ports/cortex_a9/ghs/src/tx_thread_vectored_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/ghs/src/tx_timer_interrupt.arm b/ports/cortex_a9/ghs/src/tx_timer_interrupt.arm
index ee5b1680..38f9906a 100644
--- a/ports/cortex_a9/ghs/src/tx_timer_interrupt.arm
+++ b/ports/cortex_a9/ghs/src/tx_timer_interrupt.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/gnu/example_build/MP_GIC.S b/ports/cortex_a9/gnu/example_build/MP_GIC.S
index d23bca23..f769bf9f 100644
--- a/ports/cortex_a9/gnu/example_build/MP_GIC.S
+++ b/ports/cortex_a9/gnu/example_build/MP_GIC.S
@@ -3,7 +3,7 @@
//
// Copyright (c) 2011-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
diff --git a/ports/cortex_a9/gnu/example_build/MP_GIC.h b/ports/cortex_a9/gnu/example_build/MP_GIC.h
index 1d047611..42a96c3d 100644
--- a/ports/cortex_a9/gnu/example_build/MP_GIC.h
+++ b/ports/cortex_a9/gnu/example_build/MP_GIC.h
@@ -4,7 +4,7 @@
//
// Copyright (c) 2011-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
diff --git a/ports/cortex_a9/gnu/example_build/MP_PrivateTimer.S b/ports/cortex_a9/gnu/example_build/MP_PrivateTimer.S
index a01fd0cc..bb29b8ff 100644
--- a/ports/cortex_a9/gnu/example_build/MP_PrivateTimer.S
+++ b/ports/cortex_a9/gnu/example_build/MP_PrivateTimer.S
@@ -93,7 +93,7 @@ get_private_timer_count:
LDR r0, [r0, #0x604] // Read count register
BX lr
-
+
// ------------------------------------------------------------
// void clear_private_timer_irq(void)
diff --git a/ports/cortex_a9/gnu/example_build/reset.S b/ports/cortex_a9/gnu/example_build/reset.S
index 3ce9efb7..f2e0522b 100644
--- a/ports/cortex_a9/gnu/example_build/reset.S
+++ b/ports/cortex_a9/gnu/example_build/reset.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_a9/gnu/example_build/sample_threadx.ld b/ports/cortex_a9/gnu/example_build/sample_threadx.ld
index cb42c11c..d43e28f1 100644
--- a/ports/cortex_a9/gnu/example_build/sample_threadx.ld
+++ b/ports/cortex_a9/gnu/example_build/sample_threadx.ld
@@ -7,7 +7,7 @@ OUTPUT_ARCH(arm)
SECTIONS
{
. = 0x00000000;
-
+
.vectors : {reset.o(.text) }
/* Read-only sections, merged into text segment: */
@@ -94,8 +94,8 @@ SECTIONS
*(.gnu.linkonce.t*)
*(.glue_7t) *(.glue_7)
} =0
- .init :
- {
+ .init :
+ {
KEEP (*(.init))
} =0
_etext = .;
@@ -120,7 +120,7 @@ SECTIONS
.data1 : { *(.data1) }
.eh_frame : { KEEP (*(.eh_frame)) }
.gcc_except_table : { *(.gcc_except_table) }
- .ctors :
+ .ctors :
{
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
@@ -153,9 +153,9 @@ SECTIONS
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata :
+ .sdata :
{
- *(.sdata)
+ *(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
}
@@ -191,7 +191,7 @@ SECTIONS
_stack_bottom = ABSOLUTE(.) ;
- /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
+ /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
SYS stack if nested interrupts are enabled. */
. = ALIGN(8) ;
. += 4096 ;
diff --git a/ports/cortex_a9/gnu/example_build/tx_initialize_low_level.S b/ports/cortex_a9/gnu/example_build/tx_initialize_low_level.S
index 7e218299..bf082474 100644
--- a/ports/cortex_a9/gnu/example_build/tx_initialize_low_level.S
+++ b/ports/cortex_a9/gnu/example_build/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -100,17 +101,6 @@ $_tx_initialize_low_level:
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_initialize_low_level
.type _tx_initialize_low_level,function
@@ -183,7 +173,7 @@ _stack_error_loop:
MOV r0, #0x1F
BL setPriorityMask // Set priority mask (local)
- // [EL] Change start - don't enable interrupts here!
+ // [EL] Change start - don't enable interrupts here!
//CPSIE i // Clear CPSR I bit
// [EL] Change end
@@ -202,7 +192,7 @@ _stack_error_loop:
MOV r1, #0x0
BL init_private_timer
BL start_private_timer
-
+
//
// Enable receipt of SGI 0
// ------------------------
@@ -257,7 +247,7 @@ __tx_irq_processing_return:
if nested IRQ interrupts are desired. Interrupts may be re-enabled over
small code sequences where lr is saved before enabling interrupts and
restored after interrupts are again disabled. */
-
+
PUSH {r4, r5} // Save some preserved registers (r5 is saved just for 8-byte alignment)
BL readIntAck
MOV r4, r0
diff --git a/ports/cortex_a9/gnu/example_build/v7.h b/ports/cortex_a9/gnu/example_build/v7.h
index 5a08b43f..1133b0ac 100644
--- a/ports/cortex_a9/gnu/example_build/v7.h
+++ b/ports/cortex_a9/gnu/example_build/v7.h
@@ -4,7 +4,7 @@
//
// Copyright (c) 2011-2016 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
@@ -37,7 +37,6 @@ void disableInterrupts(void);
void invalidateCaches_IS(void);
void cleanInvalidateDCache(void);
-void invalidateCaches_IS(void);
void enableCaches(void);
void disableCaches(void);
void invalidateCaches(void);
diff --git a/ports/cortex_a9/gnu/example_build/v7.s b/ports/cortex_a9/gnu/example_build/v7.s
index 82c9ab1e..9487ddde 100644
--- a/ports/cortex_a9/gnu/example_build/v7.s
+++ b/ports/cortex_a9/gnu/example_build/v7.s
@@ -3,7 +3,7 @@
//
// Copyright (c) 2011-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
// ------------------------------------------------------------
@@ -20,7 +20,7 @@
enableInterrupts:
CPSIE i
BX lr
-
+
.global disableInterrupts
.type disableInterrupts,function
@@ -28,7 +28,7 @@ enableInterrupts:
disableInterrupts:
CPSID i
BX lr
-
+
// ------------------------------------------------------------
// Cache Maintenance
@@ -44,7 +44,7 @@ enableCaches:
MCR p15, 0, r0, c1, c0, 0 // Write System Control Register
ISB
BX lr
-
+
.global disableCaches
@@ -57,7 +57,7 @@ disableCaches:
MCR p15, 0, r0, c1, c0, 0 // Write System Control Register
ISB
BX lr
-
+
.global cleanDCache
@@ -114,7 +114,7 @@ clean_dcache_finished:
POP {r4-r12}
BX lr
-
+
.global cleanInvalidateDCache
.type cleanInvalidateDCache,function
@@ -170,7 +170,7 @@ clean_invalidate_dcache_finished:
POP {r4-r12}
BX lr
-
+
.global invalidateCaches
@@ -229,7 +229,7 @@ invalidate_caches_skip:
invalidate_caches_finished:
POP {r4-r12}
BX lr
-
+
.global invalidateCaches_IS
@@ -284,7 +284,7 @@ invalidate_caches_is_skip:
invalidate_caches_is_finished:
POP {r4-r12}
BX lr
-
+
// ------------------------------------------------------------
// TLB
@@ -297,7 +297,7 @@ invalidateUnifiedTLB:
MOV r0, #0
MCR p15, 0, r0, c8, c7, 0 // TLBIALL - Invalidate entire unified TLB
BX lr
-
+
.global invalidateUnifiedTLB_IS
.type invalidateUnifiedTLB_IS,function
@@ -306,7 +306,7 @@ invalidateUnifiedTLB_IS:
MOV r0, #1
MCR p15, 0, r0, c8, c3, 0 // TLBIALLIS - Invalidate entire unified TLB Inner Shareable
BX lr
-
+
// ------------------------------------------------------------
// Branch Prediction
@@ -319,7 +319,7 @@ flushBranchTargetCache:
MOV r0, #0
MCR p15, 0, r0, c7, c5, 6 // BPIALL - Invalidate entire branch predictor array
BX lr
-
+
.global flushBranchTargetCache_IS
.type flushBranchTargetCache_IS,function
@@ -328,7 +328,7 @@ flushBranchTargetCache_IS:
MOV r0, #0
MCR p15, 0, r0, c7, c1, 6 // BPIALLIS - Invalidate entire branch predictor array Inner Shareable
BX lr
-
+
// ------------------------------------------------------------
// High Vecs
@@ -343,7 +343,7 @@ enableHighVecs:
MCR p15, 0, r0, c1, c0, 0 // Write Control Register
ISB
BX lr
-
+
.global disableHighVecs
.type disableHighVecs,function
@@ -354,7 +354,7 @@ disableHighVecs:
MCR p15, 0, r0, c1, c0, 0 // Write Control Register
ISB
BX lr
-
+
// ------------------------------------------------------------
// Context ID
@@ -366,7 +366,7 @@ disableHighVecs:
getContextID:
MRC p15, 0, r0, c13, c0, 1 // Read Context ID Register
BX lr
-
+
.global setContextID
.type setContextID,function
@@ -374,7 +374,7 @@ getContextID:
setContextID:
MCR p15, 0, r0, c13, c0, 1 // Write Context ID Register
BX lr
-
+
// ------------------------------------------------------------
// ID registers
@@ -386,7 +386,7 @@ setContextID:
getMIDR:
MRC p15, 0, r0, c0, c0, 0 // Read Main ID Register (MIDR)
BX lr
-
+
.global getMPIDR
.type getMPIDR,function
@@ -394,7 +394,7 @@ getMIDR:
getMPIDR:
MRC p15, 0, r0, c0 ,c0, 5// Read Multiprocessor ID register (MPIDR)
BX lr
-
+
// ------------------------------------------------------------
// CP15 SMP related
@@ -407,7 +407,7 @@ getMPIDR:
getBaseAddr:
MRC p15, 4, r0, c15, c0, 0 // Read peripheral base address
BX lr
-
+
// ------------------------------------------------------------
@@ -419,7 +419,7 @@ getCPUID:
MRC p15, 0, r0, c0, c0, 5 // Read CPU ID register
AND r0, r0, #0x03 // Mask off, leaving the CPU ID field
BX lr
-
+
// ------------------------------------------------------------
@@ -431,7 +431,7 @@ goToSleep:
WFI // Go into standby
B goToSleep // Catch in case of rogue events
BX lr
-
+
// ------------------------------------------------------------
@@ -451,7 +451,7 @@ joinSMP:
ISB
BX lr
-
+
// ------------------------------------------------------------
@@ -469,7 +469,7 @@ leaveSMP:
ISB
BX lr
-
+
// ------------------------------------------------------------
// End of v7.s
diff --git a/ports/cortex_a9/gnu/inc/tx_port.h b/ports/cortex_a9/gnu/inc/tx_port.h
index d80ddec1..f0153046 100644
--- a/ports/cortex_a9/gnu/inc/tx_port.h
+++ b/ports/cortex_a9/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,20 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -320,7 +307,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX ARMv7-A Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX ARMv7-A Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_a9/gnu/readme_threadx.txt b/ports/cortex_a9/gnu/readme_threadx.txt
index d4d7627a..eb183c37 100644
--- a/ports/cortex_a9/gnu/readme_threadx.txt
+++ b/ports/cortex_a9/gnu/readme_threadx.txt
@@ -1,55 +1,55 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A9
+ Microsoft's Azure RTOS ThreadX for Cortex-A9
Using the GNU Tools
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the GNU
-development environment.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the GNU
+development environment.
-At this point you may run the build_threadx.bat batch file. This will build the
-ThreadX run-time environment in the "example_build" directory.
+At this point you may run the build_threadx.bat batch file. This will build the
+ThreadX run-time environment in the "example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
2. Demonstration System
-Building the demonstration is easy; simply execute the build_threadx_sample.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_sample.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with TX.A. The resulting file DEMO is a binary file
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with TX.A. The resulting file DEMO is a binary file
that can be downloaded and executed.
3. System Initialization
-The entry point in ThreadX for the Cortex-A9 using GNU tools is at label _start.
+The entry point in ThreadX for the Cortex-A9 using GNU tools is at label _start.
This is defined within the modified version of the GNU startup code - crt0.S.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up various
-system data structures, the interrupt vectors, and a periodic timer interrupt source.
-By default, the vector area is defined to be located at the "__vectors" label,
-which is defined in reset.S. This area is typically located at 0. In situations
-where this is impossible, the vectors at the "__vectors" label should be copied
+The ThreadX tx_initialize_low_level.S file is responsible for setting up various
+system data structures, the interrupt vectors, and a periodic timer interrupt source.
+By default, the vector area is defined to be located at the "__vectors" label,
+which is defined in reset.S. This area is typically located at 0. In situations
+where this is impossible, the vectors at the "__vectors" label should be copied
to address 0.
-This is also where initialization of a periodic timer interrupt source should take
+This is also where initialization of a periodic timer interrupt source should take
place.
-In addition, _tx_initialize_low_level defines the first available address
-for use by the application, which is supplied as the sole input parameter
+In addition, _tx_initialize_low_level defines the first available address
+for use by the application, which is supplied as the sole input parameter
to your application definition function, tx_application_define.
4. Assembler / Compiler Switches
-The following are compiler switches used in building the demonstration
+The following are compiler switches used in building the demonstration
system:
Compiler/Assembler Meaning
@@ -73,164 +73,164 @@ Application Defines ( -D option)
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S.
TX_ENABLE_FIQ_NESTING This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S. In addition,
IRQ nesting should also be enabled.
TX_ENABLE_FIQ_SUPPORT This compiler define enables FIQ
interrupt handling in the ThreadX
- generic C source. This define
+ generic C source. This define
should also be used in conjunction
with the corresponding assembler
- define.
+ define.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
5. Register Usage and Stack Frames
-The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -248,52 +248,52 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A9
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A9 vectors start at address zero. The demonstration system startup
-reset.S file contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+reset.S file contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
-ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
+ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
nested IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.S:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -301,7 +301,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -314,7 +314,7 @@ __tx_irq_processing_return:
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.S:
.global __tx_irq_example_handler
@@ -324,12 +324,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} @ Save some scratch registers
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
BL _tx_thread_vectored_context_save @ Call the vectored IRQ context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -346,22 +346,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -369,10 +369,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* Enable nested IRQ interrupts. NOTE: Since this service returns
-@ with IRQ interrupts enabled, all IRQ interrupt sources must be
+@ with IRQ interrupts enabled, all IRQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-@
+@
@ /* Application ISR call(s) go here! */
@
@ /* Disable nested IRQ interrupts. The mode is switched back to
@@ -385,12 +385,12 @@ __tx_irq_processing_return:
7.3 FIQ Interrupts
-By default, FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.S.
@@ -399,7 +399,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.S.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.S:
@@ -427,18 +427,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.S. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -454,7 +454,7 @@ __tx_fiq_processing_return:
@ interrupt, and all C scratch registers are available for use. */
@
@ /* Enable nested FIQ interrupts. NOTE: Since this service returns
-@ with FIQ interrupts enabled, all FIQ interrupt sources must be
+@ with FIQ interrupts enabled, all FIQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@
@@ -470,12 +470,12 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
-interrupt source, these services are not functional but the remainder of
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
+interrupt source, these services are not functional but the remainder of
ThreadX will still run.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.S for the demonstration system.
@@ -483,7 +483,7 @@ found in the file tx_initialize_low_level.S for the demonstration system.
9. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a9/gnu/src/tx_thread_context_restore.S b/ports/cortex_a9/gnu/src/tx_thread_context_restore.S
index 6b4a561d..41b0b0d0 100644
--- a/ports/cortex_a9/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_a9/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,23 +80,6 @@ IRQ_MODE = 0x12 // IRQ mode
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_restore
.type _tx_thread_context_restore,function
diff --git a/ports/cortex_a9/gnu/src/tx_thread_context_save.S b/ports/cortex_a9/gnu/src/tx_thread_context_save.S
index eff06283..d2d29d34 100644
--- a/ports/cortex_a9/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_a9/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,23 +72,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
.global _tx_thread_context_save
.type _tx_thread_context_save,function
diff --git a/ports/cortex_a9/gnu/src/tx_thread_fiq_context_restore.S b/ports/cortex_a9/gnu/src/tx_thread_fiq_context_restore.S
index d2fbebe1..921c322c 100644
--- a/ports/cortex_a9/gnu/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_a9/gnu/src/tx_thread_fiq_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -78,20 +79,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* FIQ ISR Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_restore
.type _tx_thread_fiq_context_restore,function
diff --git a/ports/cortex_a9/gnu/src/tx_thread_fiq_context_save.S b/ports/cortex_a9/gnu/src/tx_thread_fiq_context_save.S
index 88472a3d..2f1a6c40 100644
--- a/ports/cortex_a9/gnu/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_a9/gnu/src/tx_thread_fiq_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_fiq_context_save
.type _tx_thread_fiq_context_save,function
diff --git a/ports/cortex_a9/gnu/src/tx_thread_fiq_nesting_end.S b/ports/cortex_a9/gnu/src/tx_thread_fiq_nesting_end.S
index fa3886b8..a7ce701e 100644
--- a/ports/cortex_a9/gnu/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_a9/gnu/src/tx_thread_fiq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ FIQ_MODE_BITS = 0x11 // FIQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/gnu/src/tx_thread_fiq_nesting_start.S b/ports/cortex_a9/gnu/src/tx_thread_fiq_nesting_start.S
index dbed1cf2..4f095dde 100644
--- a/ports/cortex_a9/gnu/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_a9/gnu/src/tx_thread_fiq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_a9/gnu/src/tx_thread_interrupt_control.S
index d1223cb8..a5bc47f7 100644
--- a/ports/cortex_a9/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_a9/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,20 +69,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_a9/gnu/src/tx_thread_interrupt_disable.S
index a87d1a06..d7b53bc2 100644
--- a/ports/cortex_a9/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_a9/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,20 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_a9/gnu/src/tx_thread_interrupt_restore.S
index 53ff2813..3c31e94b 100644
--- a/ports/cortex_a9/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_a9/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,20 +68,6 @@ FIQ_MASK = 0x040
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/gnu/src/tx_thread_irq_nesting_end.S b/ports/cortex_a9/gnu/src/tx_thread_irq_nesting_end.S
index 18aebc7c..cc4db3a7 100644
--- a/ports/cortex_a9/gnu/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_a9/gnu/src/tx_thread_irq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,20 +80,6 @@ IRQ_MODE_BITS = 0x12 // IRQ mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/gnu/src/tx_thread_irq_nesting_start.S b/ports/cortex_a9/gnu/src/tx_thread_irq_nesting_start.S
index a2ffd35d..3635874d 100644
--- a/ports/cortex_a9/gnu/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_a9/gnu/src/tx_thread_irq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,20 +73,6 @@ SYS_MODE_BITS = 0x1F // System mode bits
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/gnu/src/tx_thread_schedule.S b/ports/cortex_a9/gnu/src/tx_thread_schedule.S
index 07dd6f7f..a74e2050 100644
--- a/ports/cortex_a9/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_a9/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,6 +40,14 @@
#define IRQ_MODE 0x12 // IRQ mode
#define SVC_MODE 0x13 // SVC mode
+#ifdef TX_ENABLE_VFP_SUPPORT
+#define IRQ_MASK 0x80
+#endif
+
+#ifdef TX_ENABLE_FIQ_SUPPORT
+#define FIQ_MASK 0x40
+#endif
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
@@ -73,23 +82,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
@@ -259,3 +251,4 @@ no_fiq:
BX lr
#endif
+
diff --git a/ports/cortex_a9/gnu/src/tx_thread_stack_build.S b/ports/cortex_a9/gnu/src/tx_thread_stack_build.S
index 3876225a..827554a7 100644
--- a/ports/cortex_a9/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_a9/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,20 +75,6 @@ CPSR_MASK = 0xBF // Mask initial CPSR, T, IRQ int
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/gnu/src/tx_thread_system_return.S b/ports/cortex_a9/gnu/src/tx_thread_system_return.S
index 0eed478d..1a17446b 100644
--- a/ports/cortex_a9/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_a9/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,23 +69,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/gnu/src/tx_thread_vectored_context_save.S b/ports/cortex_a9/gnu/src/tx_thread_vectored_context_save.S
index fe8a98e8..91653b75 100644
--- a/ports/cortex_a9/gnu/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_a9/gnu/src/tx_thread_vectored_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,20 +67,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* execution profile support, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
.global _tx_thread_vectored_context_save
.type _tx_thread_vectored_context_save,function
diff --git a/ports/cortex_a9/gnu/src/tx_timer_interrupt.S b/ports/cortex_a9/gnu/src/tx_timer_interrupt.S
index cb0c1fa2..179ac894 100644
--- a/ports/cortex_a9/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_a9/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,20 +78,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-25-2022 Zhen Kong Updated comments, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Modified comment(s), added */
-/* #include tx_user.h, */
-/* resulting in version 6.3.0 */
-/* 12-31-2023 Yajun Xia Modified comment(s), */
-/* Added thumb mode support, */
-/* resulting in version 6.4.0 */
-/* */
/**************************************************************************/
#if defined(THUMB_MODE)
.thumb_func
diff --git a/ports/cortex_a9/iar/example_build/cstartup.s b/ports/cortex_a9/iar/example_build/cstartup.s
index 647de2e8..b4ed8f87 100644
--- a/ports/cortex_a9/iar/example_build/cstartup.s
+++ b/ports/cortex_a9/iar/example_build/cstartup.s
@@ -1,7 +1,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; Part one of the system initialization code,
+;; Part one of the system initialization code,
;; contains low-level
;; initialization.
;;
@@ -71,13 +71,13 @@ FIQ_Addr: DCD __tx_fiq_handler
SECTION .text:CODE:NOROOT(2)
-; PUBLIC ?cstartup
+; PUBLIC ?cstartup
EXTERN ?main
REQUIRE __vector
- ARM
-
-__iar_program_start:
+ ARM
+
+__iar_program_start:
?cstartup:
;
diff --git a/ports/cortex_a9/iar/example_build/sample_threadx.c b/ports/cortex_a9/iar/example_build/sample_threadx.c
index c7c300cb..afbd4ea8 100644
--- a/ports/cortex_a9/iar/example_build/sample_threadx.c
+++ b/ports/cortex_a9/iar/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -83,42 +83,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -126,23 +126,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -245,11 +245,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -308,7 +308,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -361,7 +361,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_a9/iar/example_build/tx_initialize_low_level.s b/ports/cortex_a9/iar/example_build/tx_initialize_low_level.s
index 5820192d..6d8bfc9f 100644
--- a/ports/cortex_a9/iar/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_a9/iar/example_build/tx_initialize_low_level.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -62,7 +62,7 @@ SYS_MODE DEFINE 0xDF ; Disable irq,fiq SYS mode
;
;
;
-;/* Define the FREE_MEM segment that will specify where free memory is
+;/* Define the FREE_MEM segment that will specify where free memory is
; defined. This must also be located in at the end of other RAM segments
; in the linker control file. The value of this segment is what is passed
; to tx_application_define. */
@@ -75,45 +75,39 @@ __tx_free_memory_start
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level Cortex-A9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level Cortex-A9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -146,7 +140,7 @@ _tx_initialize_low_level
;
LDR r2, =_tx_initialize_unused_memory ; Pickup unused memory ptr address
STR r0, [r2, #0] ; Save first free memory address
-;
+;
; /* Setup Timer for periodic interrupts. */
;
; /* Done, return to caller. */
@@ -188,7 +182,7 @@ __tx_reserved_handler
RSEG .text:CODE:NOROOT(2)
PUBLIC __tx_irq_handler
RSEG .text:CODE:NOROOT(2)
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -196,17 +190,17 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -221,7 +215,7 @@ __tx_irq_processing_return
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -240,22 +234,22 @@ __tx_irq_processing_return
; /* Jump to context save to save system context. */
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other registers
; BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -264,7 +258,7 @@ __tx_irq_processing_return
; /* Application IRQ handler is called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
@@ -288,11 +282,11 @@ __tx_fiq_processing_return
; /* At this point execution is still in the FIQ mode. The CPSR, point of
; interrupt, and all C scratch registers are available for use. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
; from FIQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with FIQ interrupts enabled.
+; system mode and returns with FIQ interrupts enabled.
;
-; NOTE: It is very important to ensure all FIQ interrupts are cleared
+; NOTE: It is very important to ensure all FIQ interrupts are cleared
; prior to enabling nested FIQ interrupts. */
#ifdef TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/cortex_a9/iar/inc/tx_port.h b/ports/cortex_a9/iar/inc/tx_port.h
index 5cc6cb5b..46f042a9 100644
--- a/ports/cortex_a9/iar/inc/tx_port.h
+++ b/ports/cortex_a9/iar/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-A9/IAR */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-A9/IAR */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -79,7 +71,7 @@
#endif
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -115,12 +107,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -130,8 +122,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -189,7 +181,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -203,18 +195,18 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable; \
- VOID *tx_thread_iar_tls_pointer;
+ VOID *tx_thread_iar_tls_pointer;
#else
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable;
#endif
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -228,11 +220,11 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -242,23 +234,23 @@ ULONG _tx_misra_time_stamp_get(VOID);
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#if (__VER__ < 8000000)
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {_tx_iar_destroy_per_thread_tls_area(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
-#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
+#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#endif
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -286,8 +278,8 @@ void __iar_Initlocks(void);
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef TX_DISABLE_INLINE
@@ -298,22 +290,22 @@ void __iar_Initlocks(void);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (UINT) __CLZ(m); \
- b = 31 - b;
+ b = 31 - b;
#endif
#endif
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
/* First, check and see what mode the file is being compiled in. The IAR compiler
- defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
+ defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
is present. If ARM 32-bit mode is present, the fast CPSR manipulation macros
are available. Otherwise, if Thumb mode is present, we must use function calls. */
@@ -383,8 +375,8 @@ void tx_thread_vfp_disable(void);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-A9/IAR Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-A9/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_a9/iar/readme_threadx.txt b/ports/cortex_a9/iar/readme_threadx.txt
index 1b8ed694..bd142b40 100644
--- a/ports/cortex_a9/iar/readme_threadx.txt
+++ b/ports/cortex_a9/iar/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-A9
+ Microsoft's Azure RTOS ThreadX for Cortex-A9
Thumb & 32-bit Mode
@@ -7,10 +7,10 @@
1. Building the ThreadX run-time Library
Building the ThreadX library is easy. First, open the Azure RTOS workspace
-azure_rtos.eww. Next, make the TX project the "active project" in the
-IAR Embedded Workbench and select the "Make" button. You should observe
-assembly and compilation of a series of ThreadX source files. This
-results in the ThreadX run-time library file tx.a, which is needed by
+azure_rtos.eww. Next, make the TX project the "active project" in the
+IAR Embedded Workbench and select the "Make" button. You should observe
+assembly and compilation of a series of ThreadX source files. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
@@ -20,47 +20,47 @@ The ThreadX demonstration is designed to execute under the IAR
Windows-based Cortex-A9 simulator.
Building the demonstration is easy; simply make the sample_threadx.ewp project
-the "active project" in the IAR Embedded Workbench and select the
+the "active project" in the IAR Embedded Workbench and select the
"Make" button.
-You should observe the compilation of sample_threadx.c (which is the demonstration
+You should observe the compilation of sample_threadx.c (which is the demonstration
application) and linking with tx.a. The resulting file sample_threadx.out is a
binary file that can be downloaded and executed on IAR's Cortex-A9 simulator.
3. System Initialization
-The entry point in ThreadX for the Cortex-A9 using IAR tools is at label
-?cstartup. This is defined within the IAR compiler's startup code. In
-addition, this is where all static and global preset C variable
+The entry point in ThreadX for the Cortex-A9 using IAR tools is at label
+?cstartup. This is defined within the IAR compiler's startup code. In
+addition, this is where all static and global preset C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, and a periodic timer interrupt source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, and a periodic timer interrupt source.
By default, the vector area is defined at the top of cstartup.s, which is
-a slightly modified from the base IAR file.
+a slightly modified from the base IAR file.
The _tx_initialize_low_level function inside of tx_initialize_low_level.s
-also determines the first available address for use by the application, which
-is supplied as the sole input parameter to your application definition function,
-tx_application_define. To accomplish this, a section is created in
-tx_initialize_low_level.s called FREE_MEM, which must be located after all
+also determines the first available address for use by the application, which
+is supplied as the sole input parameter to your application definition function,
+tx_application_define. To accomplish this, a section is created in
+tx_initialize_low_level.s called FREE_MEM, which must be located after all
other RAM sections in memory.
4. Register Usage and Stack Frames
-The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
-scratch registers for each function. All other registers used by a C function
-must be preserved by the function. ThreadX takes advantage of this in
-situations where a context switch happens as a result of making a ThreadX
-service call (which is itself a C function). In such cases, the saved
+The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
+scratch registers for each function. All other registers used by a C function
+must be preserved by the function. ThreadX takes advantage of this in
+situations where a context switch happens as a result of making a ThreadX
+service call (which is itself a C function). In such cases, the saved
context of a thread is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -78,12 +78,12 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
5. Conditional Compilation Switches
@@ -92,146 +92,146 @@ The following are conditional compilation options for building the ThreadX libra
and application:
- TX_ENABLE_FIQ_SUPPORT This assembler/compiler define enables
+ TX_ENABLE_FIQ_SUPPORT This assembler/compiler define enables
FIQ interrupt handling support in the
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s.
TX_ENABLE_FIQ_NESTING This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s. In addition,
IRQ nesting should also be enabled.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
TX_THUMB Defined, this option enables the BX LR calling return sequence
@@ -245,29 +245,29 @@ and application:
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
-project to enable various compiler optimizations.
+project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-A9
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-A9 vectors start at address zero. The demonstration system startup
-cstartup.s file contains the vectors and is loaded at address zero.
-On actual hardware platforms, this area might have to be copied to address 0.
+cstartup.s file contains the vectors and is loaded at address zero.
+On actual hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -278,12 +278,12 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
PUBLIC __tx_irq_handler
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -291,7 +291,7 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -304,7 +304,7 @@ __tx_irq_processing_return
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.s:
@@ -315,12 +315,12 @@ __tx_example_vectored_irq_handler
; /* Jump to context save to save system context. */
STMDB sp!, {r0-r3} ; Save some scratch registers
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -337,24 +337,24 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
RSEG .text:CODE:NOROOT(2)
PUBLIC __tx_irq_handler
RSEG .text:CODE:NOROOT(2)
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -362,15 +362,15 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;
BL _tx_thread_irq_nesting_start
@@ -378,7 +378,7 @@ __tx_irq_processing_return
; /* Application ISR dispatch call goes here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;
BL _tx_thread_irq_nesting_end
@@ -389,12 +389,12 @@ __tx_irq_processing_return
7.3 FIQ Interrupts
-By default, Cortex-A9 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, Cortex-A9 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -403,7 +403,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.s.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.s:
@@ -434,18 +434,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.s. When nested FIQ interrupts are no
-longer required, calling the _tx_thread_fiq_nesting_end service disables
-nesting by disabling FIQ interrupts and switching back to FIQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.s. When nested FIQ interrupts are no
+longer required, calling the _tx_thread_fiq_nesting_end service disables
+nesting by disabling FIQ interrupts and switching back to FIQ mode in
preparation for the FIQ context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -463,7 +463,7 @@ __tx_fiq_processing_return:
; interrupt, and all C scratch registers are available for use. */
;
; /* Enable nested FIQ interrupts. NOTE: Since this service returns
-; with FIQ interrupts enabled, all FIQ interrupt sources must be
+; with FIQ interrupts enabled, all FIQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
;
@@ -479,22 +479,22 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
+To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
in the IRQ processing.
9. Thumb/Cortex-A9 Mixed Mode
-By default, ThreadX is setup for running in Cortex-A9 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
+By default, ThreadX is setup for running in Cortex-A9 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
ThreadX file and/or the application in Thumb mode. The only exception
-to this is the file tx_thread_shell_entry.c. This file must always be
-built in 32-bit mode. In addition, if any Thumb code is used the entire
+to this is the file tx_thread_shell_entry.c. This file must always be
+built in 32-bit mode. In addition, if any Thumb code is used the entire
ThreadX assembly source should be built with TX_THUMB defined.
@@ -506,14 +506,14 @@ should have the following line added (if not already in place):
initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
-The project options "General Options -> Library Configuration" should also have the
+The project options "General Options -> Library Configuration" should also have the
"Enable thread support in library" box selected.
11. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_a9/iar/src/tx_iar.c b/ports/cortex_a9/iar/src/tx_iar.c
index a37231c8..238b485e 100644
--- a/ports/cortex_a9/iar/src/tx_iar.c
+++ b/ports/cortex_a9/iar/src/tx_iar.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** IAR Multithreaded Library Support */
/** */
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,24 +423,24 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#include
+#include
void * __aeabi_read_tp();
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports/cortex_a9/iar/src/tx_thread_context_restore.s b/ports/cortex_a9/iar/src/tx_thread_context_restore.s
index e063a2b1..967760e0 100644
--- a/ports/cortex_a9/iar/src/tx_thread_context_restore.s
+++ b/ports/cortex_a9/iar/src/tx_thread_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,7 +36,7 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
THUMB_MASK DEFINE 0x20 ; Thumb bit mask
SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
@@ -51,47 +51,38 @@ SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore Cortex-A9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore Cortex-A9/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -121,13 +112,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3, #0] ; Store the counter
+ STR r2, [r3, #0] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -193,7 +184,7 @@ __tx_thread_preempt_restore
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
-
+
#ifdef __ARMVFP__
LDR r2, [r0, #144] ; Pickup the VFP enabled flag
CMP r2, #0 ; Is the VFP enabled?
@@ -204,7 +195,7 @@ __tx_thread_preempt_restore
VSTMDB sp!, {D0-D15} ; Save D0-D15
_tx_skip_fiq_vfp_save:
#endif
-
+
MOV r3, #1 ; Build interrupt stack type
STMDB sp!, {r3, r4} ; Save interrupt stack type and SPSR
STR sp, [r0, #8] ; Save stack pointer in thread control
diff --git a/ports/cortex_a9/iar/src/tx_thread_context_save.s b/ports/cortex_a9/iar/src/tx_thread_context_save.s
index 75045787..7603d79a 100644
--- a/ports/cortex_a9/iar/src/tx_thread_context_save.s
+++ b/ports/cortex_a9/iar/src/tx_thread_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -43,46 +43,37 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save Cortex-A9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save Cortex-A9/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
@@ -99,7 +90,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
#ifdef TX_ENABLE_FIQ_SUPPORT
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt CPSR
@@ -119,7 +110,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -135,7 +126,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -149,13 +140,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -175,7 +166,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -185,7 +176,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -200,7 +191,7 @@ __tx_thread_idle_system_save
#endif
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports/cortex_a9/iar/src/tx_thread_fiq_context_restore.s b/ports/cortex_a9/iar/src/tx_thread_fiq_context_restore.s
index 999febae..7d97d09b 100644
--- a/ports/cortex_a9/iar/src/tx_thread_fiq_context_restore.s
+++ b/ports/cortex_a9/iar/src/tx_thread_fiq_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -37,7 +37,7 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
THUMB_MASK DEFINE 0x20 ; Thumb bit mask
IRQ_MODE_BITS DEFINE 0x12 ; IRQ mode bits
SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
@@ -52,47 +52,38 @@ SVC_MODE_BITS DEFINE 0x13 ; SVC mode value
EXTERN _tx_execution_isr_exit
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_restore Cortex-A9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_restore Cortex-A9/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the fiq interrupt context when processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* FIQ ISR Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function restores the fiq interrupt context when processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* FIQ ISR Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_context_restore(VOID)
@@ -122,13 +113,13 @@ _tx_thread_fiq_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -172,7 +163,7 @@ __tx_thread_fiq_no_preempt_restore
; /* Restore interrupted thread or ISR. */
;
; /* Pickup the saved stack pointer. */
-; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
+; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
;
; /* Recover the saved context and return to the point of interrupt. */
;
@@ -232,7 +223,7 @@ _tx_skip_irq_vfp_save:
BEQ __tx_thread_fiq_dont_save_ts ; No, don't save it
;
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-; _tx_timer_time_slice = 0;
+; _tx_timer_time_slice = 0;
;
STR r2, [r0, #24] ; Save thread's time-slice
MOV r2, #0 ; Clear value
diff --git a/ports/cortex_a9/iar/src/tx_thread_fiq_context_save.s b/ports/cortex_a9/iar/src/tx_thread_fiq_context_save.s
index 7f974a72..5eabfd4b 100644
--- a/ports/cortex_a9/iar/src/tx_thread_fiq_context_save.s
+++ b/ports/cortex_a9/iar/src/tx_thread_fiq_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,46 +36,37 @@
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_save Cortex-A9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_save Cortex-A9/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
; VOID _tx_thread_fiq_context_save(VOID)
@@ -92,7 +83,7 @@ _tx_thread_fiq_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -107,7 +98,7 @@ _tx_thread_fiq_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -123,38 +114,38 @@ _tx_thread_fiq_context_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
__tx_thread_fiq_not_nested_save
-; }
+; }
;
; /* Otherwise, not nested, check to see if a thread was running. */
; else if (_tx_thread_current_ptr)
-; {
+; {
;
ADD r2, r2, #1 ; Increment the interrupt counter
STR r2, [r3] ; Store it back in the variable
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
-; ; scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
+; ; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, lr} ; Store other registers, Note that we don't
-; ; need to save sl and ip since FIQ has
-; ; copies of these registers. Nested
+; ; need to save sl and ip since FIQ has
+; ; copies of these registers. Nested
; ; interrupt processing does need to save
; ; these registers.
;
; /* Save the current stack pointer in the thread's control block. */
-; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
;
; /* Switch to the system stack. */
-; sp = _tx_thread_system_stack_ptr;
+; sp = _tx_thread_system_stack_ptr;
;
MOV r10, #0 ; Clear stack limit
@@ -167,7 +158,7 @@ __tx_thread_fiq_not_nested_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
; else
@@ -187,18 +178,18 @@ __tx_thread_fiq_idle_system_save
#endif
;
; /* Not much to do here, save the current SPSR and LR for possible
-; use in IRQ interrupted in idle system conditions, and return to
+; use in IRQ interrupted in idle system conditions, and return to
; FIQ interrupt processing. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, lr} ; Store other registers that will get used
-; ; or stripped off the stack in context
-; ; restore
- B __tx_fiq_processing_return ; Continue FIQ processing
+; ; or stripped off the stack in context
+; ; restore
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
-;}
+;}
;
;
END
diff --git a/ports/cortex_a9/iar/src/tx_thread_fiq_nesting_end.s b/ports/cortex_a9/iar/src/tx_thread_fiq_nesting_end.s
index 27221a2b..42aea60c 100644
--- a/ports/cortex_a9/iar/src/tx_thread_fiq_nesting_end.s
+++ b/ports/cortex_a9/iar/src/tx_thread_fiq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,55 +34,49 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
FIQ_MODE_BITS DEFINE 0x11 ; FIQ mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_end Cortex-A9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_end Cortex-A9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-;/* processing from system mode back to FIQ mode prior to the ISR */
-;/* calling _tx_thread_fiq_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with FIQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+;/* processing from system mode back to FIQ mode prior to the ISR */
+;/* calling _tx_thread_fiq_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with FIQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_end(VOID)
diff --git a/ports/cortex_a9/iar/src/tx_thread_fiq_nesting_start.s b/ports/cortex_a9/iar/src/tx_thread_fiq_nesting_start.s
index af3d7786..52467afa 100644
--- a/ports/cortex_a9/iar/src/tx_thread_fiq_nesting_start.s
+++ b/ports/cortex_a9/iar/src/tx_thread_fiq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ MODE_MASK DEFINE 0x1F ; Mode mask
SYS_MODE_BITS DEFINE 0x1F ; System mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_start Cortex-A9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_start Cortex-A9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-;/* processing to the system mode so nested FIQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with FIQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+;/* processing to the system mode so nested FIQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with FIQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/cortex_a9/iar/src/tx_thread_interrupt_control.s b/ports/cortex_a9/iar/src/tx_thread_interrupt_control.s
index 75d7279b..acb20eaf 100644
--- a/ports/cortex_a9/iar/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_a9/iar/src/tx_thread_interrupt_control.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,42 +35,36 @@ INT_MASK DEFINE 0x80 ; Interrupt bit mask
#endif
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control Cortex-A9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control Cortex-A9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/cortex_a9/iar/src/tx_thread_interrupt_disable.s b/ports/cortex_a9/iar/src/tx_thread_interrupt_disable.s
index ce8e51cf..c7c2539e 100644
--- a/ports/cortex_a9/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_a9/iar/src/tx_thread_interrupt_disable.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,41 +36,35 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable Cortex-A9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable Cortex-A9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(VOID)
diff --git a/ports/cortex_a9/iar/src/tx_thread_interrupt_restore.s b/ports/cortex_a9/iar/src/tx_thread_interrupt_restore.s
index bad3cf79..eb6968c8 100644
--- a/ports/cortex_a9/iar/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_a9/iar/src/tx_thread_interrupt_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -28,42 +28,36 @@
;#include "tx_thread.h"
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore Cortex-A9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore Cortex-A9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function is responsible for restoring interrupts to the state */
;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;void _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/cortex_a9/iar/src/tx_thread_irq_nesting_end.s b/ports/cortex_a9/iar/src/tx_thread_irq_nesting_end.s
index a3e6d819..12ab0fd5 100644
--- a/ports/cortex_a9/iar/src/tx_thread_irq_nesting_end.s
+++ b/ports/cortex_a9/iar/src/tx_thread_irq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,55 +35,49 @@ DISABLE_INTS DEFINE 0xC0 ; Disable IRQ & FIQ interrupts
#else
DISABLE_INTS DEFINE 0x80 ; Disable IRQ interrupts
#endif
-MODE_MASK DEFINE 0x1F ; Mode mask
+MODE_MASK DEFINE 0x1F ; Mode mask
IRQ_MODE_BITS DEFINE 0x12 ; IRQ mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end Cortex-A9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end Cortex-A9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
diff --git a/ports/cortex_a9/iar/src/tx_thread_irq_nesting_start.s b/ports/cortex_a9/iar/src/tx_thread_irq_nesting_start.s
index ed787d24..77d2cd5b 100644
--- a/ports/cortex_a9/iar/src/tx_thread_irq_nesting_start.s
+++ b/ports/cortex_a9/iar/src/tx_thread_irq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ MODE_MASK DEFINE 0x1F ; Mode mask
SYS_MODE_BITS DEFINE 0x1F ; System mode bits
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start Cortex-A9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start Cortex-A9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s79). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s79). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/cortex_a9/iar/src/tx_thread_schedule.s b/ports/cortex_a9/iar/src/tx_thread_schedule.s
index 8f221f16..be461cb1 100644
--- a/ports/cortex_a9/iar/src/tx_thread_schedule.s
+++ b/ports/cortex_a9/iar/src/tx_thread_schedule.s
@@ -1,18 +1,19 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -43,48 +44,39 @@ ENABLE_INTS DEFINE 0x80 ; IRQ Interrupts enabled mask
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule Cortex-A9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule Cortex-A9/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
@@ -114,7 +106,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -123,7 +115,7 @@ __tx_thread_schedule_loop
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
;
- LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
STR r0, [r1, #0] ; Setup current thread pointer
;
; /* Increment the run count for this thread. */
@@ -137,7 +129,7 @@ __tx_thread_schedule_loop
; /* Setup time-slice, if present. */
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
;
- LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
+ LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
; variable
LDR sp, [r0, #8] ; Switch stack pointers
STR r3, [r2, #0] ; Setup time-slice
@@ -199,7 +191,7 @@ _tx_skip_solicited_vfp_restore:
#ifdef __ARMVFP__
PUBLIC tx_thread_vfp_enable
CODE32
-tx_thread_vfp_enable??rA
+tx_thread_vfp_enable??rA
tx_thread_vfp_enable
MRS r2, CPSR ; Pickup the CPSR
#ifdef TX_ENABLE_FIQ_SUPPORT
@@ -219,7 +211,7 @@ __tx_no_thread_to_enable:
PUBLIC tx_thread_vfp_disable
CODE32
-tx_thread_vfp_disable??rA
+tx_thread_vfp_disable??rA
tx_thread_vfp_disable
MRS r2, CPSR ; Pickup the CPSR
#ifdef TX_ENABLE_FIQ_SUPPORT
@@ -240,3 +232,4 @@ __tx_no_thread_to_disable:
END
+
diff --git a/ports/cortex_a9/iar/src/tx_thread_stack_build.s b/ports/cortex_a9/iar/src/tx_thread_stack_build.s
index 8b153c14..3fa21263 100644
--- a/ports/cortex_a9/iar/src/tx_thread_stack_build.s
+++ b/ports/cortex_a9/iar/src/tx_thread_stack_build.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -37,58 +37,52 @@ CPSR_MASK DEFINE 0x9F ; Mask initial CPSR, IRQ ints en
#endif
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build Cortex-A9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build Cortex-A9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function builds a stack frame on the supplied thread's stack. */
;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
;/* thread_ptr Pointer to thread control blk */
;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
;{
RSEG .text:CODE:NOROOT(2)
PUBLIC _tx_thread_stack_build
-
+
CODE32
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-A9 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports/cortex_a9/iar/src/tx_thread_system_return.s b/ports/cortex_a9/iar/src/tx_thread_system_return.s
index d8d1b096..8f357380 100644
--- a/ports/cortex_a9/iar/src/tx_thread_system_return.s
+++ b/ports/cortex_a9/iar/src/tx_thread_system_return.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -42,47 +42,38 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return Cortex-A9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return Cortex-A9/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
@@ -121,7 +112,7 @@ _tx_skip_solicited_vfp_save:
MOV r0, #0 ; Build a solicited stack type
STMDB sp!, {r0-r1} ; Save type and CPSR
-;
+;
;
#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
;
diff --git a/ports/cortex_a9/iar/src/tx_thread_vectored_context_save.s b/ports/cortex_a9/iar/src/tx_thread_vectored_context_save.s
index 76d9b155..923863ed 100644
--- a/ports/cortex_a9/iar/src/tx_thread_vectored_context_save.s
+++ b/ports/cortex_a9/iar/src/tx_thread_vectored_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -41,46 +41,37 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save Cortex-A9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save Cortex-A9/IAR */
;/* 6.1.9 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 10-15-2021 William E. Lamie Modified comment(s), added */
-;/* execution profile support, */
-;/* resulting in version 6.1.9 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_vectored_context_save(VOID)
@@ -142,7 +133,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -174,7 +165,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports/cortex_a9/iar/src/tx_timer_interrupt.s b/ports/cortex_a9/iar/src/tx_timer_interrupt.s
index 86c6960e..d7b9810e 100644
--- a/ports/cortex_a9/iar/src/tx_timer_interrupt.s
+++ b/ports/cortex_a9/iar/src/tx_timer_interrupt.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Timer */
;/** */
@@ -43,46 +43,40 @@
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt Cortex-A9/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt Cortex-A9/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time-slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time-slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -108,7 +102,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -226,13 +220,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports/cortex_m0/ac5/example_build/sample_threadx.c b/ports/cortex_m0/ac5/example_build/sample_threadx.c
index 4d95c2ed..dd5ee155 100644
--- a/ports/cortex_m0/ac5/example_build/sample_threadx.c
+++ b/ports/cortex_m0/ac5/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m0/ac5/example_build/tx_initialize_low_level.s b/ports/cortex_m0/ac5/example_build/tx_initialize_low_level.s
index f1a83341..3a585477 100644
--- a/ports/cortex_m0/ac5/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_m0/ac5/example_build/tx_initialize_low_level.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -120,12 +120,6 @@ Reset_Handler
;/* */
;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
;{
@@ -175,6 +169,9 @@ _tx_initialize_low_level
; /* Configure SysTick. */
;
LDR r0, =0xE000E000 ; Build address of NVIC registers
+ LDR r1, =0
+ STR r1, [r0, #0x10] ; Reset SysTick Control
+ STR r1, [r0, #0x18] ; Reset SysTick Counter Value
LDR r1, =SYSTICK_CYCLES
STR r1, [r0, #0x14] ; Setup SysTick Reload Value
MOVS r1, #0x7 ; Build SysTick Control Enable Value
diff --git a/ports/cortex_m0/ac5/inc/tx_port.h b/ports/cortex_m0/ac5/inc/tx_port.h
index 4b0c16eb..f163f1c6 100644
--- a/ports/cortex_m0/ac5/inc/tx_port.h
+++ b/ports/cortex_m0/ac5/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,18 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -64,7 +53,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -113,7 +102,7 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
+#ifndef TX_TIMER_THREAD_PRIORITY
#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
@@ -124,8 +113,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0 /* Enable interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((volatile ULONG *) 0x0a800024)
@@ -164,7 +153,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -178,13 +167,13 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
-#define TX_THREAD_EXTENSION_2
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -198,11 +187,11 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -210,10 +199,10 @@ ULONG _tx_misra_time_stamp_get(VOID);
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
-#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
+#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
#ifndef TX_MISRA_ENABLE
@@ -246,7 +235,7 @@ register unsigned int _ipsr __asm("ipsr");
/* Define the get system state macro. */
-
+
#ifndef TX_THREAD_GET_SYSTEM_STATE
#ifndef TX_MISRA_ENABLE
#define TX_THREAD_GET_SYSTEM_STATE() (_tx_thread_system_state | _ipsr)
@@ -263,19 +252,19 @@ ULONG _tx_misra_ipsr_get(VOID);
zero after initialization for Cortex-M ports. */
#ifndef TX_THREAD_SYSTEM_RETURN_CHECK
-#define TX_THREAD_SYSTEM_RETURN_CHECK(c) (c) = ((ULONG) _tx_thread_preempt_disable);
+#define TX_THREAD_SYSTEM_RETURN_CHECK(c) (c) = ((ULONG) _tx_thread_preempt_disable);
#endif
-/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
+/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
prevent early scheduling on Cortex-M parts. */
-
+
#define TX_PORT_SPECIFIC_POST_INITIALIZATION _tx_thread_preempt_disable++;
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -322,8 +311,8 @@ unsigned int was_masked;
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M0/AC5 Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M0/AC5 Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m0/ac5/readme_threadx.txt b/ports/cortex_m0/ac5/readme_threadx.txt
index 301aa31e..20f7ebef 100644
--- a/ports/cortex_m0/ac5/readme_threadx.txt
+++ b/ports/cortex_m0/ac5/readme_threadx.txt
@@ -1,18 +1,18 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M0
+ Microsoft's Azure RTOS ThreadX for Cortex-M0
Using ARM Compiler 5 (AC5)
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the AC5
-development environment. At this point you may run the build_threadx.bat batch
-file. This will build the ThreadX run-time environment in the "example_build"
-directory.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the AC5
+development environment. At this point you may run the build_threadx.bat batch
+file. This will build the ThreadX run-time environment in the "example_build"
+directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
@@ -21,27 +21,27 @@ application in order to use ThreadX.
The ThreadX demonstration is designed to execute under the ARM
Windows-based simulator.
-Building the demonstration is easy; simply execute the build_threadx_sample.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_sample.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.axf
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.axf
is a binary file that can be downloaded and executed on the ARM simulator.
3. System Initialization
-The entry point in ThreadX for the Cortex-M0 using AC5 tools is at label
-__main. This is defined within the AC5 compiler's startup code. In
-addition, this is where all static and global pre-set C variable
+The entry point in ThreadX for the Cortex-M0 using AC5 tools is at label
+__main. This is defined within the AC5 compiler's startup code. In
+addition, this is where all static and global pre-set C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -50,11 +50,11 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M0 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
- Stack Offset Stack Contents
+ Stack Offset Stack Contents
0x00 r8
0x04 r9
@@ -76,21 +76,21 @@ tx_thread_stack_ptr in the associated thread control block TX_THREAD.
5. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
-performance. To make it run faster, you can change the build_threadx.bat file to
-remove the -g option and enable all compiler optimizations.
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
+performance. To make it run faster, you can change the build_threadx.bat file to
+remove the -g option and enable all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M0
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
diff --git a/ports/cortex_m0/ac5/src/tx_thread_context_restore.s b/ports/cortex_m0/ac5/src/tx_thread_context_restore.s
index 673ba8c6..85d6cf35 100644
--- a/ports/cortex_m0/ac5/src/tx_thread_context_restore.s
+++ b/ports/cortex_m0/ac5/src/tx_thread_context_restore.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -20,7 +20,7 @@
;/**************************************************************************/
;
;
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
IMPORT _tx_execution_isr_exit
#endif
;
@@ -61,19 +61,13 @@
;/* */
;/* ISRs Interrupt Service Routines */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
;{
EXPORT _tx_thread_context_restore
_tx_thread_context_restore
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
;
; /* Call the ISR exit function to indicate an ISR is complete. */
;
diff --git a/ports/cortex_m0/ac5/src/tx_thread_context_save.s b/ports/cortex_m0/ac5/src/tx_thread_context_save.s
index df7d1721..d0c2c9e4 100644
--- a/ports/cortex_m0/ac5/src/tx_thread_context_save.s
+++ b/ports/cortex_m0/ac5/src/tx_thread_context_save.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -20,7 +20,7 @@
;/**************************************************************************/
;
;
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
IMPORT _tx_execution_isr_enter
#endif
;
@@ -61,18 +61,12 @@
;/* */
;/* ISRs */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
;{
EXPORT _tx_thread_context_save
_tx_thread_context_save
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
;
; /* Call the ISR enter function to indicate an ISR is executing. */
;
diff --git a/ports/cortex_m0/ac5/src/tx_thread_interrupt_control.s b/ports/cortex_m0/ac5/src/tx_thread_interrupt_control.s
index a8504791..be0da62d 100644
--- a/ports/cortex_m0/ac5/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_m0/ac5/src/tx_thread_interrupt_control.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -52,12 +52,6 @@
;/* */
;/* Application Code */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
;{
diff --git a/ports/cortex_m0/ac5/src/tx_thread_interrupt_disable.s b/ports/cortex_m0/ac5/src/tx_thread_interrupt_disable.s
index aac316ea..86ab4562 100644
--- a/ports/cortex_m0/ac5/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_m0/ac5/src/tx_thread_interrupt_disable.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -52,12 +52,6 @@
;/* */
;/* Application Code */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(UINT new_posture)
;{
diff --git a/ports/cortex_m0/ac5/src/tx_thread_interrupt_restore.s b/ports/cortex_m0/ac5/src/tx_thread_interrupt_restore.s
index b94b9e7b..8e71728a 100644
--- a/ports/cortex_m0/ac5/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_m0/ac5/src/tx_thread_interrupt_restore.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -52,12 +52,6 @@
;/* */
;/* Application Code */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_interrupt_restore(UINT new_posture)
;{
diff --git a/ports/cortex_m0/ac5/src/tx_thread_schedule.s b/ports/cortex_m0/ac5/src/tx_thread_schedule.s
index 06f03cca..701eeef4 100644
--- a/ports/cortex_m0/ac5/src/tx_thread_schedule.s
+++ b/ports/cortex_m0/ac5/src/tx_thread_schedule.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -25,7 +25,7 @@
IMPORT _tx_timer_time_slice
IMPORT _tx_thread_system_stack_ptr
IMPORT _tx_thread_preempt_disable
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
IMPORT _tx_execution_thread_enter
IMPORT _tx_execution_thread_exit
#endif
@@ -71,15 +71,6 @@
;/* _tx_thread_system_return Return to system from thread */
;/* _tx_thread_context_restore Restore thread's context */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 03-02-2021 Scott Larson Modified comment(s), add */
-;/* low power code, */
-;/* resulting in version 6.1.5 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
;{
@@ -126,7 +117,7 @@ __tx_PendSVHandler
;
__tx_ts_handler
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
;
; /* Call the thread exit function to indicate the thread is no longer executing. */
;
@@ -209,7 +200,7 @@ __tx_ts_restore
;
STR r5, [r4] ; Setup global time-slice
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
;
; /* Call the thread entry function to indicate the thread is executing. */
;
diff --git a/ports/cortex_m0/ac5/src/tx_thread_stack_build.s b/ports/cortex_m0/ac5/src/tx_thread_stack_build.s
index 8324238a..e1cf9d16 100644
--- a/ports/cortex_m0/ac5/src/tx_thread_stack_build.s
+++ b/ports/cortex_m0/ac5/src/tx_thread_stack_build.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -54,12 +54,6 @@
;/* */
;/* _tx_thread_create Create thread service */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
;{
diff --git a/ports/cortex_m0/ac5/src/tx_thread_system_return.s b/ports/cortex_m0/ac5/src/tx_thread_system_return.s
index d37623fc..db1ab63d 100644
--- a/ports/cortex_m0/ac5/src/tx_thread_system_return.s
+++ b/ports/cortex_m0/ac5/src/tx_thread_system_return.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -54,12 +54,6 @@
;/* */
;/* ThreadX components */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
;{
diff --git a/ports/cortex_m0/ac5/src/tx_timer_interrupt.s b/ports/cortex_m0/ac5/src/tx_timer_interrupt.s
index e6ebbc76..b712487f 100644
--- a/ports/cortex_m0/ac5/src/tx_timer_interrupt.s
+++ b/ports/cortex_m0/ac5/src/tx_timer_interrupt.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -71,12 +71,6 @@
;/* */
;/* interrupt vector */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
;{
diff --git a/ports/cortex_m0/ac6/example_build/sample_threadx/.cproject b/ports/cortex_m0/ac6/example_build/sample_threadx/.cproject
index ca43166b..a6b39187 100644
--- a/ports/cortex_m0/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_m0/ac6/example_build/sample_threadx/.cproject
@@ -1,166 +1,166 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_m0/ac6/example_build/sample_threadx/exceptions.c b/ports/cortex_m0/ac6/example_build/sample_threadx/exceptions.c
index 96597048..47c84ea1 100644
--- a/ports/cortex_m0/ac6/example_build/sample_threadx/exceptions.c
+++ b/ports/cortex_m0/ac6/example_build/sample_threadx/exceptions.c
@@ -1,7 +1,7 @@
/*
** Copyright (c) 2006-2017 Arm Limited (or its affiliates). All rights reserved.
** Use, modification and redistribution of this file is subject to your possession of a
-** valid End User License Agreement for the Arm Product of which these examples are part of
+** valid End User License Agreement for the Arm Product of which these examples are part of
** and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_m0/ac6/example_build/sample_threadx/sample_threadx.c b/ports/cortex_m0/ac6/example_build/sample_threadx/sample_threadx.c
index f400736a..01f48910 100644
--- a/ports/cortex_m0/ac6/example_build/sample_threadx/sample_threadx.c
+++ b/ports/cortex_m0/ac6/example_build/sample_threadx/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -83,42 +83,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -126,23 +126,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -245,11 +245,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -308,7 +308,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -361,7 +361,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m0/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_m0/ac6/example_build/sample_threadx/sample_threadx.scat
index 8578282d..7e806ce3 100644
--- a/ports/cortex_m0/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_m0/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -3,7 +3,7 @@
;*******************************************************
; Copyright (c) 2006-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;*******************************************************
diff --git a/ports/cortex_m0/ac6/example_build/sample_threadx/tx_initialize_low_level.S b/ports/cortex_m0/ac6/example_build/sample_threadx/tx_initialize_low_level.S
index 5786976d..f7e3eb2d 100644
--- a/ports/cortex_m0/ac6/example_build/sample_threadx/tx_initialize_low_level.S
+++ b/ports/cortex_m0/ac6/example_build/sample_threadx/tx_initialize_low_level.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -67,12 +67,6 @@ SYSTICK_CYCLES = ((SYSTEM_CLOCK / 100) -1)
@/* */
@/* _tx_initialize_kernel_enter ThreadX entry function */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* */
@/**************************************************************************/
@VOID _tx_initialize_low_level(VOID)
@{
diff --git a/ports/cortex_m0/ac6/example_build/tx/.cproject b/ports/cortex_m0/ac6/example_build/tx/.cproject
index f4200860..84b4712c 100644
--- a/ports/cortex_m0/ac6/example_build/tx/.cproject
+++ b/ports/cortex_m0/ac6/example_build/tx/.cproject
@@ -1,146 +1,146 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_m0/ac6/inc/tx_port.h b/ports/cortex_m0/ac6/inc/tx_port.h
index 6eedfd3e..9c9e6470 100644
--- a/ports/cortex_m0/ac6/inc/tx_port.h
+++ b/ports/cortex_m0/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,18 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -64,7 +53,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -130,7 +119,7 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
+#ifndef TX_TIMER_THREAD_PRIORITY
#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
@@ -141,8 +130,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0 /* Enable interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((volatile ULONG *) 0x0a800024)
@@ -181,7 +170,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -195,13 +184,13 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
-#define TX_THREAD_EXTENSION_2
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -215,11 +204,11 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -227,8 +216,8 @@ ULONG _tx_misra_time_stamp_get(VOID);
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -256,7 +245,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the get system state macro. */
-
+
#ifndef TX_THREAD_GET_SYSTEM_STATE
#ifndef TX_MISRA_ENABLE
@@ -285,9 +274,9 @@ ULONG _tx_misra_ipsr_get(VOID);
#define TX_THREAD_SYSTEM_RETURN_CHECK(c) (c) = ((ULONG) _tx_thread_preempt_disable);
#endif
-/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
+/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
prevent early scheduling on Cortex-M parts. */
-
+
#define TX_PORT_SPECIFIC_POST_INITIALIZATION _tx_thread_preempt_disable++;
@@ -338,7 +327,7 @@ unsigned int interrupt_save;
interrupt_save = __get_primask_value();
__enable_interrupts();
__restore_interrupts(interrupt_save);
- }
+ }
}
@@ -365,8 +354,8 @@ unsigned int interrupt_save;
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M0/AC6 Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M0/AC6 Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_m0/ac6/readme_threadx.txt b/ports/cortex_m0/ac6/readme_threadx.txt
index a84dfa25..2a3f56f9 100644
--- a/ports/cortex_m0/ac6/readme_threadx.txt
+++ b/ports/cortex_m0/ac6/readme_threadx.txt
@@ -1,18 +1,18 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M0
+ Microsoft's Azure RTOS ThreadX for Cortex-M0
Using ARM Compiler 6 & DS
1. Import the ThreadX Projects
-In order to build the ThreadX library and the ThreadX demonstration, first import
-the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
+In order to build the ThreadX library and the ThreadX demonstration, first import
+the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
into your DS workspace.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply right-click the Eclipse project
-"tx" and then select the "Build Project" button. You should now observe the compilation
+Building the ThreadX library is easy; simply right-click the Eclipse project
+"tx" and then select the "Build Project" button. You should now observe the compilation
and assembly of the ThreadX library. This project build produces the ThreadX
library file tx.a.
@@ -22,27 +22,27 @@ library file tx.a.
The ThreadX demonstration is designed to execute under the DS debugger on the
MPS2_Cortex_M0 Bare Metal simulator.
-Building the demonstration is easy; simply right-click the Eclipse project
-"sample_threadx" and then select the "Build Project" button. You should now observe
-the compilation and assembly of the ThreadX demonstration. This project build produces
-the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
+Building the demonstration is easy; simply right-click the Eclipse project
+"sample_threadx" and then select the "Build Project" button. You should now observe
+the compilation and assembly of the ThreadX demonstration. This project build produces
+the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
in the Project Explorer window, right-click on the 'cortex-m0_tx.launch' file, click
'Debug As', and then click 'cortex-m0_tx' from the submenu. This will cause the
-debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
+debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
to execute the ThreadX demonstration.
4. System Initialization
-The entry point in ThreadX for the Cortex-M0 using AC6 tools uses the standard AC6
+The entry point in ThreadX for the Cortex-M0 using AC6 tools uses the standard AC6
Cortex-M0 reset sequence. From the reset vector the C runtime will be initialized.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.S file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -51,11 +51,11 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M0 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
- Stack Offset Stack Contents
+ Stack Offset Stack Contents
0x00 r8
0x04 r9
@@ -77,29 +77,29 @@ tx_thread_stack_ptr in the associated thread control block TX_THREAD.
6. Improving Performance
-The distribution version of ThreadX is built without any compiler optimizations.
-This makes it easy to debug because you can trace or set breakpoints inside of
-ThreadX itself. Of course, this costs some performance. To make it run faster,
-you can change the build_threadx.bat file to remove the -g option and enable
-all compiler optimizations.
+The distribution version of ThreadX is built without any compiler optimizations.
+This makes it easy to debug because you can trace or set breakpoints inside of
+ThreadX itself. Of course, this costs some performance. To make it run faster,
+you can change the build_threadx.bat file to remove the -g option and enable
+all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M0
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-M0 vectors start at the label __tx_vectors or similar. The application may modify
-the vector area according to its needs. There is code in tx_initialize_low_level() that will
-configure the vector base register.
+the vector area according to its needs. There is code in tx_initialize_low_level() that will
+configure the vector base register.
7.2 Managed Interrupts
@@ -125,7 +125,7 @@ your_assembly_isr:
; VOID your_assembly_isr(VOID)
; {
PUSH {r0, lr}
-;
+;
; /* Do interrupt handler work here */
; /* BL */
@@ -137,8 +137,8 @@ your_assembly_isr:
Note: the Cortex-M0 requires exception handlers to be thumb labels, this implies bit 0 set.
To accomplish this, the declaration of the label has to be preceded by the assembler directive
-.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
-be inserted in the correct location in the interrupt vector table. This table is typically
+.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
+be inserted in the correct location in the interrupt vector table. This table is typically
located in either your runtime startup file or in the tx_initialize_low_level.S file.
diff --git a/ports/cortex_m0/ac6/src/tx_thread_context_restore.S b/ports/cortex_m0/ac6/src/tx_thread_context_restore.S
index a2aedaf0..cf90182f 100644
--- a/ports/cortex_m0/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_m0/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -23,7 +23,7 @@
#include "tx_user.h"
#endif
@
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
.global _tx_execution_isr_exit
#endif
.global _tx_thread_system_state
@@ -73,14 +73,6 @@
@/* */
@/* ISRs Interrupt Service Routines */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@VOID _tx_thread_context_restore(VOID)
@{
diff --git a/ports/cortex_m0/ac6/src/tx_thread_context_save.S b/ports/cortex_m0/ac6/src/tx_thread_context_save.S
index 0a00a628..f2d4f031 100644
--- a/ports/cortex_m0/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_m0/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -23,7 +23,7 @@
#include "tx_user.h"
#endif
@
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
.global _tx_execution_isr_enter
#endif
.global _tx_thread_system_state
@@ -67,14 +67,6 @@
@/* */
@/* ISRs */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@VOID _tx_thread_context_save(VOID)
@{
@@ -82,7 +74,7 @@
.thumb_func
_tx_thread_context_save:
@
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
/* Call the ISR enter function to indicate an ISR is starting. */
PUSH {r0, lr} // Save return address
BL _tx_execution_isr_enter // Call the ISR enter function
diff --git a/ports/cortex_m0/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_m0/ac6/src/tx_thread_interrupt_control.S
index 766b740e..5ce46db8 100644
--- a/ports/cortex_m0/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_m0/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@@ -58,14 +58,6 @@
@/* */
@/* Application Code */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@/* UINT _tx_thread_interrupt_control(UINT new_posture)
{ */
diff --git a/ports/cortex_m0/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_m0/ac6/src/tx_thread_interrupt_disable.S
index 7aa32ba8..be91372b 100644
--- a/ports/cortex_m0/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_m0/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@@ -57,14 +57,6 @@
@/* */
@/* Application Code */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@/* UINT _tx_thread_interrupt_disable(VOID)
{ */
diff --git a/ports/cortex_m0/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_m0/ac6/src/tx_thread_interrupt_restore.S
index 5e61de27..5094b31d 100644
--- a/ports/cortex_m0/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_m0/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@@ -58,14 +58,6 @@
@/* */
@/* Application Code */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@/* VOID _tx_thread_interrupt_restore(UINT old_posture)
{ */
diff --git a/ports/cortex_m0/ac6/src/tx_thread_schedule.S b/ports/cortex_m0/ac6/src/tx_thread_schedule.S
index 0bb81904..552da6ab 100644
--- a/ports/cortex_m0/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_m0/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -27,7 +27,7 @@
.global _tx_thread_execute_ptr
.global _tx_timer_time_slice
.global _tx_thread_system_stack_ptr
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
.global _tx_execution_thread_enter
.global _tx_execution_thread_exit
#endif
@@ -74,17 +74,6 @@
@/* _tx_thread_system_return Return to system from thread */
@/* _tx_thread_context_restore Restore thread's context */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-02-2021 Scott Larson Modified comment(s), add */
-@/* low power code, */
-@/* resulting in version 6.1.5 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@VOID _tx_thread_schedule(VOID)
@{
@@ -139,7 +128,7 @@ __tx_SVCallHandler:
.thumb_func
__tx_ts_handler:
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
@
@ /* Call the thread exit function to indicate the thread is no longer executing. */
@
@@ -222,7 +211,7 @@ __tx_ts_restore:
@
STR r5, [r4] @ Setup global time-slice
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
@
@ /* Call the thread entry function to indicate the thread is executing. */
@
diff --git a/ports/cortex_m0/ac6/src/tx_thread_stack_build.S b/ports/cortex_m0/ac6/src/tx_thread_stack_build.S
index 6a757530..7621d9b7 100644
--- a/ports/cortex_m0/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_m0/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -59,14 +59,6 @@
@/* */
@/* _tx_thread_create Create thread service */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@{
diff --git a/ports/cortex_m0/ac6/src/tx_thread_system_return.S b/ports/cortex_m0/ac6/src/tx_thread_system_return.S
index 009b7210..fc62c0c6 100644
--- a/ports/cortex_m0/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_m0/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -59,14 +59,6 @@
@/* */
@/* ThreadX components */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@/* VOID _tx_thread_system_return(VOID)
@{ */
diff --git a/ports/cortex_m0/ac6/src/tx_timer_interrupt.S b/ports/cortex_m0/ac6/src/tx_timer_interrupt.S
index f45ebfde..01608532 100644
--- a/ports/cortex_m0/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_m0/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -72,14 +72,6 @@
@/* */
@/* interrupt vector */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@VOID _tx_timer_interrupt(VOID)
@{
diff --git a/ports/cortex_m0/gnu/example_build/cortexm0_crt0.S b/ports/cortex_m0/gnu/example_build/cortexm0_crt0.S
index bb530ac5..070871a3 100644
--- a/ports/cortex_m0/gnu/example_build/cortexm0_crt0.S
+++ b/ports/cortex_m0/gnu/example_build/cortexm0_crt0.S
@@ -63,7 +63,7 @@ crt0_ctor_loop:
beq crt0_ctor_end
ldr r2, [r0]
add r0, #4
- push {r0-r1}
+ push {r0-r1}
blx r2
pop {r0-r1}
b crt0_ctor_loop
@@ -83,7 +83,7 @@ start:
/* when main returns, loop forever. */
crt0_exit_loop:
b crt0_exit_loop
-
+
/* Startup helper functions. */
@@ -116,4 +116,3 @@ memory_set_done:
.section .stack, "wa", %nobits
.section .stack_process, "wa", %nobits
.section .heap, "wa", %nobits
-
\ No newline at end of file
diff --git a/ports/cortex_m0/gnu/example_build/cortexm0_vectors.S b/ports/cortex_m0/gnu/example_build/cortexm0_vectors.S
index 6ae558e4..dc8d0aad 100644
--- a/ports/cortex_m0/gnu/example_build/cortexm0_vectors.S
+++ b/ports/cortex_m0/gnu/example_build/cortexm0_vectors.S
@@ -4,8 +4,8 @@
.global __tx_BadHandler
.global __tx_SVCallHandler
.global __tx_DBGHandler
- .global __tx_PendSVHandler
- .global __tx_SysTickHandler
+ .global __tx_PendSVHandler
+ .global __tx_SysTickHandler
.global __tx_BadHandler
.syntax unified
@@ -15,9 +15,9 @@
.global _vectors
_vectors:
- .word __stack_end__
- .word reset_handler
- .word __tx_NMIHandler
+ .word __stack_end__
+ .word reset_handler
+ .word __tx_NMIHandler
.word __tx_HardfaultHandler
.word __tx_BadHandler
.word __tx_BadHandler
@@ -29,7 +29,7 @@ _vectors:
.word __tx_SVCallHandler //_SVC_Handler - used by Threadx scheduler //
.word __tx_DBGHandler
.word 0 // Reserved
- .word __tx_PendSVHandler
+ .word __tx_PendSVHandler
.word __tx_SysTickHandler // Used by Threadx timer functionality
.word __tx_BadHandler // Populate with user Interrupt handler
.word __tx_BadHandler
diff --git a/ports/cortex_m0/gnu/example_build/sample_threadx.c b/ports/cortex_m0/gnu/example_build/sample_threadx.c
index f400736a..01f48910 100644
--- a/ports/cortex_m0/gnu/example_build/sample_threadx.c
+++ b/ports/cortex_m0/gnu/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -83,42 +83,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -126,23 +126,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -245,11 +245,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -308,7 +308,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -361,7 +361,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m0/gnu/example_build/sample_threadx.ld b/ports/cortex_m0/gnu/example_build/sample_threadx.ld
index c65a1346..3f19c29e 100644
--- a/ports/cortex_m0/gnu/example_build/sample_threadx.ld
+++ b/ports/cortex_m0/gnu/example_build/sample_threadx.ld
@@ -10,7 +10,7 @@ __HEAPSIZE__ = 128;
SECTIONS
{
- .vectors :
+ .vectors :
{
KEEP(*(.vectors .vectors.*))
} > FLASH
@@ -45,7 +45,7 @@ SECTIONS
KEEP(*(.eh_frame*))
} > FLASH
- .ARM.extab :
+ .ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > FLASH
@@ -59,7 +59,7 @@ SECTIONS
__data_load_start__ = ALIGN (4);
- .data : AT (__data_load_start__)
+ .data : AT (__data_load_start__)
{
__data_start__ = .;
@@ -89,7 +89,7 @@ SECTIONS
KEEP(*(.jcr*))
. = ALIGN(4);
/* All data end */
-
+
__data_end__ = .;
} > RAM
@@ -104,7 +104,7 @@ SECTIONS
__bss_end__ = .;
} > RAM
-
+
.heap (COPY):
{
__heap_start__ = ALIGN(4);
diff --git a/ports/cortex_m0/gnu/example_build/tx_initialize_low_level.S b/ports/cortex_m0/gnu/example_build/tx_initialize_low_level.S
index fe760077..36738f3d 100644
--- a/ports/cortex_m0/gnu/example_build/tx_initialize_low_level.S
+++ b/ports/cortex_m0/gnu/example_build/tx_initialize_low_level.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -79,16 +79,6 @@ SYSTICK_CYCLES = ((SYSTEM_CLOCK / 100) -1)
@/* */
@/* _tx_initialize_kernel_enter ThreadX entry function */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-@/* 09-30-2020 Scott Larson Modified comment(s), and */
-@/* commented out code for */
-@/* enabling DWT, */
-@/* resulting in version 6.1 */
-@/* */
@/**************************************************************************/
@VOID _tx_initialize_low_level(VOID)
@{
@@ -101,10 +91,10 @@ _tx_initialize_low_level:
CPSID i
@
@ /* Set base of available memory to end of non-initialised RAM area. */
-@
+@
LDR r0, =_tx_initialize_unused_memory @ Build address of unused memory pointer
- LDR r1, =__RAM_segment_used_end__ @ Build first free address
- ADDS r1, r1, #4 @
+ LDR r1, =__RAM_segment_used_end__ @ Build first free address
+ ADDS r1, r1, #4 @
STR r1, [r0] @ Setup first unused memory pointer
@
@ /* Enable the cycle count register. */
@@ -113,15 +103,15 @@ _tx_initialize_low_level:
@ LDR r1, [r0] @ Pickup the current value
@ MOVS r2, #1
@ ORRS r1, r1, r2 @ Set the CYCCNTENA bit
-@ STR r1, [r0] @ Enable the cycle count register
+@ STR r1, [r0] @ Enable the cycle count register
@
@ /* Setup Vector Table Offset Register. */
-@
+@
LDR r0, =0xE000E000 @ Build address of NVIC registers
LDR r2, =0xD08 @ Offset to vector base register
ADD r0, r0, r2 @ Build vector base register
LDR r1, =_vectors @ Pickup address of vector table
- STR r1, [r0] @ Set vector table address
+ STR r1, [r0] @ Set vector table address
@
@ /* Set system stack pointer from vector value. */
@
@@ -133,6 +123,9 @@ _tx_initialize_low_level:
@ /* Configure SysTick for 100Hz clock, or 16384 cycles if no reference. */
@
LDR r0, =0xE000E000 @ Build address of NVIC registers
+ LDR r1, =0
+ STR r1, [r0, #0x10] // Reset SysTick Control
+ STR r1, [r0, #0x18] // Reset SysTick Counter Value
LDR r1, =SYSTICK_CYCLES
STR r1, [r0, #0x14] // Setup SysTick Reload Value
LDR r1, =0x7 // Build SysTick Control Enable Value
@@ -143,18 +136,18 @@ _tx_initialize_low_level:
LDR r1, =0x00000000 // Rsrv, UsgF, BusF, MemM
LDR r0, =0xE000E000 // Build address of NVIC registers
LDR r2, =0xD18 //
- ADD r0, r0, r2 //
+ ADD r0, r0, r2 //
STR r1, [r0] // Setup System Handlers 4-7 Priority Registers
LDR r1, =0xFF000000 // SVCl, Rsrv, Rsrv, Rsrv
LDR r0, =0xE000E000 // Build address of NVIC registers
- LDR r2, =0xD1C //
- ADD r0, r0, r2 //
+ LDR r2, =0xD1C //
+ ADD r0, r0, r2 //
STR r1, [r0] // Setup System Handlers 8-11 Priority Registers
// Note: SVC must be lowest priority, which is 0xFF
LDR r1, =0x40FF0000 // SysT, PnSV, Rsrv, DbgM
LDR r0, =0xE000E000 // Build address of NVIC registers
- LDR r2, =0xD20 //
- ADD r0, r0, r2 //
+ LDR r2, =0xD20 //
+ ADD r0, r0, r2 //
STR r1, [r0] // Setup System Handlers 12-15 Priority Registers
// Note: PnSV must be lowest priority, which is 0xFF
diff --git a/ports/cortex_m0/gnu/inc/tx_port.h b/ports/cortex_m0/gnu/inc/tx_port.h
index fff58dc2..9b315869 100644
--- a/ports/cortex_m0/gnu/inc/tx_port.h
+++ b/ports/cortex_m0/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,20 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 William E. Lamie Modified comment(s), */
-/* resulting in version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -66,7 +53,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -132,7 +119,7 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
+#ifndef TX_TIMER_THREAD_PRIORITY
#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
@@ -143,8 +130,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0 /* Enable interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((volatile ULONG *) 0x0a800024)
@@ -183,7 +170,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -197,13 +184,13 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
-#define TX_THREAD_EXTENSION_2
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -217,11 +204,11 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -229,8 +216,8 @@ ULONG _tx_misra_time_stamp_get(VOID);
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -258,7 +245,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the get system state macro. */
-
+
#ifndef TX_THREAD_GET_SYSTEM_STATE
#ifndef TX_MISRA_ENABLE
@@ -287,9 +274,9 @@ ULONG _tx_misra_ipsr_get(VOID);
#define TX_THREAD_SYSTEM_RETURN_CHECK(c) (c) = ((ULONG) _tx_thread_preempt_disable);
#endif
-/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
+/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
prevent early scheduling on Cortex-M parts. */
-
+
#define TX_PORT_SPECIFIC_POST_INITIALIZATION _tx_thread_preempt_disable++;
@@ -340,7 +327,7 @@ unsigned int interrupt_save;
interrupt_save = __get_primask_value();
__enable_interrupts();
__restore_interrupts(interrupt_save);
- }
+ }
}
@@ -367,8 +354,8 @@ unsigned int interrupt_save;
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M0/GNU Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M0/GNU Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_m0/gnu/readme_threadx.txt b/ports/cortex_m0/gnu/readme_threadx.txt
index 6ef8a028..d7f00f6d 100644
--- a/ports/cortex_m0/gnu/readme_threadx.txt
+++ b/ports/cortex_m0/gnu/readme_threadx.txt
@@ -1,18 +1,18 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M0
+ Microsoft's Azure RTOS ThreadX for Cortex-M0
Using the GNU Tools
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the ARM
-gnu (GNU) compiler. At this point you may run the build_threadx.bat batch file.
-This will build the ThreadX run-time environment in the "example_build"
-directory.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the ARM
+gnu (GNU) compiler. At this point you may run the build_threadx.bat batch file.
+This will build the ThreadX run-time environment in the "example_build"
+directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
@@ -21,25 +21,25 @@ application in order to use ThreadX.
The ThreadX demonstration is designed to execute on Cortex-M0 evaluation boards
or on a dedicated simulator.
-Building the demonstration is easy, simply execute the build_threadx_sample.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy, simply execute the build_threadx_sample.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.out is a binary
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.out is a binary
file that can be downloaded and executed on the a simulator, or downloaded to a board.
3. System Initialization
-The entry point in ThreadX for the Cortex-M0 using gnu tools uses the standard GNU
+The entry point in ThreadX for the Cortex-M0 using gnu tools uses the standard GNU
Cortex-M0 reset sequence. From the reset vector the C runtime will be initialized.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.S file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -48,11 +48,11 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M0 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
- Stack Offset Stack Contents
+ Stack Offset Stack Contents
0x00 r8
0x04 r9
@@ -74,29 +74,29 @@ tx_thread_stack_ptr in the associated thread control block TX_THREAD.
5. Improving Performance
-The distribution version of ThreadX is built without any compiler optimizations.
-This makes it easy to debug because you can trace or set breakpoints inside of
-ThreadX itself. Of course, this costs some performance. To make it run faster,
-you can change the build_threadx.bat file to remove the -g option and enable
-all compiler optimizations.
+The distribution version of ThreadX is built without any compiler optimizations.
+This makes it easy to debug because you can trace or set breakpoints inside of
+ThreadX itself. Of course, this costs some performance. To make it run faster,
+you can change the build_threadx.bat file to remove the -g option and enable
+all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M0
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
6.1 Vector Area
The Cortex-M0 vectors start at the label __tx_vectors or similar. The application may modify
-the vector area according to its needs. There is code in tx_initialize_low_level() that will
-configure the vector base register.
+the vector area according to its needs. There is code in tx_initialize_low_level() that will
+configure the vector base register.
6.2 Managed Interrupts
@@ -122,7 +122,7 @@ your_assembly_isr:
; VOID your_assembly_isr(VOID)
; {
PUSH {r0, lr}
-;
+;
; /* Do interrupt handler work here */
; /* BL */
@@ -134,8 +134,8 @@ your_assembly_isr:
Note: the Cortex-M0 requires exception handlers to be thumb labels, this implies bit 0 set.
To accomplish this, the declaration of the label has to be preceded by the assembler directive
-.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
-be inserted in the correct location in the interrupt vector table. This table is typically
+.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
+be inserted in the correct location in the interrupt vector table. This table is typically
located in either your runtime startup file or in the tx_initialize_low_level.S file.
@@ -151,7 +151,7 @@ information associated with this specific port of ThreadX:
03-02-2021 The following files were changed/added for version 6.1.5:
tx_thread_schedule.s Added low power feature
-09-30-2020 ThreadX update of Cortex-M0/GNU port. The following files were
+09-30-2020 ThreadX update of Cortex-M0/GNU port. The following files were
changed/added for port specific version 6.1:
tx_initialize_low_level.S Comment out DWT code.
diff --git a/ports/cortex_m0/gnu/src/tx_thread_context_restore.S b/ports/cortex_m0/gnu/src/tx_thread_context_restore.S
index 8222f9de..96854867 100644
--- a/ports/cortex_m0/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_m0/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -31,7 +31,7 @@
.global _tx_thread_schedule
.global _tx_thread_preempt_disable
.global _tx_execution_isr_exit
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
.global _tx_execution_isr_exit
#endif
@
@@ -74,17 +74,6 @@
@/* */
@/* ISRs Interrupt Service Routines */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-@/* 09-30-2020 Scott Larson Modified comment(s), and */
-@/* cleaned up whitespace, */
-@/* resulting in version 6.1 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@VOID _tx_thread_context_restore(VOID)
@{
diff --git a/ports/cortex_m0/gnu/src/tx_thread_context_save.S b/ports/cortex_m0/gnu/src/tx_thread_context_save.S
index c7c6a142..9866da13 100644
--- a/ports/cortex_m0/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_m0/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -65,17 +65,6 @@
@/* */
@/* ISRs */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-@/* 09-30-2020 Scott Larson Modified comment(s), and */
-@/* cleaned up whitespace, */
-@/* resulting in version 6.1 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@VOID _tx_thread_context_save(VOID)
@{
@@ -83,7 +72,7 @@
.thumb_func
_tx_thread_context_save:
@
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
/* Call the ISR enter function to indicate an ISR is starting. */
PUSH {r0, lr} // Save return address
BL _tx_execution_isr_enter // Call the ISR enter function
@@ -91,6 +80,6 @@ _tx_thread_context_save:
#endif
/* Context is already saved - just return. */
-
+
BX lr
@}
diff --git a/ports/cortex_m0/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_m0/gnu/src/tx_thread_interrupt_control.S
index 3fc8cc23..cc79fb79 100644
--- a/ports/cortex_m0/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_m0/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@@ -58,16 +58,6 @@
@/* */
@/* Application Code */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-@/* 09-30-2020 William E. Lamie Modified comment(s), */
-@/* resulting in version 6.1 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@/* UINT _tx_thread_interrupt_control(UINT new_posture)
{ */
diff --git a/ports/cortex_m0/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_m0/gnu/src/tx_thread_interrupt_disable.S
index fd3a0ae8..126893d4 100644
--- a/ports/cortex_m0/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_m0/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@@ -57,16 +57,6 @@
@/* */
@/* Application Code */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-@/* 09-30-2020 William E. Lamie Modified comment(s), */
-@/* resulting in version 6.1 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@/* UINT _tx_thread_interrupt_disable(VOID)
{ */
diff --git a/ports/cortex_m0/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_m0/gnu/src/tx_thread_interrupt_restore.S
index 41c5dd21..567ae747 100644
--- a/ports/cortex_m0/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_m0/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@@ -58,16 +58,6 @@
@/* */
@/* Application Code */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-@/* 09-30-2020 William E. Lamie Modified comment(s), */
-@/* resulting in version 6.1 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@/* VOID _tx_thread_interrupt_restore(UINT old_posture)
{ */
diff --git a/ports/cortex_m0/gnu/src/tx_thread_schedule.S b/ports/cortex_m0/gnu/src/tx_thread_schedule.S
index 46d9f8ba..21b6118a 100644
--- a/ports/cortex_m0/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_m0/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -72,19 +72,6 @@
@/* _tx_thread_system_return Return to system from thread */
@/* _tx_thread_context_restore Restore thread's context */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-@/* 09-30-2020 William E. Lamie Modified comment(s), */
-@/* resulting in version 6.1 */
-@/* 03-02-2021 Scott Larson Modified comment(s), add */
-@/* low power code, */
-@/* resulting in version 6.1.5 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@VOID _tx_thread_schedule(VOID)
@{
@@ -139,7 +126,7 @@ __tx_SVCallHandler:
.thumb_func
__tx_ts_handler:
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
@
@ /* Call the thread exit function to indicate the thread is no longer executing. */
@
@@ -222,7 +209,7 @@ __tx_ts_restore:
@
STR r5, [r4] @ Setup global time-slice
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
@
@ /* Call the thread entry function to indicate the thread is executing. */
@
diff --git a/ports/cortex_m0/gnu/src/tx_thread_stack_build.S b/ports/cortex_m0/gnu/src/tx_thread_stack_build.S
index fee960e3..deef33dd 100644
--- a/ports/cortex_m0/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_m0/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -59,20 +59,6 @@
@/* */
@/* _tx_thread_create Create thread service */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-@/* 09-30-2020 William E. Lamie Modified Comment(s), setting */
-@/* R10 to top of stack is not */
-@/* needed. Removed references */
-@/* to stack frame, clean up */
-@/* whitespace, resulting */
-@/* in version 6.1 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@{
diff --git a/ports/cortex_m0/gnu/src/tx_thread_system_return.S b/ports/cortex_m0/gnu/src/tx_thread_system_return.S
index cef9159f..d798994e 100644
--- a/ports/cortex_m0/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_m0/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -59,16 +59,6 @@
@/* */
@/* ThreadX components */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-@/* 09-30-2020 William E. Lamie Modified comment(s), */
-@/* resulting in version 6.1 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@/* VOID _tx_thread_system_return(VOID)
@{ */
diff --git a/ports/cortex_m0/gnu/src/tx_timer_interrupt.S b/ports/cortex_m0/gnu/src/tx_timer_interrupt.S
index 3b64e055..434edc60 100644
--- a/ports/cortex_m0/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_m0/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -72,16 +72,6 @@
@/* */
@/* interrupt vector */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-@/* 09-30-2020 William E. Lamie Modified comment(s), */
-@/* resulting in version 6.1 */
-@/* 03-08-2023 Scott Larson Include tx_user.h, */
-@/* resulting in version 6.2.1 */
-@/* */
@/**************************************************************************/
@VOID _tx_timer_interrupt(VOID)
@{
diff --git a/ports/cortex_m0/iar/CMakeLists.txt b/ports/cortex_m0/iar/CMakeLists.txt
index a524d79f..57be3aeb 100644
--- a/ports/cortex_m0/iar/CMakeLists.txt
+++ b/ports/cortex_m0/iar/CMakeLists.txt
@@ -7,7 +7,7 @@ target_sources(${PROJECT_NAME}
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_save.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_control.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_disable.S
- ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_restore.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_restore.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_schedule.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_build.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_return.S
diff --git a/ports/cortex_m0/iar/example_build/cstartup_M.s b/ports/cortex_m0/iar/example_build/cstartup_M.s
index a498443c..3ae600b5 100644
--- a/ports/cortex_m0/iar/example_build/cstartup_M.s
+++ b/ports/cortex_m0/iar/example_build/cstartup_M.s
@@ -2,16 +2,16 @@
PUBLIC __vector_table
SECTION .text:CODE:REORDER(1)
-
+
;; Keep vector table even if it's not referenced
REQUIRE __vector_table
-
+
THUMB
-
+
;; Forward declaration of sections.
SECTION CSTACK:DATA:NOROOT(3)
SECTION .intvec:CODE:NOROOT(2)
-
+
DATA
__vector_table
@@ -53,7 +53,7 @@ __vector_table
__Reset_Vector:
CPSID i ; Disable interrupts
LDR r0, =__iar_program_start
- BX r0
+ BX r0
NMI_Handler
HardFault_Handler
diff --git a/ports/cortex_m0/iar/example_build/sample_threadx.c b/ports/cortex_m0/iar/example_build/sample_threadx.c
index 95ff3a47..8f1d9757 100644
--- a/ports/cortex_m0/iar/example_build/sample_threadx.c
+++ b/ports/cortex_m0/iar/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -85,7 +85,7 @@ CHAR *pointer;
#ifdef TX_ENABLE_EVENT_TRACE
tx_trace_enable(trace_buffer, sizeof(trace_buffer), 32);
#endif
-
+
/* Create a byte memory pool from which to allocate the thread stacks. */
tx_byte_pool_create(&byte_pool_0, "byte pool 0", byte_pool_memory, DEMO_BYTE_POOL_SIZE);
@@ -96,42 +96,42 @@ CHAR *pointer;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -139,23 +139,23 @@ CHAR *pointer;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -258,11 +258,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -321,7 +321,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -374,7 +374,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m0/iar/example_build/tx_initialize_low_level.s b/ports/cortex_m0/iar/example_build/tx_initialize_low_level.s
index 19469eae..991f7809 100644
--- a/ports/cortex_m0/iar/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_m0/iar/example_build/tx_initialize_low_level.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -74,12 +74,6 @@ __tx_free_memory_start
;/* */
;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
;{
@@ -124,6 +118,9 @@ _tx_initialize_low_level:
; /* Configure SysTick. */
;
LDR r0, =0xE000E000 ; Build address of NVIC registers
+ LDR r1, =0
+ STR r1, [r0, #0x10] ; Reset SysTick Control
+ STR r1, [r0, #0x18] ; Reset SysTick Counter Value
LDR r1, =SYSTICK_CYCLES
STR r1, [r0, #0x14] ; Setup SysTick Reload Value
MOVS r1, #0x7 ; Build SysTick Control Enable Value
diff --git a/ports/cortex_m0/iar/inc/tx_port.h b/ports/cortex_m0/iar/inc/tx_port.h
index 43896ee8..af5f58bb 100644
--- a/ports/cortex_m0/iar/inc/tx_port.h
+++ b/ports/cortex_m0/iar/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,18 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -64,7 +53,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -117,7 +106,7 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
+#ifndef TX_TIMER_THREAD_PRIORITY
#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
@@ -128,8 +117,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0 /* Enable interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((volatile ULONG *) 0x0a800024)
@@ -168,7 +157,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -182,17 +171,17 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -206,11 +195,11 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -220,23 +209,23 @@ ULONG _tx_misra_time_stamp_get(VOID);
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#if (__VER__ < 8000000)
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {_tx_iar_destroy_per_thread_tls_area(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
-#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
+#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#endif
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -265,7 +254,7 @@ void __iar_Initlocks(void);
/* Define the get system state macro. */
-
+
#ifndef TX_THREAD_GET_SYSTEM_STATE
#ifndef TX_MISRA_ENABLE
#define TX_THREAD_GET_SYSTEM_STATE() (_tx_thread_system_state | __get_IPSR())
@@ -282,19 +271,19 @@ ULONG _tx_misra_ipsr_get(VOID);
zero after initialization for Cortex-M ports. */
#ifndef TX_THREAD_SYSTEM_RETURN_CHECK
-#define TX_THREAD_SYSTEM_RETURN_CHECK(c) (c) = ((ULONG) _tx_thread_preempt_disable);
+#define TX_THREAD_SYSTEM_RETURN_CHECK(c) (c) = ((ULONG) _tx_thread_preempt_disable);
#endif
-/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
+/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
prevent early scheduling on Cortex-M parts. */
-
+
#define TX_PORT_SPECIFIC_POST_INITIALIZATION _tx_thread_preempt_disable++;
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -348,8 +337,8 @@ __istate_t interrupt_save;
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M0/IAR Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M0/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m0/iar/readme_threadx.txt b/ports/cortex_m0/iar/readme_threadx.txt
index 580a0736..2d255bfa 100644
--- a/ports/cortex_m0/iar/readme_threadx.txt
+++ b/ports/cortex_m0/iar/readme_threadx.txt
@@ -1,14 +1,14 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M0
+ Microsoft's Azure RTOS ThreadX for Cortex-M0
Using the IAR Tools
1. Building the ThreadX run-time Library
Building the ThreadX library is easy. First, open the Azure RTOS workspace
-azure_rtos.eww. Next, make the TX project the "active project" in the
-IAR Embedded Workbench and select the "Make" button. You should observe
-assembly and compilation of a series of ThreadX source files. This
-results in the ThreadX run-time library file tx.a, which is needed by
+azure_rtos.eww. Next, make the TX project the "active project" in the
+IAR Embedded Workbench and select the "Make" button. You should observe
+assembly and compilation of a series of ThreadX source files. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
@@ -18,31 +18,31 @@ The ThreadX demonstration is designed to execute under the IAR
Windows-based Cortex-M0 simulator.
Building the demonstration is easy; simply make the sample_threadx.ewp project
-the "active project" in the IAR Embedded Workbench and select the
+the "active project" in the IAR Embedded Workbench and select the
"Make" button.
-You should observe the compilation of sample_threadx.c (which is the demonstration
+You should observe the compilation of sample_threadx.c (which is the demonstration
application) and linking with tx.a. The resulting file sample_threadx.out is a
binary file that can be downloaded and executed on IAR's Cortex-M0 simulator.
3. System Initialization
-The entry point in ThreadX for the Cortex-M0 using IAR tools is at label
-__iar_program_start. This is defined within the IAR compiler's startup code.
-In addition, this is where all static and global preset C variable
+The entry point in ThreadX for the Cortex-M0 using IAR tools is at label
+__iar_program_start. This is defined within the IAR compiler's startup code.
+In addition, this is where all static and global preset C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, and a periodic timer interrupt source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, and a periodic timer interrupt source.
By default, the vector area is defined at the top of cstartup_M.s, which is
-a slightly modified from the base IAR file.
+a slightly modified from the base IAR file.
The _tx_initialize_low_level function inside of tx_initialize_low_level.s
-also determines the first available address for use by the application, which
-is supplied as the sole input parameter to your application definition function,
-tx_application_define. To accomplish this, a section is created in
-tx_initialize_low_level.s called FREE_MEM, which must be located after all
+also determines the first available address for use by the application, which
+is supplied as the sole input parameter to your application definition function,
+tx_application_define. To accomplish this, a section is created in
+tx_initialize_low_level.s called FREE_MEM, which must be located after all
other RAM sections in memory.
@@ -51,54 +51,54 @@ other RAM sections in memory.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M0 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
- Stack Offset Stack Contents
+ Stack Offset Stack Contents
0x00 LR Interrupted LR (LR at time of PENDSV)
- 0x04 r4
- 0x08 r5
- 0x0C r6
- 0x10 r7
- 0x14 r8
- 0x18 r9
- 0x1C r10 (sl)
- 0x20 r11
+ 0x04 r4
+ 0x08 r5
+ 0x0C r6
+ 0x10 r7
+ 0x14 r8
+ 0x18 r9
+ 0x1C r10 (sl)
+ 0x20 r11
0x24 r0 (Hardware stack starts here!!)
- 0x28 r1
- 0x2C r2
- 0x30 r3
- 0x34 r12
- 0x38 lr
- 0x3C pc
- 0x40 xPSR
+ 0x28 r1
+ 0x2C r2
+ 0x30 r3
+ 0x34 r12
+ 0x38 lr
+ 0x3C pc
+ 0x40 xPSR
5. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
-project to enable various compiler optimizations.
+project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M3
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
6.1 Vector Area
-The Cortex-M3 vectors start at the label __vector_table and is defined in cstartup_M.s.
+The Cortex-M3 vectors start at the label __vector_table and is defined in cstartup_M.s.
The application may modify the vector area according to its needs.
@@ -138,7 +138,7 @@ should have the following line added (if not already in place):
initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
-The project options "General Options -> Library Configuration" should also have the
+The project options "General Options -> Library Configuration" should also have the
"Enable thread support in library" box selected.
diff --git a/ports/cortex_m0/iar/src/tx_iar.c b/ports/cortex_m0/iar/src/tx_iar.c
index c6092de3..238b485e 100644
--- a/ports/cortex_m0/iar/src/tx_iar.c
+++ b/ports/cortex_m0/iar/src/tx_iar.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,24 +423,24 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#include
+#include
void * __aeabi_read_tp();
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports/cortex_m0/iar/src/tx_thread_context_restore.s b/ports/cortex_m0/iar/src/tx_thread_context_restore.s
index b2fb8162..3bd0af0c 100644
--- a/ports/cortex_m0/iar/src/tx_thread_context_restore.s
+++ b/ports/cortex_m0/iar/src/tx_thread_context_restore.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -67,19 +67,13 @@
;/* */
;/* ISRs Interrupt Service Routines */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
;{
PUBLIC _tx_thread_context_restore
_tx_thread_context_restore:
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
;
; /* Call the ISR exit function to indicate an ISR is complete. */
;
diff --git a/ports/cortex_m0/iar/src/tx_thread_context_save.s b/ports/cortex_m0/iar/src/tx_thread_context_save.s
index 9463b229..1d4d5a1b 100644
--- a/ports/cortex_m0/iar/src/tx_thread_context_save.s
+++ b/ports/cortex_m0/iar/src/tx_thread_context_save.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -61,18 +61,12 @@
;/* */
;/* ISRs */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
;{
PUBLIC _tx_thread_context_save
_tx_thread_context_save:
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
;
; /* Call the ISR enter function to indicate an ISR is starting. */
;
diff --git a/ports/cortex_m0/iar/src/tx_thread_interrupt_control.s b/ports/cortex_m0/iar/src/tx_thread_interrupt_control.s
index 01fbb194..261b1c61 100644
--- a/ports/cortex_m0/iar/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_m0/iar/src/tx_thread_interrupt_control.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -53,12 +53,6 @@
;/* */
;/* Application Code */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
;{
diff --git a/ports/cortex_m0/iar/src/tx_thread_interrupt_disable.s b/ports/cortex_m0/iar/src/tx_thread_interrupt_disable.s
index f64aff1f..3c508fa6 100644
--- a/ports/cortex_m0/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_m0/iar/src/tx_thread_interrupt_disable.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -53,12 +53,6 @@
;/* */
;/* Application Code */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(UINT new_posture)
;{
diff --git a/ports/cortex_m0/iar/src/tx_thread_interrupt_restore.s b/ports/cortex_m0/iar/src/tx_thread_interrupt_restore.s
index b08efc47..5d76a72e 100644
--- a/ports/cortex_m0/iar/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_m0/iar/src/tx_thread_interrupt_restore.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -53,12 +53,6 @@
;/* */
;/* Application Code */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_interrupt_restore(UINT new_posture)
;{
diff --git a/ports/cortex_m0/iar/src/tx_thread_schedule.s b/ports/cortex_m0/iar/src/tx_thread_schedule.s
index b5f05400..8458193e 100644
--- a/ports/cortex_m0/iar/src/tx_thread_schedule.s
+++ b/ports/cortex_m0/iar/src/tx_thread_schedule.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -69,15 +69,6 @@
;/* _tx_thread_system_return Return to system from thread */
;/* _tx_thread_context_restore Restore thread's context */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 03-02-2021 Scott Larson Modified comment(s), add */
-;/* low power code, */
-;/* resulting in version 6.1.5 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
;{
@@ -123,7 +114,7 @@ __tx_PendSVHandler:
;
__tx_ts_handler:
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
;
; /* Call the thread exit function to indicate the thread is no longer executing. */
;
@@ -207,7 +198,7 @@ __tx_ts_restore:
;
STR r5, [r4] ; Setup global time-slice
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
;
; /* Call the thread entry function to indicate the thread is executing. */
;
diff --git a/ports/cortex_m0/iar/src/tx_thread_stack_build.s b/ports/cortex_m0/iar/src/tx_thread_stack_build.s
index 508ccc6d..6c700585 100644
--- a/ports/cortex_m0/iar/src/tx_thread_stack_build.s
+++ b/ports/cortex_m0/iar/src/tx_thread_stack_build.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -55,12 +55,6 @@
;/* */
;/* _tx_thread_create Create thread service */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
;{
diff --git a/ports/cortex_m0/iar/src/tx_thread_system_return.s b/ports/cortex_m0/iar/src/tx_thread_system_return.s
index 8a878783..da8a481e 100644
--- a/ports/cortex_m0/iar/src/tx_thread_system_return.s
+++ b/ports/cortex_m0/iar/src/tx_thread_system_return.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -55,12 +55,6 @@
;/* */
;/* ThreadX components */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
;{
diff --git a/ports/cortex_m0/iar/src/tx_timer_interrupt.s b/ports/cortex_m0/iar/src/tx_timer_interrupt.s
index 8e163a89..25774db7 100644
--- a/ports/cortex_m0/iar/src/tx_timer_interrupt.s
+++ b/ports/cortex_m0/iar/src/tx_timer_interrupt.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -71,12 +71,6 @@
;/* */
;/* interrupt vector */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
;{
diff --git a/ports/cortex_m0/keil/example_build/sample_threadx.c b/ports/cortex_m0/keil/example_build/sample_threadx.c
index 4d95c2ed..dd5ee155 100644
--- a/ports/cortex_m0/keil/example_build/sample_threadx.c
+++ b/ports/cortex_m0/keil/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m0/keil/example_build/tx_initialize_low_level.s b/ports/cortex_m0/keil/example_build/tx_initialize_low_level.s
index f1a83341..3a585477 100644
--- a/ports/cortex_m0/keil/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_m0/keil/example_build/tx_initialize_low_level.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -120,12 +120,6 @@ Reset_Handler
;/* */
;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
;{
@@ -175,6 +169,9 @@ _tx_initialize_low_level
; /* Configure SysTick. */
;
LDR r0, =0xE000E000 ; Build address of NVIC registers
+ LDR r1, =0
+ STR r1, [r0, #0x10] ; Reset SysTick Control
+ STR r1, [r0, #0x18] ; Reset SysTick Counter Value
LDR r1, =SYSTICK_CYCLES
STR r1, [r0, #0x14] ; Setup SysTick Reload Value
MOVS r1, #0x7 ; Build SysTick Control Enable Value
diff --git a/ports/cortex_m0/keil/inc/tx_port.h b/ports/cortex_m0/keil/inc/tx_port.h
index 1be205e8..f163f1c6 100644
--- a/ports/cortex_m0/keil/inc/tx_port.h
+++ b/ports/cortex_m0/keil/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,18 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -64,7 +53,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -113,7 +102,7 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
+#ifndef TX_TIMER_THREAD_PRIORITY
#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
@@ -124,8 +113,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0 /* Enable interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((volatile ULONG *) 0x0a800024)
@@ -164,7 +153,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -178,13 +167,13 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
-#define TX_THREAD_EXTENSION_2
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -198,11 +187,11 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -210,10 +199,10 @@ ULONG _tx_misra_time_stamp_get(VOID);
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
-#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
+#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
#ifndef TX_MISRA_ENABLE
@@ -246,7 +235,7 @@ register unsigned int _ipsr __asm("ipsr");
/* Define the get system state macro. */
-
+
#ifndef TX_THREAD_GET_SYSTEM_STATE
#ifndef TX_MISRA_ENABLE
#define TX_THREAD_GET_SYSTEM_STATE() (_tx_thread_system_state | _ipsr)
@@ -263,19 +252,19 @@ ULONG _tx_misra_ipsr_get(VOID);
zero after initialization for Cortex-M ports. */
#ifndef TX_THREAD_SYSTEM_RETURN_CHECK
-#define TX_THREAD_SYSTEM_RETURN_CHECK(c) (c) = ((ULONG) _tx_thread_preempt_disable);
+#define TX_THREAD_SYSTEM_RETURN_CHECK(c) (c) = ((ULONG) _tx_thread_preempt_disable);
#endif
-/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
+/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
prevent early scheduling on Cortex-M parts. */
-
+
#define TX_PORT_SPECIFIC_POST_INITIALIZATION _tx_thread_preempt_disable++;
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -322,8 +311,8 @@ unsigned int was_masked;
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M0/AC5 Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M0/AC5 Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m0/keil/readme_threadx.txt b/ports/cortex_m0/keil/readme_threadx.txt
index b1c1c0fd..e58cf259 100644
--- a/ports/cortex_m0/keil/readme_threadx.txt
+++ b/ports/cortex_m0/keil/readme_threadx.txt
@@ -1,32 +1,32 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M0
+ Microsoft's Azure RTOS ThreadX for Cortex-M0
Using ARM Compiler 5 (AC5) and Keil Microcontroller Development Kit
1. Building the ThreadX run-time Library
-Building the ThreadX library is easy, simply load the project file
-tx.uvprojx, which is located inside the "example_build" directory.
+Building the ThreadX library is easy, simply load the project file
+tx.uvprojx, which is located inside the "example_build" directory.
Once the ThreadX library files are displayed in the project window,
select the "Build Target" operation and observe the compilation and assembly
-of the ThreadX library. This project build produces the ThreadX library
+of the ThreadX library. This project build produces the ThreadX library
file tx.lib.
2. Demonstration System
The ThreadX demonstration is designed to execute under the Keil simulator or
-Cortex-M0 hardware. This demonstration is slightly smaller than typical ThreadX
+Cortex-M0 hardware. This demonstration is slightly smaller than typical ThreadX
demonstrations, and thus requires less than 7KB of Flash and less than 4KB of RAM.
-Building the demonstration is easy; simply open the ThreadX demonstration
-project file sample_threadx.uvprojx, which is located inside the "example_build"
-directory.
+Building the demonstration is easy; simply open the ThreadX demonstration
+project file sample_threadx.uvprojx, which is located inside the "example_build"
+directory.
-Once open, select the "Build Target" operation and observe the compilation of
-sample_threadx.c (which is the demonstration application) and linking with
+Once open, select the "Build Target" operation and observe the compilation of
+sample_threadx.c (which is the demonstration application) and linking with
tx.lib. The resulting file sample_threadx.axf is a binary file that can be downloaded
-and executed under the uVision simulator or Cortex-M0 hardware.
+and executed under the uVision simulator or Cortex-M0 hardware.
For simulator execution, the following memory regions need to be defined via
the "Debug -> Memory Map" dialog:
@@ -37,17 +37,17 @@ the "Debug -> Memory Map" dialog:
3. System Initialization
-The entry point in ThreadX for the Cortex-M0 using AC5 tools is at label
-__main. This is defined within the AC5 compiler's startup code. In
-addition, this is where all static and global pre-set C variable
+The entry point in ThreadX for the Cortex-M0 using AC5 tools is at label
+__main. This is defined within the AC5 compiler's startup code. In
+addition, this is where all static and global pre-set C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -56,11 +56,11 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M0 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
- Stack Offset Stack Contents
+ Stack Offset Stack Contents
0x00 r8
0x04 r9
@@ -82,21 +82,21 @@ tx_thread_stack_ptr in the associated thread control block TX_THREAD.
5. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
-performance. To make it run faster, you can change the build_threadx.bat file to
-remove the -g option and enable all compiler optimizations.
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
+performance. To make it run faster, you can change the build_threadx.bat file to
+remove the -g option and enable all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M0
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
diff --git a/ports/cortex_m0/keil/src/tx_thread_context_restore.s b/ports/cortex_m0/keil/src/tx_thread_context_restore.s
index 15e74269..6723cd19 100644
--- a/ports/cortex_m0/keil/src/tx_thread_context_restore.s
+++ b/ports/cortex_m0/keil/src/tx_thread_context_restore.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -20,10 +20,10 @@
;/**************************************************************************/
;
;
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
IMPORT _tx_execution_isr_exit
#endif
-
+
;
AREA ||.text||, CODE, READONLY
PRESERVE8
@@ -62,19 +62,13 @@
;/* */
;/* ISRs Interrupt Service Routines */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
;{
EXPORT _tx_thread_context_restore
_tx_thread_context_restore
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
;
; /* Call the ISR exit function to indicate an ISR is complete. */
;
diff --git a/ports/cortex_m0/keil/src/tx_thread_context_save.s b/ports/cortex_m0/keil/src/tx_thread_context_save.s
index 3245b512..d0c2c9e4 100644
--- a/ports/cortex_m0/keil/src/tx_thread_context_save.s
+++ b/ports/cortex_m0/keil/src/tx_thread_context_save.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -20,7 +20,7 @@
;/**************************************************************************/
;
;
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
IMPORT _tx_execution_isr_enter
#endif
;
@@ -61,18 +61,12 @@
;/* */
;/* ISRs */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
;{
EXPORT _tx_thread_context_save
_tx_thread_context_save
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
;
; /* Call the ISR enter function to indicate an ISR is executing. */
;
diff --git a/ports/cortex_m0/keil/src/tx_thread_interrupt_control.s b/ports/cortex_m0/keil/src/tx_thread_interrupt_control.s
index a8504791..be0da62d 100644
--- a/ports/cortex_m0/keil/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_m0/keil/src/tx_thread_interrupt_control.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -52,12 +52,6 @@
;/* */
;/* Application Code */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
;{
diff --git a/ports/cortex_m0/keil/src/tx_thread_interrupt_disable.s b/ports/cortex_m0/keil/src/tx_thread_interrupt_disable.s
index aac316ea..86ab4562 100644
--- a/ports/cortex_m0/keil/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_m0/keil/src/tx_thread_interrupt_disable.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -52,12 +52,6 @@
;/* */
;/* Application Code */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(UINT new_posture)
;{
diff --git a/ports/cortex_m0/keil/src/tx_thread_interrupt_restore.s b/ports/cortex_m0/keil/src/tx_thread_interrupt_restore.s
index b94b9e7b..8e71728a 100644
--- a/ports/cortex_m0/keil/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_m0/keil/src/tx_thread_interrupt_restore.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -52,12 +52,6 @@
;/* */
;/* Application Code */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_interrupt_restore(UINT new_posture)
;{
diff --git a/ports/cortex_m0/keil/src/tx_thread_schedule.s b/ports/cortex_m0/keil/src/tx_thread_schedule.s
index f9fa8184..f900848b 100644
--- a/ports/cortex_m0/keil/src/tx_thread_schedule.s
+++ b/ports/cortex_m0/keil/src/tx_thread_schedule.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -25,7 +25,7 @@
IMPORT _tx_timer_time_slice
IMPORT _tx_thread_system_stack_ptr
IMPORT _tx_thread_preempt_disable
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
IMPORT _tx_execution_thread_enter
IMPORT _tx_execution_thread_exit
#endif
@@ -71,15 +71,6 @@
;/* _tx_thread_system_return Return to system from thread */
;/* _tx_thread_context_restore Restore thread's context */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 03-02-2021 Scott Larson Modified comment(s), add */
-;/* low power code, */
-;/* resulting in version 6.1.5 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
;{
@@ -126,7 +117,7 @@ __tx_PendSVHandler
;
__tx_ts_handler
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
;
; /* Call the thread exit function to indicate the thread is no longer executing. */
;
@@ -210,7 +201,7 @@ __tx_ts_restore
;
STR r5, [r4] ; Setup global time-slice
-#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
+#if (defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE))
;
; /* Call the thread entry function to indicate the thread is executing. */
;
diff --git a/ports/cortex_m0/keil/src/tx_thread_stack_build.s b/ports/cortex_m0/keil/src/tx_thread_stack_build.s
index 8324238a..e1cf9d16 100644
--- a/ports/cortex_m0/keil/src/tx_thread_stack_build.s
+++ b/ports/cortex_m0/keil/src/tx_thread_stack_build.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -54,12 +54,6 @@
;/* */
;/* _tx_thread_create Create thread service */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
;{
diff --git a/ports/cortex_m0/keil/src/tx_thread_system_return.s b/ports/cortex_m0/keil/src/tx_thread_system_return.s
index d37623fc..db1ab63d 100644
--- a/ports/cortex_m0/keil/src/tx_thread_system_return.s
+++ b/ports/cortex_m0/keil/src/tx_thread_system_return.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -54,12 +54,6 @@
;/* */
;/* ThreadX components */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
;{
diff --git a/ports/cortex_m0/keil/src/tx_timer_interrupt.s b/ports/cortex_m0/keil/src/tx_timer_interrupt.s
index e6ebbc76..b712487f 100644
--- a/ports/cortex_m0/keil/src/tx_timer_interrupt.s
+++ b/ports/cortex_m0/keil/src/tx_timer_interrupt.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -71,12 +71,6 @@
;/* */
;/* interrupt vector */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
;{
diff --git a/ports/cortex_m23/ac6/example_build/ARMCM23_TZ_config.txt b/ports/cortex_m23/ac6/example_build/ARMCM23_TZ_config.txt
index 0d31ad76..3ea82e17 100644
--- a/ports/cortex_m23/ac6/example_build/ARMCM23_TZ_config.txt
+++ b/ports/cortex_m23/ac6/example_build/ARMCM23_TZ_config.txt
@@ -2,7 +2,7 @@
# instance.parameter=value #(type, mode) default = 'def value' : description : [min..max]
#----------------------------------------------------------------------------------------------
cpu0.semihosting-enable=0 # (bool , init-time) default = '1' : Enable semihosting SVC traps. Applications that do not use semihosting must set this parameter to false.
-idau.NUM_IDAU_REGION=0x0 # (int , init-time) default = '0xA' :
+idau.NUM_IDAU_REGION=0x0 # (int , init-time) default = '0xA' :
cpu0.SECEXT=1 # (bool , init-time) default = '1' : Whether the ARMv8-M Security Extensions are included
fvp_mps2.platform_type=0x0 # (int , init-time) default = '0x0' : 0:MPS2 ; 1:IoT Kit ; 2:Castor : [0x0..0x2]
fvp_mps2.DISABLE_GATING=1 # (bool , init-time) default = '0' : Disable Memory gating logic
diff --git a/ports/cortex_m23/ac6/example_build/RTE/_ThreadX_Library_Project/RTE_Components.h b/ports/cortex_m23/ac6/example_build/RTE/_ThreadX_Library_Project/RTE_Components.h
index 476361d7..66e03dff 100644
--- a/ports/cortex_m23/ac6/example_build/RTE/_ThreadX_Library_Project/RTE_Components.h
+++ b/ports/cortex_m23/ac6/example_build/RTE/_ThreadX_Library_Project/RTE_Components.h
@@ -3,8 +3,8 @@
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
- * Project: 'ThreadX_Library'
- * Target: 'ThreadX_Library_Project'
+ * Project: 'ThreadX_Library'
+ * Target: 'ThreadX_Library_Project'
*/
#ifndef RTE_COMPONENTS_H
@@ -12,7 +12,7 @@
/*
- * Define the Device Header File:
+ * Define the Device Header File:
*/
#define CMSIS_device_header "ARMCM23_TZ.h"
diff --git a/ports/cortex_m23/ac6/example_build/demo_secure_zone/Abstract.txt b/ports/cortex_m23/ac6/example_build/demo_secure_zone/Abstract.txt
index 0d1d8c52..f2b8a819 100644
--- a/ports/cortex_m23/ac6/example_build/demo_secure_zone/Abstract.txt
+++ b/ports/cortex_m23/ac6/example_build/demo_secure_zone/Abstract.txt
@@ -1,10 +1,10 @@
This ARM Cortex-M33 secure/non-secure example project that
-shows the setup of the CMSIS-RTOS2 RTX for TrustZone for
-ARMv8-M applications.
+shows the setup of the CMSIS-RTOS2 RTX for TrustZone for
+ARMv8-M applications.
The application uses CMSIS and can be executed on a Fixed
-Virtual Platform (FVP) simulation model. The application
-demonstrates three RTOS threads.
+Virtual Platform (FVP) simulation model. The application
+demonstrates three RTOS threads.
Secure application:
diff --git a/ports/cortex_m23/ac6/example_build/demo_secure_zone/RTE/Device/ARMCM23_TZ/partition_ARMCM23.h b/ports/cortex_m23/ac6/example_build/demo_secure_zone/RTE/Device/ARMCM23_TZ/partition_ARMCM23.h
index 77383657..6988d132 100644
--- a/ports/cortex_m23/ac6/example_build/demo_secure_zone/RTE/Device/ARMCM23_TZ/partition_ARMCM23.h
+++ b/ports/cortex_m23/ac6/example_build/demo_secure_zone/RTE/Device/ARMCM23_TZ/partition_ARMCM23.h
@@ -326,7 +326,7 @@
// <0=>Secure
// <1=>Non-Secure
// Value for SCB->ICSR register bit STTNS
-// only for single SysTick implementation
+// only for single SysTick implementation
*/
#define SCB_ICSR_STTNS_VAL 0
diff --git a/ports/cortex_m23/ac6/example_build/demo_secure_zone/RTE/Device/ARMCM23_TZ/system_ARMCM23.c b/ports/cortex_m23/ac6/example_build/demo_secure_zone/RTE/Device/ARMCM23_TZ/system_ARMCM23.c
index cf78a4ed..a79cb61d 100644
--- a/ports/cortex_m23/ac6/example_build/demo_secure_zone/RTE/Device/ARMCM23_TZ/system_ARMCM23.c
+++ b/ports/cortex_m23/ac6/example_build/demo_secure_zone/RTE/Device/ARMCM23_TZ/system_ARMCM23.c
@@ -77,7 +77,7 @@ void SystemInit (void)
#endif
SystemCoreClock = SYSTEM_CLOCK;
-
+
*(uint32_t *)0xE000ED24 = 0x000F0000; /* S: enable secure, usage, bus, mem faults */
*(uint32_t *)0xE002ED24 = 0x000F0000; /* NS: enable secure, usage, bus, mem faults */
}
diff --git a/ports/cortex_m23/ac6/example_build/demo_secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h b/ports/cortex_m23/ac6/example_build/demo_secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
index a37b412e..40fc81c1 100644
--- a/ports/cortex_m23/ac6/example_build/demo_secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
+++ b/ports/cortex_m23/ac6/example_build/demo_secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
@@ -3,8 +3,8 @@
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
- * Project: 'demo_secure_zone'
- * Target: 'FVP Simulation Model'
+ * Project: 'demo_secure_zone'
+ * Target: 'FVP Simulation Model'
*/
#ifndef RTE_COMPONENTS_H
@@ -12,7 +12,7 @@
/*
- * Define the Device Header File:
+ * Define the Device Header File:
*/
#define CMSIS_device_header "ARMCM23_TZ.h"
diff --git a/ports/cortex_m23/ac6/example_build/demo_secure_zone/interface.c b/ports/cortex_m23/ac6/example_build/demo_secure_zone/interface.c
index 4e6e8eee..af6533c3 100644
--- a/ports/cortex_m23/ac6/example_build/demo_secure_zone/interface.c
+++ b/ports/cortex_m23/ac6/example_build/demo_secure_zone/interface.c
@@ -31,19 +31,19 @@
typedef funcptr funcptr_NS __attribute__((cmse_nonsecure_call));
/* Non-secure callable (entry) function */
-int func1(int x) __attribute__((cmse_nonsecure_entry)) {
- return x+3;
+int func1(int x) __attribute__((cmse_nonsecure_entry)) {
+ return x+3;
}
/* Non-secure callable (entry) function, calling a non-secure callback function */
int func2(funcptr callback, int x) __attribute__((cmse_nonsecure_entry)) {
funcptr_NS callback_NS; // non-secure callback function pointer
int y;
-
+
/* return function pointer with cleared LSB */
callback_NS = (funcptr_NS)cmse_nsfptr_create(callback);
-
+
y = callback_NS (x+1);
-
+
return (y+2);
}
diff --git a/ports/cortex_m23/ac6/example_build/demo_secure_zone/main_ns.c b/ports/cortex_m23/ac6/example_build/demo_secure_zone/main_ns.c
index 5d16e1bb..31ca367c 100644
--- a/ports/cortex_m23/ac6/example_build/demo_secure_zone/main_ns.c
+++ b/ports/cortex_m23/ac6/example_build/demo_secure_zone/main_ns.c
@@ -63,7 +63,7 @@ void ThreadA (void *argument) {
static int callbackB (int val) {
uint32_t flags;
-
+
flags = osThreadFlagsWait (1U, osFlagsWaitAny, osWaitForever);
if (flags == 1U) {
return (val+1);
diff --git a/ports/cortex_m23/ac6/example_build/demo_secure_zone/main_s.c b/ports/cortex_m23/ac6/example_build/demo_secure_zone/main_s.c
index 2c667821..74fa242e 100644
--- a/ports/cortex_m23/ac6/example_build/demo_secure_zone/main_s.c
+++ b/ports/cortex_m23/ac6/example_build/demo_secure_zone/main_s.c
@@ -24,36 +24,36 @@
* Title: Code template for secure main function
*
*---------------------------------------------------------------------------*/
-
+
/* Use CMSE intrinsics */
#include
#include
#include "RTE_Components.h"
#include CMSIS_device_header
-
+
/* TZ_START_NS: Start address of non-secure application */
#ifndef TZ_START_NS
#define TZ_START_NS (0x200000U)
#endif
-
+
/* typedef for non-secure callback functions */
typedef void (*funcptr_void) (void) __attribute__((cmse_nonsecure_call));
-
+
/* Secure main() */
int main(void) {
funcptr_void NonSecure_ResetHandler;
-
+
/* Add user setup code for secure part here*/
-
+
/* Set non-secure main stack (MSP_NS) */
__TZ_set_MSP_NS(*((uint32_t *)(TZ_START_NS)));
-
+
/* Get non-secure reset handler */
NonSecure_ResetHandler = (funcptr_void)(*((uint32_t *)((TZ_START_NS) + 4U)));
-
+
/* Start non-secure state software application */
NonSecure_ResetHandler();
-
+
/* Non-secure software does not return, this code is not executed */
while (1) {
__NOP();
diff --git a/ports/cortex_m23/ac6/example_build/demo_secure_zone/tx_secure_interface.h b/ports/cortex_m23/ac6/example_build/demo_secure_zone/tx_secure_interface.h
index b5a76bfb..63f683c1 100644
--- a/ports/cortex_m23/ac6/example_build/demo_secure_zone/tx_secure_interface.h
+++ b/ports/cortex_m23/ac6/example_build/demo_secure_zone/tx_secure_interface.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,12 +38,6 @@
/* It is assumed that tx_api.h and tx_port.h have already been */
/* included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_SECURE_INTERFACE_H
diff --git a/ports/cortex_m23/ac6/example_build/demo_secure_zone/tz_context.c b/ports/cortex_m23/ac6/example_build/demo_secure_zone/tz_context.c
index f3152890..ca7f0c56 100644
--- a/ports/cortex_m23/ac6/example_build/demo_secure_zone/tz_context.c
+++ b/ports/cortex_m23/ac6/example_build/demo_secure_zone/tz_context.c
@@ -24,7 +24,7 @@
* Title: Context Management for ARMv8-M TrustZone - Sample implementation
*
*---------------------------------------------------------------------------*/
-
+
#include "RTE_Components.h"
#include CMSIS_device_header
#include "tz_context.h"
diff --git a/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/CMSIS/RTX_Config.c b/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/CMSIS/RTX_Config.c
index e4871014..d0f6b08b 100644
--- a/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/CMSIS/RTX_Config.c
+++ b/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/CMSIS/RTX_Config.c
@@ -24,17 +24,17 @@
*
* -----------------------------------------------------------------------------
*/
-
+
#include "cmsis_compiler.h"
#include "rtx_os.h"
-
+
// OS Idle Thread
__WEAK __NO_RETURN void osRtxIdleThread (void *argument) {
(void)argument;
for (;;) {}
}
-
+
// OS Error Callback function
__WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) {
(void)object_id;
diff --git a/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/CMSIS/RTX_Config.h b/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/CMSIS/RTX_Config.h
index 3021efbc..49fc392e 100644
--- a/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/CMSIS/RTX_Config.h
+++ b/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/CMSIS/RTX_Config.h
@@ -24,52 +24,52 @@
*
* -----------------------------------------------------------------------------
*/
-
+
#ifndef RTX_CONFIG_H_
#define RTX_CONFIG_H_
-
+
#ifdef _RTE_
#include "RTE_Components.h"
#ifdef RTE_RTX_CONFIG_H
#include RTE_RTX_CONFIG_H
#endif
#endif
-
+
//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
-
+
// System Configuration
// =======================
-
+
// Global Dynamic Memory size [bytes] <0-1073741824:8>
// Defines the combined global dynamic memory size.
// Default: 4096
#ifndef OS_DYNAMIC_MEM_SIZE
#define OS_DYNAMIC_MEM_SIZE 4096
#endif
-
+
// Kernel Tick Frequency [Hz] <1-1000000>
// Defines base time unit for delays and timeouts.
// Default: 1000 (1ms tick)
#ifndef OS_TICK_FREQ
#define OS_TICK_FREQ 1000
#endif
-
+
// Round-Robin Thread switching
// Enables Round-Robin Thread switching.
#ifndef OS_ROBIN_ENABLE
#define OS_ROBIN_ENABLE 1
#endif
-
+
// Round-Robin Timeout <1-1000>
// Defines how many ticks a thread will execute before a thread switch.
// Default: 5
#ifndef OS_ROBIN_TIMEOUT
#define OS_ROBIN_TIMEOUT 5
#endif
-
+
//
-
-// ISR FIFO Queue
+
+// ISR FIFO Queue
// <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries
// <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries
// <96=> 96 entries <128=> 128 entries <196=> 196 entries <256=> 256 entries
@@ -78,38 +78,38 @@
#ifndef OS_ISR_FIFO_QUEUE
#define OS_ISR_FIFO_QUEUE 16
#endif
-
+
// Object Memory usage counters
// Enables object memory usage counters (requires RTX source variant).
#ifndef OS_OBJ_MEM_USAGE
#define OS_OBJ_MEM_USAGE 0
#endif
-
+
//
-
+
// Thread Configuration
// =======================
-
+
// Object specific Memory allocation
// Enables object specific memory allocation.
#ifndef OS_THREAD_OBJ_MEM
#define OS_THREAD_OBJ_MEM 0
#endif
-
+
// Number of user Threads <1-1000>
// Defines maximum number of user threads that can be active at the same time.
// Applies to user threads with system provided memory for control blocks.
#ifndef OS_THREAD_NUM
#define OS_THREAD_NUM 1
#endif
-
+
// Number of user Threads with default Stack size <0-1000>
// Defines maximum number of user threads with default stack size.
// Applies to user threads with zero stack size specified.
#ifndef OS_THREAD_DEF_STACK_NUM
#define OS_THREAD_DEF_STACK_NUM 0
#endif
-
+
// Total Stack size [bytes] for user Threads with user-provided Stack size <0-1073741824:8>
// Defines the combined stack size for user threads with user-provided stack size.
// Applies to user threads with user-provided stack size and system provided memory for stack.
@@ -117,23 +117,23 @@
#ifndef OS_THREAD_USER_STACK_SIZE
#define OS_THREAD_USER_STACK_SIZE 0
#endif
-
+
//
-
+
// Default Thread Stack size [bytes] <96-1073741824:8>
// Defines stack size for threads with zero stack size specified.
// Default: 256
#ifndef OS_STACK_SIZE
#define OS_STACK_SIZE 256
#endif
-
+
// Idle Thread Stack size [bytes] <72-1073741824:8>
// Defines stack size for Idle thread.
// Default: 256
#ifndef OS_IDLE_THREAD_STACK_SIZE
#define OS_IDLE_THREAD_STACK_SIZE 256
#endif
-
+
// Idle Thread TrustZone Module Identifier
// Defines TrustZone Thread Context Management Identifier.
// Applies only to cores with TrustZone technology.
@@ -141,49 +141,49 @@
#ifndef OS_IDLE_THREAD_TZ_MOD_ID
#define OS_IDLE_THREAD_TZ_MOD_ID 0
#endif
-
+
// Stack overrun checking
// Enables stack overrun check at thread switch.
// Enabling this option increases slightly the execution time of a thread switch.
#ifndef OS_STACK_CHECK
#define OS_STACK_CHECK 1
#endif
-
+
// Stack usage watermark
// Initializes thread stack with watermark pattern for analyzing stack usage.
// Enabling this option increases significantly the execution time of thread creation.
#ifndef OS_STACK_WATERMARK
#define OS_STACK_WATERMARK 0
#endif
-
-// Processor mode for Thread execution
-// <0=> Unprivileged mode
+
+// Processor mode for Thread execution
+// <0=> Unprivileged mode
// <1=> Privileged mode
// Default: Privileged mode
#ifndef OS_PRIVILEGE_MODE
#define OS_PRIVILEGE_MODE 1
#endif
-
+
//
-
+
// Timer Configuration
// ======================
-
+
// Object specific Memory allocation
// Enables object specific memory allocation.
#ifndef OS_TIMER_OBJ_MEM
#define OS_TIMER_OBJ_MEM 0
#endif
-
+
// Number of Timer objects <1-1000>
// Defines maximum number of objects that can be active at the same time.
// Applies to objects with system provided memory for control blocks.
#ifndef OS_TIMER_NUM
#define OS_TIMER_NUM 1
#endif
-
+
//
-
+
// Timer Thread Priority
// <8=> Low
// <16=> Below Normal <24=> Normal <32=> Above Normal
@@ -194,7 +194,7 @@
#ifndef OS_TIMER_THREAD_PRIO
#define OS_TIMER_THREAD_PRIO 40
#endif
-
+
// Timer Thread Stack size [bytes] <0-1073741824:8>
// Defines stack size for Timer thread.
// May be set to 0 when timers are not used.
@@ -202,7 +202,7 @@
#ifndef OS_TIMER_THREAD_STACK_SIZE
#define OS_TIMER_THREAD_STACK_SIZE 256
#endif
-
+
// Timer Thread TrustZone Module Identifier
// Defines TrustZone Thread Context Management Identifier.
// Applies only to cores with TrustZone technology.
@@ -210,7 +210,7 @@
#ifndef OS_TIMER_THREAD_TZ_MOD_ID
#define OS_TIMER_THREAD_TZ_MOD_ID 0
#endif
-
+
// Timer Callback Queue entries <0-256>
// Number of concurrent active timer callback functions.
// May be set to 0 when timers are not used.
@@ -218,85 +218,85 @@
#ifndef OS_TIMER_CB_QUEUE
#define OS_TIMER_CB_QUEUE 4
#endif
-
+
//
-
+
// Event Flags Configuration
// ============================
-
+
// Object specific Memory allocation
// Enables object specific memory allocation.
#ifndef OS_EVFLAGS_OBJ_MEM
#define OS_EVFLAGS_OBJ_MEM 0
#endif
-
+
// Number of Event Flags objects <1-1000>
// Defines maximum number of objects that can be active at the same time.
// Applies to objects with system provided memory for control blocks.
#ifndef OS_EVFLAGS_NUM
#define OS_EVFLAGS_NUM 1
#endif
-
+
//
-
+
//
-
+
// Mutex Configuration
// ======================
-
+
// Object specific Memory allocation
// Enables object specific memory allocation.
#ifndef OS_MUTEX_OBJ_MEM
#define OS_MUTEX_OBJ_MEM 0
#endif
-
+
// Number of Mutex objects <1-1000>
// Defines maximum number of objects that can be active at the same time.
// Applies to objects with system provided memory for control blocks.
#ifndef OS_MUTEX_NUM
#define OS_MUTEX_NUM 1
#endif
-
+
//
-
+
//
-
+
// Semaphore Configuration
// ==========================
-
+
// Object specific Memory allocation
// Enables object specific memory allocation.
#ifndef OS_SEMAPHORE_OBJ_MEM
#define OS_SEMAPHORE_OBJ_MEM 0
#endif
-
+
// Number of Semaphore objects <1-1000>
// Defines maximum number of objects that can be active at the same time.
// Applies to objects with system provided memory for control blocks.
#ifndef OS_SEMAPHORE_NUM
#define OS_SEMAPHORE_NUM 1
#endif
-
+
//
-
+
//
-
+
// Memory Pool Configuration
// ============================
-
+
// Object specific Memory allocation
// Enables object specific memory allocation.
#ifndef OS_MEMPOOL_OBJ_MEM
#define OS_MEMPOOL_OBJ_MEM 0
#endif
-
+
// Number of Memory Pool objects <1-1000>
// Defines maximum number of objects that can be active at the same time.
// Applies to objects with system provided memory for control blocks.
#ifndef OS_MEMPOOL_NUM
#define OS_MEMPOOL_NUM 1
#endif
-
+
// Data Storage Memory size [bytes] <0-1073741824:8>
// Defines the combined data storage memory size.
// Applies to objects with system provided memory for data storage.
@@ -304,27 +304,27 @@
#ifndef OS_MEMPOOL_DATA_SIZE
#define OS_MEMPOOL_DATA_SIZE 0
#endif
-
+
//
-
+
//
-
+
// Message Queue Configuration
// ==============================
-
+
// Object specific Memory allocation
// Enables object specific memory allocation.
#ifndef OS_MSGQUEUE_OBJ_MEM
#define OS_MSGQUEUE_OBJ_MEM 0
#endif
-
+
// Number of Message Queue objects <1-1000>
// Defines maximum number of objects that can be active at the same time.
// Applies to objects with system provided memory for control blocks.
#ifndef OS_MSGQUEUE_NUM
#define OS_MSGQUEUE_NUM 1
#endif
-
+
// Data Storage Memory size [bytes] <0-1073741824:8>
// Defines the combined data storage memory size.
// Applies to objects with system provided memory for data storage.
@@ -332,26 +332,26 @@
#ifndef OS_MSGQUEUE_DATA_SIZE
#define OS_MSGQUEUE_DATA_SIZE 0
#endif
-
+
//
-
+
//
-
+
// Event Recorder Configuration
// ===============================
-
+
// Global Initialization
// Initialize Event Recorder during 'osKernelInitialize'.
#ifndef OS_EVR_INIT
#define OS_EVR_INIT 0
#endif
-
+
// Start recording
// Start event recording after initialization.
#ifndef OS_EVR_START
#define OS_EVR_START 1
#endif
-
+
// Global Event Filter Setup
// Initial recording level applied to all components.
// Error events
@@ -362,11 +362,11 @@
#ifndef OS_EVR_LEVEL
#define OS_EVR_LEVEL 0x00U
#endif
-
+
// RTOS Event Filter Setup
// Recording levels for RTX components.
// Only applicable if events for the respective component are generated.
-
+
// Memory Management
// Recording level for Memory Management events.
// Error events
@@ -374,10 +374,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_MEMORY_LEVEL
+#ifndef OS_EVR_MEMORY_LEVEL
#define OS_EVR_MEMORY_LEVEL 0x01U
#endif
-
+
// Kernel
// Recording level for Kernel events.
// Error events
@@ -385,10 +385,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_KERNEL_LEVEL
+#ifndef OS_EVR_KERNEL_LEVEL
#define OS_EVR_KERNEL_LEVEL 0x01U
#endif
-
+
// Thread
// Recording level for Thread events.
// Error events
@@ -396,10 +396,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_THREAD_LEVEL
+#ifndef OS_EVR_THREAD_LEVEL
#define OS_EVR_THREAD_LEVEL 0x05U
#endif
-
+
// Generic Wait
// Recording level for Generic Wait events.
// Error events
@@ -407,10 +407,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_WAIT_LEVEL
+#ifndef OS_EVR_WAIT_LEVEL
#define OS_EVR_WAIT_LEVEL 0x01U
#endif
-
+
// Thread Flags
// Recording level for Thread Flags events.
// Error events
@@ -418,10 +418,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_THFLAGS_LEVEL
+#ifndef OS_EVR_THFLAGS_LEVEL
#define OS_EVR_THFLAGS_LEVEL 0x01U
#endif
-
+
// Event Flags
// Recording level for Event Flags events.
// Error events
@@ -429,10 +429,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_EVFLAGS_LEVEL
+#ifndef OS_EVR_EVFLAGS_LEVEL
#define OS_EVR_EVFLAGS_LEVEL 0x01U
#endif
-
+
// Timer
// Recording level for Timer events.
// Error events
@@ -440,10 +440,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_TIMER_LEVEL
+#ifndef OS_EVR_TIMER_LEVEL
#define OS_EVR_TIMER_LEVEL 0x01U
#endif
-
+
// Mutex
// Recording level for Mutex events.
// Error events
@@ -451,10 +451,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_MUTEX_LEVEL
+#ifndef OS_EVR_MUTEX_LEVEL
#define OS_EVR_MUTEX_LEVEL 0x01U
#endif
-
+
// Semaphore
// Recording level for Semaphore events.
// Error events
@@ -462,10 +462,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_SEMAPHORE_LEVEL
+#ifndef OS_EVR_SEMAPHORE_LEVEL
#define OS_EVR_SEMAPHORE_LEVEL 0x01U
#endif
-
+
// Memory Pool
// Recording level for Memory Pool events.
// Error events
@@ -473,10 +473,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_MEMPOOL_LEVEL
+#ifndef OS_EVR_MEMPOOL_LEVEL
#define OS_EVR_MEMPOOL_LEVEL 0x01U
#endif
-
+
// Message Queue
// Recording level for Message Queue events.
// Error events
@@ -484,87 +484,87 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_MSGQUEUE_LEVEL
+#ifndef OS_EVR_MSGQUEUE_LEVEL
#define OS_EVR_MSGQUEUE_LEVEL 0x01U
#endif
-
+
//
-
+
//
-
+
// RTOS Event Generation
// Enables event generation for RTX components (requires RTX source variant).
-
+
// Memory Management
// Enables Memory Management event generation.
#ifndef OS_EVR_MEMORY
#define OS_EVR_MEMORY 1
#endif
-
+
// Kernel
// Enables Kernel event generation.
#ifndef OS_EVR_KERNEL
#define OS_EVR_KERNEL 1
#endif
-
+
// Thread
// Enables Thread event generation.
#ifndef OS_EVR_THREAD
#define OS_EVR_THREAD 1
#endif
-
+
// Generic Wait
// Enables Generic Wait event generation.
#ifndef OS_EVR_WAIT
#define OS_EVR_WAIT 1
#endif
-
+
// Thread Flags
// Enables Thread Flags event generation.
#ifndef OS_EVR_THFLAGS
#define OS_EVR_THFLAGS 1
#endif
-
+
// Event Flags
// Enables Event Flags event generation.
#ifndef OS_EVR_EVFLAGS
#define OS_EVR_EVFLAGS 1
#endif
-
+
// Timer
// Enables Timer event generation.
#ifndef OS_EVR_TIMER
#define OS_EVR_TIMER 1
#endif
-
+
// Mutex
// Enables Mutex event generation.
#ifndef OS_EVR_MUTEX
#define OS_EVR_MUTEX 1
#endif
-
+
// Semaphore
// Enables Semaphore event generation.
#ifndef OS_EVR_SEMAPHORE
#define OS_EVR_SEMAPHORE 1
#endif
-
+
// Memory Pool
// Enables Memory Pool event generation.
#ifndef OS_EVR_MEMPOOL
#define OS_EVR_MEMPOOL 1
#endif
-
+
// Message Queue
// Enables Message Queue event generation.
#ifndef OS_EVR_MSGQUEUE
#define OS_EVR_MSGQUEUE 1
#endif
-
+
//
-
+
//
-
+
// Number of Threads which use standard C/C++ library libspace
// (when thread specific memory allocation is not used).
#if (OS_THREAD_OBJ_MEM == 0)
@@ -572,7 +572,7 @@
#else
#define OS_THREAD_LIBSPACE_NUM OS_THREAD_NUM
#endif
-
+
//------------- <<< end of configuration section >>> ---------------------------
-
+
#endif // RTX_CONFIG_H_
diff --git a/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/Device/ARMCM23_TZ/partition_ARMCM23.h b/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/Device/ARMCM23_TZ/partition_ARMCM23.h
index a7a090e7..3cb7eeb4 100644
--- a/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/Device/ARMCM23_TZ/partition_ARMCM23.h
+++ b/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/Device/ARMCM23_TZ/partition_ARMCM23.h
@@ -326,7 +326,7 @@
// <0=>Secure
// <1=>Non-Secure
// Value for SCB->ICSR register bit STTNS
-// only for single SysTick implementation
+// only for single SysTick implementation
*/
#define SCB_ICSR_STTNS_VAL 0
diff --git a/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h b/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
index 1cde6a79..35f9ceae 100644
--- a/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
+++ b/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
@@ -3,8 +3,8 @@
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
- * Project: 'demo_threadx_non-secure_zone'
- * Target: 'FVP Simulation Model'
+ * Project: 'demo_threadx_non-secure_zone'
+ * Target: 'FVP Simulation Model'
*/
#ifndef RTE_COMPONENTS_H
@@ -12,7 +12,7 @@
/*
- * Define the Device Header File:
+ * Define the Device Header File:
*/
#define CMSIS_device_header "ARMCM23_TZ.h"
diff --git a/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/_ThreadX_Library_Project/RTE_Components.h b/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/_ThreadX_Library_Project/RTE_Components.h
index 476361d7..66e03dff 100644
--- a/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/_ThreadX_Library_Project/RTE_Components.h
+++ b/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/RTE/_ThreadX_Library_Project/RTE_Components.h
@@ -3,8 +3,8 @@
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
- * Project: 'ThreadX_Library'
- * Target: 'ThreadX_Library_Project'
+ * Project: 'ThreadX_Library'
+ * Target: 'ThreadX_Library_Project'
*/
#ifndef RTE_COMPONENTS_H
@@ -12,7 +12,7 @@
/*
- * Define the Device Header File:
+ * Define the Device Header File:
*/
#define CMSIS_device_header "ARMCM23_TZ.h"
diff --git a/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/demo_threadx.c b/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/demo_threadx.c
index 7320b94d..df82f09b 100644
--- a/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/demo_threadx.c
+++ b/ports/cortex_m23/ac6/example_build/demo_threadx_non-secure_zone/demo_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. Please refer to Chapter 6 of the ThreadX User Guide for a complete
description of this demonstration. */
@@ -69,7 +69,7 @@ void thread_6_and_7_entry(ULONG thread_input);
int main()
{
-
+
/* Please refer to Chapter 6 of the ThreadX User Guide for a complete
description of this demonstration. */
@@ -102,91 +102,91 @@ CHAR *pointer;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate secure stack space for thread. */
tx_thread_secure_stack_allocate(&thread_0,256);
-
+
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate secure stack space for thread. */
tx_thread_secure_stack_allocate(&thread_1,256);
-
+
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate secure stack space for thread. */
tx_thread_secure_stack_allocate(&thread_2,256);
-
+
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate secure stack space for thread. */
tx_thread_secure_stack_allocate(&thread_3,256);
-
+
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate secure stack space for thread. */
tx_thread_secure_stack_allocate(&thread_4,256);
-
+
/* Allocate the stack for thread 5. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate secure stack space for thread. */
tx_thread_secure_stack_allocate(&thread_5,256);
-
+
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate secure stack space for thread. */
tx_thread_secure_stack_allocate(&thread_6,256);
-
+
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate secure stack space for thread. */
tx_thread_secure_stack_allocate(&thread_7,256);
-
+
/* Allocate the message queue. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_QUEUE_SIZE*sizeof(ULONG), TX_NO_WAIT);
@@ -226,9 +226,9 @@ void thread_0_entry(ULONG thread_input)
{
UINT status;
INT test_secure;
-
+
(VOID)thread_input; /* unused parameter. */
-
+
#if !defined(TX_SINGLE_MODE_SECURE) && !defined(TX_SINGLE_MODE_NON_SECURE)
/* Secure call and callback example.
Only to be used when not running in a single mode. */
@@ -236,7 +236,7 @@ INT test_secure;
test_secure = func2(callbackA, test_secure);
tx_thread_secure_stack_free(&thread_0);
#endif
-
+
/* This thread simply sits in while-forever-sleep loop. */
while(1)
{
@@ -263,7 +263,7 @@ void thread_1_entry(ULONG thread_input)
UINT status;
(VOID)thread_input; /* unused parameter. */
-
+
/* This thread simply sends messages to a queue shared by thread 2. */
while(1)
{
@@ -290,7 +290,7 @@ ULONG received_message;
UINT status;
(VOID)thread_input; /* unused parameter. */
-
+
/* This thread retrieves messages placed on the queue by thread 1. */
while(1)
{
@@ -301,11 +301,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -316,7 +316,7 @@ void thread_3_and_4_entry(ULONG thread_input)
{
UINT status;
-
+
/* This function is executed from thread 3 and thread 4. As the loop
below shows, these function compete for ownership of semaphore_0. */
while(1)
@@ -355,7 +355,7 @@ UINT status;
ULONG actual_flags;
(VOID)thread_input; /* unused parameter. */
-
+
/* This thread simply waits for an event in a forever loop. */
while(1)
{
@@ -364,7 +364,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -417,7 +417,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m23/ac6/example_build/tx_initialize_low_level.S b/ports/cortex_m23/ac6/example_build/tx_initialize_low_level.S
index 00fd8775..c5565bdd 100644
--- a/ports/cortex_m23/ac6/example_build/tx_initialize_low_level.S
+++ b/ports/cortex_m23/ac6/example_build/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@ HEAP_SIZE = 0x00000000
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
@@ -103,7 +96,7 @@ _tx_initialize_low_level:
// LDR r0, =0xE0001000 // Build address of DWT register
// LDR r1, [r0] // Pickup the current value
// ORR r1, r1, #1 // Set the CYCCNTENA bit
-// STR r1, [r0] // Enable the cycle count register
+// STR r1, [r0] // Enable the cycle count register
/* Set system stack pointer from vector value. */
LDR r0, =_tx_thread_system_stack_ptr // Build address of system stack pointer
@@ -121,21 +114,21 @@ _tx_initialize_low_level:
/* Configure handler priorities. */
LDR r1, =0x00000000 // Rsrv, UsgF, BusF, MemM
LDR r0, =0xE000E000 // Build address of NVIC registers
- LDR r2, =0xD18 //
- ADD r0, r0, r2 //
+ LDR r2, =0xD18 //
+ ADD r0, r0, r2 //
STR r1, [r0] // Setup System Handlers 4-7 Priority Registers
LDR r1, =0xFF000000 // SVCl, Rsrv, Rsrv, Rsrv
LDR r0, =0xE000E000 // Build address of NVIC registers
- LDR r2, =0xD1C //
- ADD r0, r0, r2 //
+ LDR r2, =0xD1C //
+ ADD r0, r0, r2 //
STR r1, [r0] // Setup System Handlers 8-11 Priority Registers
// Note: SVC must be lowest priority, which is 0xFF
LDR r1, =0x40FF0000 // SysT, PnSV, Rsrv, DbgM
LDR r0, =0xE000E000 // Build address of NVIC registers
- LDR r2, =0xD20 //
- ADD r0, r0, r2 //
+ LDR r2, =0xD20 //
+ ADD r0, r0, r2 //
STR r1, [r0] // Setup System Handlers 12-15 Priority Registers
// Note: PnSV must be lowest priority, which is 0xFF
@@ -216,7 +209,7 @@ HardFault_Handler:
// A stack overflow will trigger a hardfault.
// There is no CFSR in M23, so we will not try to
// determine if the fault is caused by a stack overflow
- // or some other condition.
+ // or some other condition.
B HardFault_Handler
.end
diff --git a/ports/cortex_m23/ac6/inc/tx_port.h b/ports/cortex_m23/ac6/inc/tx_port.h
index d157087e..5ae0b62b 100644
--- a/ports/cortex_m23/ac6/inc/tx_port.h
+++ b/ports/cortex_m23/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,30 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-02-2021 Scott Larson Modified comment(s), added */
-/* ULONG64_DEFINED, */
-/* resulting in version 6.1.5 */
-/* 06-02-2021 Yuxin Zhou Modified comment(s), removed */
-/* unneeded header file, added */
-/* conditional compilation */
-/* for ARMv8-M (Cortex M23/33) */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Scott Larson Modified comment(s), improved */
-/* stack check error handling, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -74,7 +51,7 @@
/* Determine if the optional ThreadX user define file should be used. */
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -111,17 +88,17 @@ UINT _tx_thread_secure_stack_free(struct TX_THREAD_STRUCT *tx_thread);
#define TX_PORT_THREAD_STACK_ERROR_HANDLING
-/* Define the system API mappings based on the error checking
- selected by the user. Note: this section is only applicable to
+/* Define the system API mappings based on the error checking
+ selected by the user. Note: this section is only applicable to
application source code, hence the conditional that turns off this
stuff when the include file is processed by the ThreadX source. */
#ifndef TX_SOURCE_CODE
-/* Determine if error checking is desired. If so, map API functions
+/* Determine if error checking is desired. If so, map API functions
to the appropriate error checking front-ends. Otherwise, map API
- functions to the core functions that actually perform the work.
+ functions to the core functions that actually perform the work.
Note: error checking is enabled by default. */
#ifdef TX_DISABLE_ERROR_CHECKING
@@ -166,7 +143,7 @@ UINT _tx_thread_secure_stack_free(struct TX_THREAD_STRUCT *tx_thread);
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
+#ifndef TX_TIMER_THREAD_PRIORITY
#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
@@ -178,7 +155,7 @@ UINT _tx_thread_secure_stack_free(struct TX_THREAD_STRUCT *tx_thread);
/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((volatile ULONG *) 0x0a800024)
@@ -217,7 +194,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -231,7 +208,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
#define TX_THREAD_EXTENSION_0
@@ -255,7 +232,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
@@ -322,7 +299,7 @@ inline static unsigned int _get_ipsr(void)
/* Define the get system state macro. */
-
+
#ifndef TX_THREAD_GET_SYSTEM_STATE
#ifndef TX_MISRA_ENABLE
#define TX_THREAD_GET_SYSTEM_STATE() (_tx_thread_system_state | _get_ipsr())
@@ -348,14 +325,14 @@ extern void _tx_thread_secure_stack_initialize(void);
#define TX_PORT_SPECIFIC_PRE_INITIALIZATION _tx_thread_secure_stack_initialize();
#endif
-/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
+/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
prevent early scheduling on Cortex-M parts. */
-
+
#define TX_PORT_SPECIFIC_POST_INITIALIZATION _tx_thread_preempt_disable++;
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef TX_DISABLE_INLINE
@@ -365,9 +342,9 @@ extern void _tx_thread_secure_stack_initialize(void);
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -413,8 +390,8 @@ unsigned int was_masked;
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M23/AC6 Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M23/AC6 Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m23/ac6/inc/tx_secure_interface.h b/ports/cortex_m23/ac6/inc/tx_secure_interface.h
index fbf20b31..5ac37fbf 100644
--- a/ports/cortex_m23/ac6/inc/tx_secure_interface.h
+++ b/ports/cortex_m23/ac6/inc/tx_secure_interface.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,12 +38,6 @@
/* It is assumed that tx_api.h and tx_port.h have already been */
/* included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_SECURE_INTERFACE_H
diff --git a/ports/cortex_m23/ac6/readme_threadx.txt b/ports/cortex_m23/ac6/readme_threadx.txt
index 787881bc..8169ebc1 100644
--- a/ports/cortex_m23/ac6/readme_threadx.txt
+++ b/ports/cortex_m23/ac6/readme_threadx.txt
@@ -1,22 +1,22 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M23
+ Microsoft's Azure RTOS ThreadX for Cortex-M23
Using the AC6 Tools in Keil uVision
1. Import the ThreadX Projects
-In order to build the ThreadX library and the ThreadX demonstration, first open
-the AzureRTOS.uvmpw workspace (located in the "example_build" directory)
+In order to build the ThreadX library and the ThreadX demonstration, first open
+the AzureRTOS.uvmpw workspace (located in the "example_build" directory)
into Keil.
2. Building the ThreadX run-time Library
Building the ThreadX library is easy; simply set the ThreadX_Library project
-as active, then then build the library. You should now observe the compilation
+as active, then then build the library. You should now observe the compilation
and assembly of the ThreadX library. This project build produces the ThreadX
library file ThreadX_Library.lib.
-Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
-replace the common files of the same name.
+Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
+replace the common files of the same name.
3. Demonstration System
@@ -24,24 +24,24 @@ replace the common files of the same name.
The ThreadX demonstration is designed to execute under the Keil debugger on the
FVP_MPS2_Cortex-M23_MDK simulator.
-Building the demonstration is easy; simply select the "Batch Build" button.
-You should now observe the compilation and assembly of the ThreadX demonstration of
-both the demo_secure_zone and demo_threadx_non-secure_zone projects.
+Building the demonstration is easy; simply select the "Batch Build" button.
+You should now observe the compilation and assembly of the ThreadX demonstration of
+both the demo_secure_zone and demo_threadx_non-secure_zone projects.
Then click the Start/Stop Debug Session button to start the simulator and begin debugging.
You are now ready to execute the ThreadX demonstration.
4. System Initialization
-The entry point in ThreadX for the Cortex-M23 using AC6 tools uses the standard AC6
+The entry point in ThreadX for the Cortex-M23 using AC6 tools uses the standard AC6
Cortex-M23 reset sequence. From the reset vector the C runtime will be initialized.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.S file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -50,11 +50,11 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M23 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
- Stack Offset Stack Contents
+ Stack Offset Stack Contents
0x00 LR Interrupted LR (LR at time of PENDSV)
0x04 r8
@@ -77,26 +77,26 @@ tx_thread_stack_ptr in the associated thread control block TX_THREAD.
6. Improving Performance
-To make ThreadX and the application(s) run faster, you can enable
-all compiler optimizations.
+To make ThreadX and the application(s) run faster, you can enable
+all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M23
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-M23 vectors start at the label __Vectors or similar. The application may modify
-the vector area according to its needs. There is code in tx_initialize_low_level() that will
-configure the vector base register.
+the vector area according to its needs. There is code in tx_initialize_low_level() that will
+configure the vector base register.
7.2 Managed Interrupts
@@ -122,7 +122,7 @@ your_assembly_isr:
; VOID your_assembly_isr(VOID)
; {
PUSH {r0, lr}
-;
+;
; /* Do interrupt handler work here */
; /* BL */
@@ -134,8 +134,8 @@ your_assembly_isr:
Note: the Cortex-M23 requires exception handlers to be thumb labels, this implies bit 0 set.
To accomplish this, the declaration of the label has to be preceded by the assembler directive
-.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
-be inserted in the correct location in the interrupt vector table. This table is typically
+.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
+be inserted in the correct location in the interrupt vector table. This table is typically
located in either your runtime startup file or in the tx_initialize_low_level.S file.
@@ -150,7 +150,7 @@ information associated with this specific port of ThreadX:
tx_thread_secure_stack_initialize.S New file
tx_thread_schedule.S Added secure stack initialize to SVC hander
tx_thread_secure_stack.c Fixed stack pointer save, initialize in handler mode
-
+
04-02-2021 Release 6.1.6 changes:
tx_port.h Updated macro definition
diff --git a/ports/cortex_m23/ac6/src/tx_misra.S b/ports/cortex_m23/ac6/src/tx_misra.S
index 221b9e1a..b4735cc1 100644
--- a/ports/cortex_m23/ac6/src/tx_misra.S
+++ b/ports/cortex_m23/ac6/src/tx_misra.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -672,7 +673,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -687,7 +688,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARM_FP
/***********************************************************************************************/
@@ -704,8 +705,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -719,9 +720,9 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
+
.data
.word 0
diff --git a/ports/cortex_m23/ac6/src/tx_thread_context_restore.S b/ports/cortex_m23/ac6/src/tx_thread_context_restore.S
index c8478c85..1b0052ef 100644
--- a/ports/cortex_m23/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_m23/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m23/ac6/src/tx_thread_context_save.S b/ports/cortex_m23/ac6/src/tx_thread_context_save.S
index a0b2bdd6..463a4417 100644
--- a/ports/cortex_m23/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_m23/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m23/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_m23/ac6/src/tx_thread_interrupt_control.S
index fc624fa1..71e1d835 100644
--- a/ports/cortex_m23/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_m23/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m23/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_m23/ac6/src/tx_thread_interrupt_disable.S
index 3bd783b0..82ac2588 100644
--- a/ports/cortex_m23/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_m23/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m23/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_m23/ac6/src/tx_thread_interrupt_restore.S
index d63de10e..03cae94a 100644
--- a/ports/cortex_m23/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_m23/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m23/ac6/src/tx_thread_schedule.S b/ports/cortex_m23/ac6/src/tx_thread_schedule.S
index a582e85f..be5661f0 100644
--- a/ports/cortex_m23/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_m23/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,20 +61,6 @@
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 04-02-2021 Scott Larson Modified comment(s), added */
-/* low power code, */
-/* resulting in version 6.1.6 */
-/* 06-02-2021 Scott Larson Added secure stack initialize */
-/* in SVC handler, */
-/* resulting in version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -325,7 +312,7 @@ _tx_get_svc:
CMP r1, #2 // Is it a secure stack free request?
BEQ _tx_svc_secure_free // Yes, go there
-
+
CMP r1, #3 // Is it a secure stack init request?
BEQ _tx_svc_secure_init // Yes, go there
diff --git a/ports/cortex_m23/ac6/src/tx_thread_secure_stack.c b/ports/cortex_m23/ac6/src/tx_thread_secure_stack.c
index baae59d8..0073bd47 100644
--- a/ports/cortex_m23/ac6/src/tx_thread_secure_stack.c
+++ b/ports/cortex_m23/ac6/src/tx_thread_secure_stack.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -102,21 +103,6 @@ static INT tx_head_free_index = 0U;
/* */
/* _tx_initialize_kernel_enter */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 10-16-2020 Scott Larson Modified comment(s), */
-/* resulting in version 6.1.1 */
-/* 06-02-2021 Scott Larson Modified comment(s), and */
-/* changed name, execute in */
-/* handler mode, */
-/* resulting in version 6.1.7 */
-/* 07-29-2022 Scott Larson Modified comments, updated */
-/* secure stack allocation, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
__attribute__((cmse_nonsecure_entry))
UINT _tx_thread_secure_mode_stack_initialize(void)
diff --git a/ports/cortex_m23/ac6/src/tx_thread_secure_stack_allocate.S b/ports/cortex_m23/ac6/src/tx_thread_secure_stack_allocate.S
index eda6d513..87108d8a 100644
--- a/ports/cortex_m23/ac6/src/tx_thread_secure_stack_allocate.S
+++ b/ports/cortex_m23/ac6/src/tx_thread_secure_stack_allocate.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,14 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
// {
diff --git a/ports/cortex_m23/ac6/src/tx_thread_secure_stack_free.S b/ports/cortex_m23/ac6/src/tx_thread_secure_stack_free.S
index 2a02ee12..a24f1f82 100644
--- a/ports/cortex_m23/ac6/src/tx_thread_secure_stack_free.S
+++ b/ports/cortex_m23/ac6/src/tx_thread_secure_stack_free.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,14 +54,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_free(TX_THREAD *thread_ptr)
// {
diff --git a/ports/cortex_m23/ac6/src/tx_thread_secure_stack_initialize.S b/ports/cortex_m23/ac6/src/tx_thread_secure_stack_initialize.S
index 03368cca..4a046400 100644
--- a/ports/cortex_m23/ac6/src/tx_thread_secure_stack_initialize.S
+++ b/ports/cortex_m23/ac6/src/tx_thread_secure_stack_initialize.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,18 +54,6 @@
/* */
/* TX_PORT_SPECIFIC_PRE_INITIALIZATION */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* resulting in version 6.1.12 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_secure_stack_initialize(VOID)
// {
diff --git a/ports/cortex_m23/ac6/src/tx_thread_stack_build.S b/ports/cortex_m23/ac6/src/tx_thread_stack_build.S
index 204e3cf1..c28ef1e2 100644
--- a/ports/cortex_m23/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_m23/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
@@ -100,7 +93,7 @@ _tx_thread_stack_build:
Stack Bottom: (higher memory address) */
LDR r2, [r0, #16] // Pickup end of stack area
- MOVW r3, #0x7 //
+ MOVW r3, #0x7 //
BICS r2, r2, r3 // Align frame for 8-byte alignment
SUBS r2, r2, #68 // Subtract frame size
#ifdef TX_SINGLE_MODE_SECURE
diff --git a/ports/cortex_m23/ac6/src/tx_thread_system_return.S b/ports/cortex_m23/ac6/src/tx_thread_system_return.S
index 05e2be40..d85981da 100644
--- a/ports/cortex_m23/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_m23/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m23/ac6/src/tx_timer_interrupt.S b/ports/cortex_m23/ac6/src/tx_timer_interrupt.S
index 47604260..b5da696e 100644
--- a/ports/cortex_m23/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_m23/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m23/ac6/src/txe_thread_secure_stack_allocate.c b/ports/cortex_m23/ac6/src/txe_thread_secure_stack_allocate.c
index aff98e87..9bade139 100644
--- a/ports/cortex_m23/ac6/src/txe_thread_secure_stack_allocate.c
+++ b/ports/cortex_m23/ac6/src/txe_thread_secure_stack_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
{
@@ -76,10 +71,10 @@ UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_siz
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m23/ac6/src/txe_thread_secure_stack_free.c b/ports/cortex_m23/ac6/src/txe_thread_secure_stack_free.c
index eb2d6b0e..75a26945 100644
--- a/ports/cortex_m23/ac6/src/txe_thread_secure_stack_free.c
+++ b/ports/cortex_m23/ac6/src/txe_thread_secure_stack_free.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,12 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
{
@@ -74,10 +69,10 @@ UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m23/gnu/inc/tx_port.h b/ports/cortex_m23/gnu/inc/tx_port.h
index fdc09817..b1eab9e3 100644
--- a/ports/cortex_m23/gnu/inc/tx_port.h
+++ b/ports/cortex_m23/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,31 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-02-2021 Scott Larson Modified comment(s), */
-/* remove unneeded headers, */
-/* use builtins, added */
-/* ULONG64_DEFINED, */
-/* resulting in version 6.1.5 */
-/* 06-02-2021 Yuxin Zhou Modified comment(s), added */
-/* conditional compilation */
-/* for ARMv8-M (Cortex M23/33) */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Scott Larson Modified comment(s), improved */
-/* stack check error handling, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -75,7 +51,7 @@
/* Determine if the optional ThreadX user define file should be used. */
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -111,17 +87,17 @@ UINT _tx_thread_secure_stack_free(struct TX_THREAD_STRUCT *tx_thread);
#define TX_PORT_THREAD_STACK_ERROR_HANDLING
-/* Define the system API mappings based on the error checking
- selected by the user. Note: this section is only applicable to
+/* Define the system API mappings based on the error checking
+ selected by the user. Note: this section is only applicable to
application source code, hence the conditional that turns off this
stuff when the include file is processed by the ThreadX source. */
#ifndef TX_SOURCE_CODE
-/* Determine if error checking is desired. If so, map API functions
+/* Determine if error checking is desired. If so, map API functions
to the appropriate error checking front-ends. Otherwise, map API
- functions to the core functions that actually perform the work.
+ functions to the core functions that actually perform the work.
Note: error checking is enabled by default. */
#ifdef TX_DISABLE_ERROR_CHECKING
@@ -166,7 +142,7 @@ UINT _tx_thread_secure_stack_free(struct TX_THREAD_STRUCT *tx_thread);
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
+#ifndef TX_TIMER_THREAD_PRIORITY
#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
@@ -178,7 +154,7 @@ UINT _tx_thread_secure_stack_free(struct TX_THREAD_STRUCT *tx_thread);
/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((volatile ULONG *) 0x0a800024)
@@ -217,7 +193,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -231,7 +207,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
#define TX_THREAD_EXTENSION_0
@@ -255,7 +231,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
@@ -321,7 +297,7 @@ inline static unsigned int _get_ipsr(void)
/* Define the get system state macro. */
-
+
#ifndef TX_THREAD_GET_SYSTEM_STATE
#ifndef TX_MISRA_ENABLE
#define TX_THREAD_GET_SYSTEM_STATE() (_tx_thread_system_state | _get_ipsr())
@@ -347,14 +323,14 @@ extern void _tx_thread_secure_stack_initialize(void);
#define TX_PORT_SPECIFIC_PRE_INITIALIZATION _tx_thread_secure_stack_initialize();
#endif
-/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
+/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
prevent early scheduling on Cortex-M parts. */
-
+
#define TX_PORT_SPECIFIC_POST_INITIALIZATION _tx_thread_preempt_disable++;
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef TX_DISABLE_INLINE
@@ -364,9 +340,9 @@ extern void _tx_thread_secure_stack_initialize(void);
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -445,8 +421,8 @@ unsigned int interrupt_save;
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M23/GNU Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M23/GNU Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m23/gnu/inc/tx_secure_interface.h b/ports/cortex_m23/gnu/inc/tx_secure_interface.h
index fbf20b31..5ac37fbf 100644
--- a/ports/cortex_m23/gnu/inc/tx_secure_interface.h
+++ b/ports/cortex_m23/gnu/inc/tx_secure_interface.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,12 +38,6 @@
/* It is assumed that tx_api.h and tx_port.h have already been */
/* included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_SECURE_INTERFACE_H
diff --git a/ports/cortex_m23/gnu/readme_threadx.txt b/ports/cortex_m23/gnu/readme_threadx.txt
index 08a8ca82..9ce76341 100644
--- a/ports/cortex_m23/gnu/readme_threadx.txt
+++ b/ports/cortex_m23/gnu/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M23
+ Microsoft's Azure RTOS ThreadX for Cortex-M23
Using the GNU Tools
@@ -6,8 +6,8 @@
1. Building the ThreadX run-time Library
An example .bat file is in the example_build directory.
-Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
-replace the common files of the same name.
+Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
+replace the common files of the same name.
2. Demonstration System
@@ -16,15 +16,15 @@ No demonstration example is provided.
3. System Initialization
-The entry point in ThreadX for the Cortex-M23 using gnu tools uses the standard GNU
+The entry point in ThreadX for the Cortex-M23 using gnu tools uses the standard GNU
Cortex-M23 reset sequence. From the reset vector the C runtime will be initialized.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.S file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -33,11 +33,11 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M23 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
- Stack Offset Stack Contents
+ Stack Offset Stack Contents
0x00 LR Interrupted LR (LR at time of PENDSV)
0x04 r8
@@ -60,26 +60,26 @@ tx_thread_stack_ptr in the associated thread control block TX_THREAD.
5. Improving Performance
-To make ThreadX and the application(s) run faster, you can enable
-all compiler optimizations.
+To make ThreadX and the application(s) run faster, you can enable
+all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M23
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
6.1 Vector Area
The Cortex-M23 vectors start at the label __tx_vectors or similar. The application may modify
-the vector area according to its needs. There is code in tx_initialize_low_level() that will
-configure the vector base register.
+the vector area according to its needs. There is code in tx_initialize_low_level() that will
+configure the vector base register.
6.2 Managed Interrupts
@@ -105,7 +105,7 @@ your_assembly_isr:
; VOID your_assembly_isr(VOID)
; {
PUSH {r0, lr}
-;
+;
; /* Do interrupt handler work here */
; /* BL */
@@ -117,8 +117,8 @@ your_assembly_isr:
Note: the Cortex-M23 requires exception handlers to be thumb labels, this implies bit 0 set.
To accomplish this, the declaration of the label has to be preceded by the assembler directive
-.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
-be inserted in the correct location in the interrupt vector table. This table is typically
+.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
+be inserted in the correct location in the interrupt vector table. This table is typically
located in either your runtime startup file or in the tx_initialize_low_level.S file.
@@ -140,14 +140,14 @@ information associated with this specific port of ThreadX:
03-02-2021 The following files were changed/added for version 6.1.5:
tx_port.h Added ULONG64_DEFINED
-12-31-2020 The following files were
+12-31-2020 The following files were
changed/added for port specific version 6.1.3:
-
- tx_port.h Remove unneeded include files,
+
+ tx_port.h Remove unneeded include files,
use builtin functions,
modified comments.
-
- tx_thread_secure_stack.c Remove unneeded include file,
+
+ tx_thread_secure_stack.c Remove unneeded include file,
use inline get/set functions,
modified comments.
diff --git a/ports/cortex_m23/gnu/src/tx_initialize_low_level.S b/ports/cortex_m23/gnu/src/tx_initialize_low_level.S
index 6cdaa552..ba092253 100644
--- a/ports/cortex_m23/gnu/src/tx_initialize_low_level.S
+++ b/ports/cortex_m23/gnu/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@ HEAP_SIZE = 0x00000000
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
@@ -91,20 +84,20 @@ _tx_initialize_low_level:
/* Set base of available memory to end of non-initialised RAM area. */
LDR r0, =_tx_initialize_unused_memory // Build address of unused memory pointer
LDR r1, =Image$$ARM_LIB_STACK$$ZI$$Limit // Build first free address
- ADDS r1, r1, #4 //
+ ADDS r1, r1, #4 //
STR r1, [r0] // Setup first unused memory pointer
/* Setup Vector Table Offset Register. */
LDR r0, =0xE000ED08 // Build address of NVIC registers
LDR r1, =__Vectors // Pickup address of vector table
- STR r1, [r0] // Set vector table address
+ STR r1, [r0] // Set vector table address
// /* Enable the cycle count register. */
//
// LDR r0, =0xE0001000 // Build address of DWT register
// LDR r1, [r0] // Pickup the current value
// ORR r1, r1, #1 // Set the CYCCNTENA bit
-// STR r1, [r0] // Enable the cycle count register
+// STR r1, [r0] // Enable the cycle count register
/* Set system stack pointer from vector value. */
LDR r0, =_tx_thread_system_stack_ptr // Build address of system stack pointer
@@ -122,21 +115,21 @@ _tx_initialize_low_level:
/* Configure handler priorities. */
LDR r1, =0x00000000 // Rsrv, UsgF, BusF, MemM
LDR r0, =0xE000E000 // Build address of NVIC registers
- LDR r2, =0xD18 //
- ADD r0, r0, r2 //
+ LDR r2, =0xD18 //
+ ADD r0, r0, r2 //
STR r1, [r0] // Setup System Handlers 4-7 Priority Registers
LDR r1, =0xFF000000 // SVCl, Rsrv, Rsrv, Rsrv
LDR r0, =0xE000E000 // Build address of NVIC registers
- LDR r2, =0xD1C //
- ADD r0, r0, r2 //
+ LDR r2, =0xD1C //
+ ADD r0, r0, r2 //
STR r1, [r0] // Setup System Handlers 8-11 Priority Registers
// Note: SVC must be lowest priority, which is 0xFF
LDR r1, =0x40FF0000 // SysT, PnSV, Rsrv, DbgM
LDR r0, =0xE000E000 // Build address of NVIC registers
- LDR r2, =0xD20 //
- ADD r0, r0, r2 //
+ LDR r2, =0xD20 //
+ ADD r0, r0, r2 //
STR r1, [r0] // Setup System Handlers 12-15 Priority Registers
// Note: PnSV must be lowest priority, which is 0xFF
@@ -217,7 +210,7 @@ HardFault_Handler:
// A stack overflow will trigger a hardfault.
// There is no CFSR in M23, so we will not try to
// determine if the fault is caused by a stack overflow
- // or some other condition.
+ // or some other condition.
B HardFault_Handler
.end
diff --git a/ports/cortex_m23/gnu/src/tx_misra.S b/ports/cortex_m23/gnu/src/tx_misra.S
index 221b9e1a..b4735cc1 100644
--- a/ports/cortex_m23/gnu/src/tx_misra.S
+++ b/ports/cortex_m23/gnu/src/tx_misra.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -672,7 +673,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -687,7 +688,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARM_FP
/***********************************************************************************************/
@@ -704,8 +705,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -719,9 +720,9 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
+
.data
.word 0
diff --git a/ports/cortex_m23/gnu/src/tx_thread_context_restore.S b/ports/cortex_m23/gnu/src/tx_thread_context_restore.S
index 59e577b0..6f2b453c 100644
--- a/ports/cortex_m23/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_m23/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m23/gnu/src/tx_thread_context_save.S b/ports/cortex_m23/gnu/src/tx_thread_context_save.S
index ab5eecde..84bf9908 100644
--- a/ports/cortex_m23/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_m23/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m23/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_m23/gnu/src/tx_thread_interrupt_control.S
index 4b2a2689..53fd963c 100644
--- a/ports/cortex_m23/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_m23/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m23/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_m23/gnu/src/tx_thread_interrupt_disable.S
index e670a1bd..a528ae25 100644
--- a/ports/cortex_m23/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_m23/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m23/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_m23/gnu/src/tx_thread_interrupt_restore.S
index 56cf9f49..e8193789 100644
--- a/ports/cortex_m23/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_m23/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m23/gnu/src/tx_thread_schedule.S b/ports/cortex_m23/gnu/src/tx_thread_schedule.S
index c41cf38b..81919921 100644
--- a/ports/cortex_m23/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_m23/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,20 +57,6 @@
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 04-02-2021 Scott Larson Modified comment(s), added */
-/* low power code, */
-/* resulting in version 6.1.6 */
-/* 06-02-2021 Scott Larson Added secure stack initialize */
-/* in SVC handler, */
-/* resulting in version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -321,7 +308,7 @@ _tx_get_svc:
CMP r1, #2 // Is it a secure stack free request?
BEQ _tx_svc_secure_free // Yes, go there
-
+
CMP r1, #3 // Is it a secure stack init request?
BEQ _tx_svc_secure_init // Yes, go there
diff --git a/ports/cortex_m23/gnu/src/tx_thread_secure_stack.c b/ports/cortex_m23/gnu/src/tx_thread_secure_stack.c
index 4f757f90..44376c27 100644
--- a/ports/cortex_m23/gnu/src/tx_thread_secure_stack.c
+++ b/ports/cortex_m23/gnu/src/tx_thread_secure_stack.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -98,21 +99,6 @@ static INT tx_head_free_index = 0U;
/* */
/* _tx_initialize_kernel_enter */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 10-16-2020 Scott Larson Modified comment(s), */
-/* resulting in version 6.1.1 */
-/* 06-02-2021 Scott Larson Modified comment(s), changed */
-/* name, execute in handler */
-/* mode, disable optimization, */
-/* resulting in version 6.1.7 */
-/* 07-29-2022 Scott Larson Modified comments, updated */
-/* secure stack allocation, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
__attribute__((cmse_nonsecure_entry, optimize(0)))
UINT _tx_thread_secure_mode_stack_initialize(void)
diff --git a/ports/cortex_m23/gnu/src/tx_thread_secure_stack_allocate.S b/ports/cortex_m23/gnu/src/tx_thread_secure_stack_allocate.S
index 90b9686b..cf07f868 100644
--- a/ports/cortex_m23/gnu/src/tx_thread_secure_stack_allocate.S
+++ b/ports/cortex_m23/gnu/src/tx_thread_secure_stack_allocate.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,14 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
// {
diff --git a/ports/cortex_m23/gnu/src/tx_thread_secure_stack_free.S b/ports/cortex_m23/gnu/src/tx_thread_secure_stack_free.S
index dda4843e..725f00cc 100644
--- a/ports/cortex_m23/gnu/src/tx_thread_secure_stack_free.S
+++ b/ports/cortex_m23/gnu/src/tx_thread_secure_stack_free.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,14 +54,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_free(TX_THREAD *thread_ptr)
// {
diff --git a/ports/cortex_m23/gnu/src/tx_thread_secure_stack_initialize.S b/ports/cortex_m23/gnu/src/tx_thread_secure_stack_initialize.S
index b784cd91..48aec578 100644
--- a/ports/cortex_m23/gnu/src/tx_thread_secure_stack_initialize.S
+++ b/ports/cortex_m23/gnu/src/tx_thread_secure_stack_initialize.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,18 +54,6 @@
/* */
/* TX_PORT_SPECIFIC_PRE_INITIALIZATION */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* resulting in version 6.1.12 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_secure_stack_initialize(VOID)
// {
diff --git a/ports/cortex_m23/gnu/src/tx_thread_stack_build.S b/ports/cortex_m23/gnu/src/tx_thread_stack_build.S
index b569dfe0..bd25b57d 100644
--- a/ports/cortex_m23/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_m23/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
@@ -100,7 +93,7 @@ _tx_thread_stack_build:
Stack Bottom: (higher memory address) */
LDR r2, [r0, #16] // Pickup end of stack area
- MOVW r3, #0x7 //
+ MOVW r3, #0x7 //
BICS r2, r2, r3 // Align frame for 8-byte alignment
SUBS r2, r2, #68 // Subtract frame size
#ifdef TX_SINGLE_MODE_SECURE
diff --git a/ports/cortex_m23/gnu/src/tx_thread_system_return.S b/ports/cortex_m23/gnu/src/tx_thread_system_return.S
index add8dd86..a14fdba3 100644
--- a/ports/cortex_m23/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_m23/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m23/gnu/src/tx_timer_interrupt.S b/ports/cortex_m23/gnu/src/tx_timer_interrupt.S
index ca3d52d4..bde6c316 100644
--- a/ports/cortex_m23/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_m23/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m23/gnu/src/txe_thread_secure_stack_allocate.c b/ports/cortex_m23/gnu/src/txe_thread_secure_stack_allocate.c
index aff98e87..9bade139 100644
--- a/ports/cortex_m23/gnu/src/txe_thread_secure_stack_allocate.c
+++ b/ports/cortex_m23/gnu/src/txe_thread_secure_stack_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
{
@@ -76,10 +71,10 @@ UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_siz
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m23/gnu/src/txe_thread_secure_stack_free.c b/ports/cortex_m23/gnu/src/txe_thread_secure_stack_free.c
index eb2d6b0e..75a26945 100644
--- a/ports/cortex_m23/gnu/src/txe_thread_secure_stack_free.c
+++ b/ports/cortex_m23/gnu/src/txe_thread_secure_stack_free.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,12 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
{
@@ -74,10 +69,10 @@ UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m23/iar/inc/tx_port.h b/ports/cortex_m23/iar/inc/tx_port.h
index 5fb1e96b..be6bebd5 100644
--- a/ports/cortex_m23/iar/inc/tx_port.h
+++ b/ports/cortex_m23/iar/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,29 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-02-2021 Scott Larson Modified comment(s), added */
-/* ULONG64_DEFINED, */
-/* resulting in version 6.1.5 */
-/* 06-02-2021 Yuxin Zhou Modified comment(s), added */
-/* conditional compilation */
-/* for ARMv8-M (Cortex M23/33) */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Scott Larson Modified comment(s), improved */
-/* stack check error handling, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -73,7 +51,7 @@
/* Determine if the optional ThreadX user define file should be used. */
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -114,17 +92,17 @@ UINT _tx_thread_secure_stack_free(struct TX_THREAD_STRUCT *tx_thread);
#define TX_PORT_THREAD_STACK_ERROR_HANDLING
-/* Define the system API mappings based on the error checking
- selected by the user. Note: this section is only applicable to
+/* Define the system API mappings based on the error checking
+ selected by the user. Note: this section is only applicable to
application source code, hence the conditional that turns off this
stuff when the include file is processed by the ThreadX source. */
#ifndef TX_SOURCE_CODE
-/* Determine if error checking is desired. If so, map API functions
+/* Determine if error checking is desired. If so, map API functions
to the appropriate error checking front-ends. Otherwise, map API
- functions to the core functions that actually perform the work.
+ functions to the core functions that actually perform the work.
Note: error checking is enabled by default. */
#ifdef TX_DISABLE_ERROR_CHECKING
@@ -169,7 +147,7 @@ UINT _tx_thread_secure_stack_free(struct TX_THREAD_STRUCT *tx_thread);
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
+#ifndef TX_TIMER_THREAD_PRIORITY
#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
@@ -181,7 +159,7 @@ UINT _tx_thread_secure_stack_free(struct TX_THREAD_STRUCT *tx_thread);
/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((volatile ULONG *) 0x0a800024)
@@ -220,7 +198,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -234,7 +212,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
#define TX_THREAD_EXTENSION_0
@@ -277,7 +255,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
@@ -304,7 +282,7 @@ void __iar_Initlocks(void);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
/* No IAR library support. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
#if !defined(TX_SINGLE_MODE_SECURE) && !defined(TX_SINGLE_MODE_NON_SECURE)
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) if(thread_ptr -> tx_thread_secure_stack_context){_tx_thread_secure_stack_free(thread_ptr);}
#else
@@ -346,7 +324,7 @@ void __iar_Initlocks(void);
/* Define the get system state macro. */
-
+
#ifndef TX_THREAD_GET_SYSTEM_STATE
#ifndef TX_MISRA_ENABLE
#define TX_THREAD_GET_SYSTEM_STATE() (_tx_thread_system_state | __get_IPSR())
@@ -372,14 +350,14 @@ extern void _tx_thread_secure_stack_initialize(void);
#define TX_PORT_SPECIFIC_PRE_INITIALIZATION _tx_thread_secure_stack_initialize();
#endif
-/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
+/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
prevent early scheduling on Cortex-M parts. */
-
+
#define TX_PORT_SPECIFIC_POST_INITIALIZATION _tx_thread_preempt_disable++;
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef TX_DISABLE_INLINE
@@ -389,9 +367,9 @@ extern void _tx_thread_secure_stack_initialize(void);
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -435,8 +413,8 @@ __istate_t interrupt_save;
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M23/IAR Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M23/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m23/iar/inc/tx_secure_interface.h b/ports/cortex_m23/iar/inc/tx_secure_interface.h
index fbf20b31..5ac37fbf 100644
--- a/ports/cortex_m23/iar/inc/tx_secure_interface.h
+++ b/ports/cortex_m23/iar/inc/tx_secure_interface.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,12 +38,6 @@
/* It is assumed that tx_api.h and tx_port.h have already been */
/* included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_SECURE_INTERFACE_H
diff --git a/ports/cortex_m23/iar/readme_threadx.txt b/ports/cortex_m23/iar/readme_threadx.txt
index bd190400..8c3217c0 100644
--- a/ports/cortex_m23/iar/readme_threadx.txt
+++ b/ports/cortex_m23/iar/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M23
+ Microsoft's Azure RTOS ThreadX for Cortex-M23
Using the IAR Tools
@@ -6,33 +6,33 @@
1. Building the ThreadX run-time Library
Import all ThreadX common and port-specific source files into an IAR project.
-Configure the project to build a library rather than an executable. This
-results in the ThreadX run-time library file tx.a, which is needed by
+Configure the project to build a library rather than an executable. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
-Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
-replace the common files of the same name.
+Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
+replace the common files of the same name.
2. Demonstration System
No demonstration is provided because the IAR EWARM 8.50 simulator does
-not simulate the Cortex-M23 correctly.
+not simulate the Cortex-M23 correctly.
3. System Initialization
-The entry point in ThreadX for the Cortex-M23 using IAR tools is at label
-__iar_program_start. This is defined within the IAR compiler's startup code.
-In addition, this is where all static and global preset C variable
+The entry point in ThreadX for the Cortex-M23 using IAR tools is at label
+__iar_program_start. This is defined within the IAR compiler's startup code.
+In addition, this is where all static and global preset C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, and a periodic timer interrupt source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, and a periodic timer interrupt source.
The _tx_initialize_low_level function inside of tx_initialize_low_level.s
-also determines the first available address for use by the application, which
-is supplied as the sole input parameter to your application definition function,
-tx_application_define. To accomplish this, a section is created in
-tx_initialize_low_level.s called FREE_MEM, which must be located after all
+also determines the first available address for use by the application, which
+is supplied as the sole input parameter to your application definition function,
+tx_application_define. To accomplish this, a section is created in
+tx_initialize_low_level.s called FREE_MEM, which must be located after all
other RAM sections in memory.
@@ -41,10 +41,10 @@ other RAM sections in memory.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M23 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
- Stack Offset Stack Contents
+ Stack Offset Stack Contents
0x00 LR Interrupted LR (LR at time of PENDSV)
0x04 r8
@@ -67,17 +67,17 @@ tx_thread_stack_ptr in the associated thread control block TX_THREAD.
5. Improving Performance
-To make ThreadX and the application(s) run faster, you can enable
-all compiler optimizations.
+To make ThreadX and the application(s) run faster, you can enable
+all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
-The Cortex-M23 vectors start at the label __vector_table and is typically defined in a
+The Cortex-M23 vectors start at the label __vector_table and is typically defined in a
startup.s file (or similar). The application may modify the vector area according to its needs.
@@ -126,7 +126,7 @@ should have the following line added (if not already in place):
initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
-The project options "General Options -> Library Configuration" should also have the
+The project options "General Options -> Library Configuration" should also have the
"Enable thread support in library" box selected.
diff --git a/ports/cortex_m23/iar/src/tx_iar.c b/ports/cortex_m23/iar/src/tx_iar.c
index c6092de3..238b485e 100644
--- a/ports/cortex_m23/iar/src/tx_iar.c
+++ b/ports/cortex_m23/iar/src/tx_iar.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,24 +423,24 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#include
+#include
void * __aeabi_read_tp();
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports/cortex_m23/iar/src/tx_initialize_low_level.s b/ports/cortex_m23/iar/src/tx_initialize_low_level.s
index aec8f69c..fb6a109f 100644
--- a/ports/cortex_m23/iar/src/tx_initialize_low_level.s
+++ b/ports/cortex_m23/iar/src/tx_initialize_low_level.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,13 +71,6 @@ __tx_free_memory_start
/* CALLED BY */
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
@@ -118,21 +112,21 @@ _tx_initialize_low_level:
/* Configure handler priorities. */
LDR r1, =0x00000000 // Rsrv, UsgF, BusF, MemM
LDR r0, =0xE000E000 // Build address of NVIC registers
- LDR r2, =0xD18 //
- ADD r0, r0, r2 //
+ LDR r2, =0xD18 //
+ ADD r0, r0, r2 //
STR r1, [r0] // Setup System Handlers 4-7 Priority Registers
LDR r1, =0xFF000000 // SVCl, Rsrv, Rsrv, Rsrv
LDR r0, =0xE000E000 // Build address of NVIC registers
- LDR r2, =0xD1C //
- ADD r0, r0, r2 //
+ LDR r2, =0xD1C //
+ ADD r0, r0, r2 //
STR r1, [r0] // Setup System Handlers 8-11 Priority Registers
// Note: SVC must be lowest priority, which is 0xFF
LDR r1, =0x40FF0000 // SysT, PnSV, Rsrv, DbgM
LDR r0, =0xE000E000 // Build address of NVIC registers
- LDR r2, =0xD20 //
- ADD r0, r0, r2 //
+ LDR r2, =0xD20 //
+ ADD r0, r0, r2 //
STR r1, [r0] // Setup System Handlers 12-15 Priority Registers
// Note: PnSV must be lowest priority, which is 0xFF
@@ -191,7 +185,7 @@ HardFault_Handler:
// A stack overflow will trigger a hardfault.
// There is no CFSR in M23, so we will not try to
// determine if the fault is caused by a stack overflow
- // or some other condition.
+ // or some other condition.
B HardFault_Handler
diff --git a/ports/cortex_m23/iar/src/tx_misra.s b/ports/cortex_m23/iar/src/tx_misra.s
index a42b9e51..e43d258f 100644
--- a/ports/cortex_m23/iar/src/tx_misra.s
+++ b/ports/cortex_m23/iar/src/tx_misra.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -116,7 +117,7 @@
SECTION `.data`:DATA:REORDER:NOROOT(2)
DATA
-// 51 CHAR _tx_version_id[100] = "Copyright (c) 2024 Microsoft Corporation. * ThreadX 6.1 MISRA C Compliant *";
+// 51 CHAR _tx_version_id[100] = "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX 6.1 MISRA C Compliant *";
_tx_version_id:
DC8 43H, 6FH, 70H, 79H, 72H, 69H, 67H, 68H
DC8 74H, 20H, 28H, 63H, 29H, 20H, 31H, 39H
@@ -708,7 +709,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -723,7 +724,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARMVFP__
/***********************************************************************************************/
@@ -740,8 +741,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -755,10 +756,10 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
-
+
+
SECTION `.iar_vfe_header`:DATA:NOALLOC:NOROOT(2)
SECTION_TYPE SHT_PROGBITS, 0
DATA
diff --git a/ports/cortex_m23/iar/src/tx_thread_context_restore.s b/ports/cortex_m23/iar/src/tx_thread_context_restore.s
index 83ab38c9..11f3d018 100644
--- a/ports/cortex_m23/iar/src/tx_thread_context_restore.s
+++ b/ports/cortex_m23/iar/src/tx_thread_context_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -51,13 +52,6 @@
/* CALLED BY */
/* */
/* ISRs Interrupt Service Routines */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m23/iar/src/tx_thread_context_save.s b/ports/cortex_m23/iar/src/tx_thread_context_save.s
index 8ea8a775..bb6b9d51 100644
--- a/ports/cortex_m23/iar/src/tx_thread_context_save.s
+++ b/ports/cortex_m23/iar/src/tx_thread_context_save.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -51,13 +52,6 @@
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m23/iar/src/tx_thread_interrupt_control.s b/ports/cortex_m23/iar/src/tx_thread_interrupt_control.s
index 1e5e1973..5a74b366 100644
--- a/ports/cortex_m23/iar/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_m23/iar/src/tx_thread_interrupt_control.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -51,13 +52,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m23/iar/src/tx_thread_interrupt_disable.s b/ports/cortex_m23/iar/src/tx_thread_interrupt_disable.s
index 375c9926..6b95841a 100644
--- a/ports/cortex_m23/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_m23/iar/src/tx_thread_interrupt_disable.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -51,13 +52,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m23/iar/src/tx_thread_interrupt_restore.s b/ports/cortex_m23/iar/src/tx_thread_interrupt_restore.s
index 3768cfb3..c5a40257 100644
--- a/ports/cortex_m23/iar/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_m23/iar/src/tx_thread_interrupt_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -51,13 +52,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m23/iar/src/tx_thread_schedule.s b/ports/cortex_m23/iar/src/tx_thread_schedule.s
index b3f110e9..bd902dc4 100644
--- a/ports/cortex_m23/iar/src/tx_thread_schedule.s
+++ b/ports/cortex_m23/iar/src/tx_thread_schedule.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -69,19 +70,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 04-02-2021 Scott Larson Modified comment(s), added */
-/* low power code, */
-/* resulting in version 6.1.6 */
-/* 06-02-2021 Scott Larson Added secure stack initialize */
-/* in SVC handler, */
-/* resulting in version 6.1.7 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -314,7 +302,7 @@ _tx_get_svc:
CMP r1, #2 // Is it a secure stack free request?
BEQ _tx_svc_secure_free // Yes, go there
-
+
CMP r1, #3 // Is it a secure stack init request?
BEQ _tx_svc_secure_init // Yes, go there
diff --git a/ports/cortex_m23/iar/src/tx_thread_secure_stack.c b/ports/cortex_m23/iar/src/tx_thread_secure_stack.c
index 099097fb..9ce9ccc3 100644
--- a/ports/cortex_m23/iar/src/tx_thread_secure_stack.c
+++ b/ports/cortex_m23/iar/src/tx_thread_secure_stack.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -102,21 +103,6 @@ static INT tx_head_free_index = 0U;
/* */
/* _tx_initialize_kernel_enter */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 10-16-2020 Scott Larson Modified comment(s), */
-/* resulting in version 6.1.1 */
-/* 06-02-2021 Scott Larson Modified comment(s), changed */
-/* name, execute in handler */
-/* mode, disable optimization, */
-/* resulting in version 6.1.7 */
-/* 07-29-2022 Scott Larson Modified comments, updated */
-/* secure stack allocation, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
__attribute__((cmse_nonsecure_entry))
UINT _tx_thread_secure_mode_stack_initialize(void)
diff --git a/ports/cortex_m23/iar/src/tx_thread_secure_stack_allocate.s b/ports/cortex_m23/iar/src/tx_thread_secure_stack_allocate.s
index a722d4de..5c847788 100644
--- a/ports/cortex_m23/iar/src/tx_thread_secure_stack_allocate.s
+++ b/ports/cortex_m23/iar/src/tx_thread_secure_stack_allocate.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -52,13 +53,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
// {
diff --git a/ports/cortex_m23/iar/src/tx_thread_secure_stack_free.s b/ports/cortex_m23/iar/src/tx_thread_secure_stack_free.s
index cba64bec..4ce87ee3 100644
--- a/ports/cortex_m23/iar/src/tx_thread_secure_stack_free.s
+++ b/ports/cortex_m23/iar/src/tx_thread_secure_stack_free.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -50,13 +51,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_free(TX_THREAD *thread_ptr)
// {
diff --git a/ports/cortex_m23/iar/src/tx_thread_secure_stack_initialize.s b/ports/cortex_m23/iar/src/tx_thread_secure_stack_initialize.s
index 95f0c250..325a62bf 100644
--- a/ports/cortex_m23/iar/src/tx_thread_secure_stack_initialize.s
+++ b/ports/cortex_m23/iar/src/tx_thread_secure_stack_initialize.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -50,17 +51,6 @@
/* CALLED BY */
/* */
/* TX_PORT_SPECIFIC_PRE_INITIALIZATION */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
// VOID _tx_thread_secure_stack_initialize(VOID)
// {
diff --git a/ports/cortex_m23/iar/src/tx_thread_stack_build.s b/ports/cortex_m23/iar/src/tx_thread_stack_build.s
index bbb60ae6..71d25cec 100644
--- a/ports/cortex_m23/iar/src/tx_thread_stack_build.s
+++ b/ports/cortex_m23/iar/src/tx_thread_stack_build.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,13 +54,6 @@
/* CALLED BY */
/* */
/* _tx_thread_create Create thread service */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
@@ -90,7 +84,7 @@ _tx_thread_stack_build:
Stack Bottom: (higher memory address) */
LDR r2, [r0, #16] // Pickup end of stack area
- MOVW r3, #0x7 //
+ MOVW r3, #0x7 //
BICS r2, r2, r3 // Align frame for 8-byte alignment
SUBS r2, r2, #68 // Subtract frame size
#ifdef TX_SINGLE_MODE_SECURE
diff --git a/ports/cortex_m23/iar/src/tx_thread_system_return.s b/ports/cortex_m23/iar/src/tx_thread_system_return.s
index f574ed35..91ef52c7 100644
--- a/ports/cortex_m23/iar/src/tx_thread_system_return.s
+++ b/ports/cortex_m23/iar/src/tx_thread_system_return.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,13 +54,6 @@
/* CALLED BY */
/* */
/* ThreadX components */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m23/iar/src/tx_timer_interrupt.s b/ports/cortex_m23/iar/src/tx_timer_interrupt.s
index 9dd72463..eadef8bf 100644
--- a/ports/cortex_m23/iar/src/tx_timer_interrupt.s
+++ b/ports/cortex_m23/iar/src/tx_timer_interrupt.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,13 +68,6 @@
/* CALLED BY */
/* */
/* interrupt vector */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m23/iar/src/txe_thread_secure_stack_allocate.c b/ports/cortex_m23/iar/src/txe_thread_secure_stack_allocate.c
index aff98e87..9bade139 100644
--- a/ports/cortex_m23/iar/src/txe_thread_secure_stack_allocate.c
+++ b/ports/cortex_m23/iar/src/txe_thread_secure_stack_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
{
@@ -76,10 +71,10 @@ UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_siz
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m23/iar/src/txe_thread_secure_stack_free.c b/ports/cortex_m23/iar/src/txe_thread_secure_stack_free.c
index eb2d6b0e..75a26945 100644
--- a/ports/cortex_m23/iar/src/txe_thread_secure_stack_free.c
+++ b/ports/cortex_m23/iar/src/txe_thread_secure_stack_free.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,12 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
{
@@ -74,10 +69,10 @@ UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m3/ac5/example_build/sample_threadx.c b/ports/cortex_m3/ac5/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/cortex_m3/ac5/example_build/sample_threadx.c
+++ b/ports/cortex_m3/ac5/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m3/ac5/example_build/tx_initialize_low_level.s b/ports/cortex_m3/ac5/example_build/tx_initialize_low_level.s
index 696ea4ef..f0c38db2 100644
--- a/ports/cortex_m3/ac5/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_m3/ac5/example_build/tx_initialize_low_level.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -122,12 +122,6 @@ Reset_Handler
;/* */
;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
;{
diff --git a/ports/cortex_m3/ac5/inc/tx_port.h b/ports/cortex_m3/ac5/inc/tx_port.h
index bf8459e7..32e640ba 100644
--- a/ports/cortex_m3/ac5/inc/tx_port.h
+++ b/ports/cortex_m3/ac5/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,23 +46,6 @@
/* This file replaces the previous Cortex-M3/M4/M7 files. It unifies */
/* the ARMv7-M architecture and compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comments, updated */
-/* typedef to fix misra */
-/* violation, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -371,7 +355,7 @@ void _tx_vfp_access(void);
/* A thread can be terminated by another thread, so we first check if it's self-terminating and not in an ISR.
If so, deactivate the FPU via CONTROL.FPCA. Otherwise we are in an interrupt or another thread is terminating
- this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
+ this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
the lazy FPU save, then restore the CONTROL.FPCA state. */
#ifndef TX_MISRA_ENABLE
@@ -530,7 +514,7 @@ ULONG _tx_misra_ipsr_get(VOID);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) (b) = (UINT) __clz(__rbit((m)));
#elif defined(__GNUC__) /* GCC and AC6 Compiler */
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) __asm__ volatile (" RBIT %0,%1 ": "=r" (m) : "r" (m) ); \
- __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
+ __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
#endif
@@ -715,7 +699,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M3/AC5 Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M3/AC5 Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m3/ac5/readme_threadx.txt b/ports/cortex_m3/ac5/readme_threadx.txt
index b7b7cee9..e261213e 100644
--- a/ports/cortex_m3/ac5/readme_threadx.txt
+++ b/ports/cortex_m3/ac5/readme_threadx.txt
@@ -5,14 +5,14 @@
1. Building the ThreadX run-time Library
-Navigate to the "example_build" directory. Ensure that
-you have setup your path and other environment variables necessary for the AC5
-compiler. At this point you may run the build_threadx.bat batch file. This will
-build the ThreadX run-time environment in the "example_build" directory.
+Navigate to the "example_build" directory. Ensure that
+you have setup your path and other environment variables necessary for the AC5
+compiler. At this point you may run the build_threadx.bat batch file. This will
+build the ThreadX run-time environment in the "example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
@@ -21,28 +21,28 @@ application in order to use ThreadX.
The ThreadX demonstration is designed to execute under the ARM DS Cortex-M
simulator.
-Building the demonstration is easy; simply execute the build_threadx_sample.bat
+Building the demonstration is easy; simply execute the build_threadx_sample.bat
batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.axf
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.axf
is a binary file that can be downloaded and executed on the ARM DS Cortex-M
simulator.
3. System Initialization
-The entry point in ThreadX for the Cortex-M using AC5 tools is at label
-__main. This is defined within the AC5 compiler's startup code. In
-addition, this is where all static and global pre-set C variable
+The entry point in ThreadX for the Cortex-M using AC5 tools is at label
+__main. This is defined within the AC5 compiler's startup code. In
+addition, this is where all static and global pre-set C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -51,7 +51,7 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -134,21 +134,21 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
@@ -187,8 +187,8 @@ your_assembly_isr
7. FPU Support
-ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context - no additional setup by the application.
diff --git a/ports/cortex_m3/ac5/src/tx_thread_context_restore.s b/ports/cortex_m3/ac5/src/tx_thread_context_restore.s
index 23503273..d8c8d6dd 100644
--- a/ports/cortex_m3/ac5/src/tx_thread_context_restore.s
+++ b/ports/cortex_m3/ac5/src/tx_thread_context_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* CALLED BY */
/* */
/* ISRs Interrupt Service Routines */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m3/ac5/src/tx_thread_context_save.s b/ports/cortex_m3/ac5/src/tx_thread_context_save.s
index 75a68861..3d59c966 100644
--- a/ports/cortex_m3/ac5/src/tx_thread_context_save.s
+++ b/ports/cortex_m3/ac5/src/tx_thread_context_save.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m3/ac5/src/tx_thread_interrupt_control.s b/ports/cortex_m3/ac5/src/tx_thread_interrupt_control.s
index 050d349d..340ef0f6 100644
--- a/ports/cortex_m3/ac5/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_m3/ac5/src/tx_thread_interrupt_control.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,15 +55,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m3/ac5/src/tx_thread_interrupt_disable.s b/ports/cortex_m3/ac5/src/tx_thread_interrupt_disable.s
index 01642018..86308572 100644
--- a/ports/cortex_m3/ac5/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_m3/ac5/src/tx_thread_interrupt_disable.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,15 +55,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m3/ac5/src/tx_thread_interrupt_restore.s b/ports/cortex_m3/ac5/src/tx_thread_interrupt_restore.s
index d5b937f6..917db4e4 100644
--- a/ports/cortex_m3/ac5/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_m3/ac5/src/tx_thread_interrupt_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,15 +55,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m3/ac5/src/tx_thread_schedule.s b/ports/cortex_m3/ac5/src/tx_thread_schedule.s
index 44449388..84613f2d 100644
--- a/ports/cortex_m3/ac5/src/tx_thread_schedule.s
+++ b/ports/cortex_m3/ac5/src/tx_thread_schedule.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,17 +68,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
diff --git a/ports/cortex_m3/ac5/src/tx_thread_stack_build.s b/ports/cortex_m3/ac5/src/tx_thread_stack_build.s
index fa77e2d6..6639bdf8 100644
--- a/ports/cortex_m3/ac5/src/tx_thread_stack_build.s
+++ b/ports/cortex_m3/ac5/src/tx_thread_stack_build.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* CALLED BY */
/* */
/* _tx_thread_create Create thread service */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m3/ac5/src/tx_thread_system_return.s b/ports/cortex_m3/ac5/src/tx_thread_system_return.s
index 53d48047..e10d05c6 100644
--- a/ports/cortex_m3/ac5/src/tx_thread_system_return.s
+++ b/ports/cortex_m3/ac5/src/tx_thread_system_return.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* CALLED BY */
/* */
/* ThreadX components */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m3/ac5/src/tx_timer_interrupt.s b/ports/cortex_m3/ac5/src/tx_timer_interrupt.s
index b87639de..68b30e98 100644
--- a/ports/cortex_m3/ac5/src/tx_timer_interrupt.s
+++ b/ports/cortex_m3/ac5/src/tx_timer_interrupt.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,18 +72,6 @@
/* CALLED BY */
/* */
/* interrupt vector */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comment(s), added */
-/* TX_NO_TIMER support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m3/ac6/example_build/sample_threadx/.cproject b/ports/cortex_m3/ac6/example_build/sample_threadx/.cproject
index 5f5a5f66..5aedaf80 100644
--- a/ports/cortex_m3/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_m3/ac6/example_build/sample_threadx/.cproject
@@ -1,170 +1,170 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_m3/ac6/example_build/sample_threadx/exceptions.c b/ports/cortex_m3/ac6/example_build/sample_threadx/exceptions.c
index 94c87d7a..f0dd8600 100644
--- a/ports/cortex_m3/ac6/example_build/sample_threadx/exceptions.c
+++ b/ports/cortex_m3/ac6/example_build/sample_threadx/exceptions.c
@@ -1,7 +1,7 @@
/*
** Copyright (c) 2006-2017 Arm Limited (or its affiliates). All rights reserved.
** Use, modification and redistribution of this file is subject to your possession of a
-** valid End User License Agreement for the Arm Product of which these examples are part of
+** valid End User License Agreement for the Arm Product of which these examples are part of
** and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_m3/ac6/example_build/sample_threadx/sample_threadx.c b/ports/cortex_m3/ac6/example_build/sample_threadx/sample_threadx.c
index 597f373c..13ffadba 100644
--- a/ports/cortex_m3/ac6/example_build/sample_threadx/sample_threadx.c
+++ b/ports/cortex_m3/ac6/example_build/sample_threadx/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -81,42 +81,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -124,23 +124,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -243,11 +243,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -306,7 +306,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -359,7 +359,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m3/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_m3/ac6/example_build/sample_threadx/sample_threadx.scat
index 8578282d..7e806ce3 100644
--- a/ports/cortex_m3/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_m3/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -3,7 +3,7 @@
;*******************************************************
; Copyright (c) 2006-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;*******************************************************
diff --git a/ports/cortex_m3/ac6/example_build/sample_threadx/tx_initialize_low_level.S b/ports/cortex_m3/ac6/example_build/sample_threadx/tx_initialize_low_level.S
index bd52395a..b5ef57e5 100644
--- a/ports/cortex_m3/ac6/example_build/sample_threadx/tx_initialize_low_level.S
+++ b/ports/cortex_m3/ac6/example_build/sample_threadx/tx_initialize_low_level.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -75,12 +75,6 @@ SYSTICK_CYCLES = ((SYSTEM_CLOCK / 100) -1)
@/* */
@/* _tx_initialize_kernel_enter ThreadX entry function */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* */
@/**************************************************************************/
@VOID _tx_initialize_low_level(VOID)
@{
diff --git a/ports/cortex_m3/ac6/example_build/tx/.cproject b/ports/cortex_m3/ac6/example_build/tx/.cproject
index a3f5ed91..bf2786fa 100644
--- a/ports/cortex_m3/ac6/example_build/tx/.cproject
+++ b/ports/cortex_m3/ac6/example_build/tx/.cproject
@@ -1,146 +1,146 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_m3/ac6/inc/tx_port.h b/ports/cortex_m3/ac6/inc/tx_port.h
index f984b3e9..0a25ae64 100644
--- a/ports/cortex_m3/ac6/inc/tx_port.h
+++ b/ports/cortex_m3/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,23 +46,6 @@
/* This file replaces the previous Cortex-M3/M4/M7 files. It unifies */
/* the ARMv7-M architecture and compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comments, updated */
-/* typedef to fix misra */
-/* violation, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -371,7 +355,7 @@ void _tx_vfp_access(void);
/* A thread can be terminated by another thread, so we first check if it's self-terminating and not in an ISR.
If so, deactivate the FPU via CONTROL.FPCA. Otherwise we are in an interrupt or another thread is terminating
- this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
+ this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
the lazy FPU save, then restore the CONTROL.FPCA state. */
#ifndef TX_MISRA_ENABLE
@@ -530,7 +514,7 @@ ULONG _tx_misra_ipsr_get(VOID);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) (b) = (UINT) __clz(__rbit((m)));
#elif defined(__GNUC__) /* GCC and AC6 Compiler */
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) __asm__ volatile (" RBIT %0,%1 ": "=r" (m) : "r" (m) ); \
- __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
+ __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
#endif
@@ -715,7 +699,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M3/AC6 Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M3/AC6 Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m3/ac6/readme_threadx.txt b/ports/cortex_m3/ac6/readme_threadx.txt
index d98c90cb..6447c517 100644
--- a/ports/cortex_m3/ac6/readme_threadx.txt
+++ b/ports/cortex_m3/ac6/readme_threadx.txt
@@ -5,12 +5,12 @@
1. Building the ThreadX run-time Library
-In order to build the ThreadX library and the ThreadX demonstration, first import
-the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
+In order to build the ThreadX library and the ThreadX demonstration, first import
+the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
into your DS workspace.
-Building the ThreadX library is easy; simply right-click the Eclipse project
-"tx" and then select the "Build Project" button. You should now observe the compilation
+Building the ThreadX library is easy; simply right-click the Eclipse project
+"tx" and then select the "Build Project" button. You should now observe the compilation
and assembly of the ThreadX library. This project build produces the ThreadX
library file tx.a.
@@ -20,27 +20,27 @@ library file tx.a.
The ThreadX demonstration is designed to execute under the DS debugger on the
MPS2_Cortex_Mx Bare Metal simulator.
-Building the demonstration is easy; simply right-click the Eclipse project
-"sample_threadx" and then select the "Build Project" button. You should now observe
-the compilation and assembly of the ThreadX demonstration. This project build produces
-the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
+Building the demonstration is easy; simply right-click the Eclipse project
+"sample_threadx" and then select the "Build Project" button. You should now observe
+the compilation and assembly of the ThreadX demonstration. This project build produces
+the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
in the Project Explorer window, right-click on the 'cortex-mx_tx.launch' file, click
'Debug As', and then click 'cortex-mx_tx' from the submenu. This will cause the
-debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
+debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
to execute the ThreadX demonstration.
3. System Initialization
-The entry point in ThreadX for the Cortex-M using AC6 tools uses the standard GNU
+The entry point in ThreadX for the Cortex-M using AC6 tools uses the standard GNU
Cortex-M reset sequence. From the reset vector the C runtime will be initialized.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.S file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -49,7 +49,7 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -132,34 +132,34 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
6.1 Vector Area
The Cortex-M vectors start at the label __tx_vectors or similar. The application may modify
-the vector area according to its needs. There is code in tx_initialize_low_level() that will
-configure the vector base register.
+the vector area according to its needs. There is code in tx_initialize_low_level() that will
+configure the vector base register.
6.2 Managed Interrupts
-A ThreadX managed interrupt is defined below. By following these conventions, the
+A ThreadX managed interrupt is defined below. By following these conventions, the
application ISR is then allowed access to various ThreadX services from the ISR.
Here is the standard template for managed ISRs in ThreadX:
@@ -181,15 +181,15 @@ __tx_IntHandler:
Note: the Cortex-M requires exception handlers to be thumb labels, this implies bit 0 set.
To accomplish this, the declaration of the label has to be preceded by the assembler directive
-.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
-be inserted in the correct location in the interrupt vector table. This table is typically
+.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
+be inserted in the correct location in the interrupt vector table. This table is typically
located in either your runtime startup file or in the tx_initialize_low_level.S file.
7. FPU Support
-ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context - no additional setup by the application.
diff --git a/ports/cortex_m3/ac6/src/tx_misra.S b/ports/cortex_m3/ac6/src/tx_misra.S
index 8ac0c629..10548671 100644
--- a/ports/cortex_m3/ac6/src/tx_misra.S
+++ b/ports/cortex_m3/ac6/src/tx_misra.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -667,7 +668,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -682,7 +683,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARM_FP
/***********************************************************************************************/
@@ -699,8 +700,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -714,9 +715,9 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
+
.data
.word 0
diff --git a/ports/cortex_m3/ac6/src/tx_thread_context_restore.S b/ports/cortex_m3/ac6/src/tx_thread_context_restore.S
index 949478b5..bc2b4752 100644
--- a/ports/cortex_m3/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_m3/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m3/ac6/src/tx_thread_context_save.S b/ports/cortex_m3/ac6/src/tx_thread_context_save.S
index f6a10399..22f46a26 100644
--- a/ports/cortex_m3/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_m3/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,14 +61,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m3/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_m3/ac6/src/tx_thread_interrupt_control.S
index dcc24d49..c2435528 100644
--- a/ports/cortex_m3/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_m3/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m3/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_m3/ac6/src/tx_thread_interrupt_disable.S
index a1a0b459..37525e38 100644
--- a/ports/cortex_m3/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_m3/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m3/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_m3/ac6/src/tx_thread_interrupt_restore.S
index bc5b910a..3c3e2473 100644
--- a/ports/cortex_m3/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_m3/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m3/ac6/src/tx_thread_schedule.S b/ports/cortex_m3/ac6/src/tx_thread_schedule.S
index 5f22b3ff..98d21f36 100644
--- a/ports/cortex_m3/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_m3/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,16 +71,6 @@
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
diff --git a/ports/cortex_m3/ac6/src/tx_thread_stack_build.S b/ports/cortex_m3/ac6/src/tx_thread_stack_build.S
index d5cc0b49..31303ef8 100644
--- a/ports/cortex_m3/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_m3/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m3/ac6/src/tx_thread_system_return.S b/ports/cortex_m3/ac6/src/tx_thread_system_return.S
index e7471605..e1c5c2a2 100644
--- a/ports/cortex_m3/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_m3/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m3/ac6/src/tx_timer_interrupt.S b/ports/cortex_m3/ac6/src/tx_timer_interrupt.S
index ee13bef8..05d5c227 100644
--- a/ports/cortex_m3/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_m3/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,17 +71,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comment(s), added */
-/* TX_NO_TIMER support, */
-/* resulting in version 6.1.10 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m3/ghs/example_build/sample_threadx.c b/ports/cortex_m3/ghs/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/cortex_m3/ghs/example_build/sample_threadx.c
+++ b/ports/cortex_m3/ghs/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m3/ghs/example_build/tx_initialize_low_level.arm b/ports/cortex_m3/ghs/example_build/tx_initialize_low_level.arm
index f8b7bb8e..9259c2f4 100644
--- a/ports/cortex_m3/ghs/example_build/tx_initialize_low_level.arm
+++ b/ports/cortex_m3/ghs/example_build/tx_initialize_low_level.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_m3/ghs/inc/tx_el.h b/ports/cortex_m3/ghs/inc/tx_el.h
index b8926921..72e5bbe3 100644
--- a/ports/cortex_m3/ghs/inc/tx_el.h
+++ b/ports/cortex_m3/ghs/inc/tx_el.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,12 +37,6 @@
/* EventAnalyzer. It is assumed that tx_api.h and tx_port.h have */
/* already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_EL_H
diff --git a/ports/cortex_m3/ghs/inc/tx_port.h b/ports/cortex_m3/ghs/inc/tx_port.h
index 346a8475..1327b3a7 100644
--- a/ports/cortex_m3/ghs/inc/tx_port.h
+++ b/ports/cortex_m3/ghs/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -379,7 +371,7 @@ asm void restore_ints(int a)
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M3/GHS Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M3/GHS Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_m3/ghs/readme_threadx.txt b/ports/cortex_m3/ghs/readme_threadx.txt
index ad1110fe..02f70c65 100644
--- a/ports/cortex_m3/ghs/readme_threadx.txt
+++ b/ports/cortex_m3/ghs/readme_threadx.txt
@@ -4,16 +4,16 @@
1. Open the ThreadX Project Workspace
-In order to build the ThreadX library and the ThreadX demonstration first load
-the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
-"example_build" directory.
+In order to build the ThreadX library and the ThreadX demonstration first load
+the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
+"example_build" directory.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply select the MULTI project file
-tx.gpj and then select the build button. You should now observe the
-compilation and assembly of the ThreadX library. This project build produces
+Building the ThreadX library is easy; simply select the MULTI project file
+tx.gpj and then select the build button. You should now observe the
+compilation and assembly of the ThreadX library. This project build produces
the ThreadX library file tx.a.
@@ -21,52 +21,52 @@ the ThreadX library file tx.a.
The ThreadX demonstration is designed to execute under the MULTI environment
on the Green Hills Cortex-M3 simulator. The instructions that follow describe
-how to get the ThreadX evaluation running under the MULTI Cortex-M3 simulation
+how to get the ThreadX evaluation running under the MULTI Cortex-M3 simulation
environment.
-Building the demonstration is easy; simply select the MULTI project file
-sample_threadx.gpj. At this point, select the "Project Build" button and observe
-the compilation, assembly, and linkage of the ThreadX demonstration application.
+Building the demonstration is easy; simply select the MULTI project file
+sample_threadx.gpj. At this point, select the "Project Build" button and observe
+the compilation, assembly, and linkage of the ThreadX demonstration application.
-After the demonstration is built, invoke the MULTI ARM simulator by selecting
-the simulator connection from within the sample_threadx.con connection file.
-Once connected to the simulator, select the "Debug" button. You should now
-observe the main function of sample_threadx.c.
+After the demonstration is built, invoke the MULTI ARM simulator by selecting
+the simulator connection from within the sample_threadx.con connection file.
+Once connected to the simulator, select the "Debug" button. You should now
+observe the main function of sample_threadx.c.
-You are now ready to execute the ThreadX demonstration system. Select
-breakpoints and data watches to observe the execution of the sample_threadx.c
+You are now ready to execute the ThreadX demonstration system. Select
+breakpoints and data watches to observe the execution of the sample_threadx.c
application.
4. EventAnalyzer Demonstration
-To build a demonstration system that also logs events for the MULTI EventAnalyzer,
-perform the same steps as the regular demo, except build the ThreadX library with
-txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
-The resulting image will log all system events, which can then be displayed by the
+To build a demonstration system that also logs events for the MULTI EventAnalyzer,
+perform the same steps as the regular demo, except build the ThreadX library with
+txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
+The resulting image will log all system events, which can then be displayed by the
MULTI EventAnalyzer.
5. System Initialization
-The system entry point using the Green Hills tools is at the label _start.
-This is defined within the crt0.arm file supplied by Green Hills. In addition,
-this is where all static and global preset C variable initialization
+The system entry point using the Green Hills tools is at the label _start.
+This is defined within the crt0.arm file supplied by Green Hills. In addition,
+this is where all static and global preset C variable initialization
processing is called from.
After the Green Hills startup function returns, ThreadX initialization is
called. The main initialization function is _tx_initialize_low_level and
-is located in the file tx_initialize_low_level.arm. This function is responsible
-for setting up various system data structures, interrupt vectors, and the
+is located in the file tx_initialize_low_level.arm. This function is responsible
+for setting up various system data structures, interrupt vectors, and the
periodic timer interrupt source of ThreadX.
-In addition, _tx_initialize_low_level determines where the first available
+In addition, _tx_initialize_low_level determines where the first available
RAM memory address is located. This address is supplied to tx_application_define.
-By default, the first available RAM memory address is assumed to start at the
-beginning of the ThreadX section .free_mem. If changes are made to the
-sample_threadx.ld file, the .free_mem section should remain the last allocated
-section in the main RAM area. The starting address of this section is passed
+By default, the first available RAM memory address is assumed to start at the
+beginning of the ThreadX section .free_mem. If changes are made to the
+sample_threadx.ld file, the .free_mem section should remain the last allocated
+section in the main RAM area. The starting address of this section is passed
to tx_application_define.
@@ -75,11 +75,11 @@ to tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M3 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
- Stack Offset Stack Contents
+ Stack Offset Stack Contents
0x00 r4
0x04 r5
@@ -101,21 +101,21 @@ tx_thread_stack_ptr in the associated thread control block TX_THREAD.
7. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make ThreadX run faster, you can change the tx.gpj project
-to disable debug information and enable the desired optimizations.
+to disable debug information and enable the desired optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined before tx_api.h is included.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined before tx_api.h is included.
8. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M3
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
@@ -127,7 +127,7 @@ the vector area according to its needs.
8.2 Managed Interrupts
-A ThreadX managed interrupt is defined below. By following these conventions, the
+A ThreadX managed interrupt is defined below. By following these conventions, the
application ISR is then allowed access to various ThreadX services from the ISR.
Here is the standard template for managed ISRs in ThreadX:
@@ -136,7 +136,7 @@ Here is the standard template for managed ISRs in ThreadX:
__tx_IntHandler:
PUSH {lr}
BL _tx_thread_context_save
-
+
/* Do interrupt handler work here */
B _tx_thread_context_restore
@@ -154,7 +154,7 @@ information associated with this specific port of ThreadX:
03-02-2021 The following files were changed/added for version 6.1.5:
tx_thread_schedule.s Added low power feature
-05/19/2020 Initial ThreadX version of Cortex-M3/Green Hills port.
+05/19/2020 Initial ThreadX version of Cortex-M3/Green Hills port.
Copyright(c) 1996-2020 Microsoft Corporation
diff --git a/ports/cortex_m3/ghs/src/tx_el.c b/ports/cortex_m3/ghs/src/tx_el.c
index fd58768f..b5d3b8b7 100644
--- a/ports/cortex_m3/ghs/src/tx_el.c
+++ b/ports/cortex_m3/ghs/src/tx_el.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** ThreadX/GHS Event Log (EL) */
/** */
@@ -49,44 +50,38 @@ extern TX_THREAD *_tx_thread_current_ptr;
UINT _tx_thread_interrupt_control(UINT new_posture);
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_initialize PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_initialize PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function creates the Event Log (in the format dictated by the */
-/* GHS Event Analyzer) and sets up various information for subsequent */
-/* operation. The start and end of the Event Log is determined by the */
-/* .eventlog section in the linker control file. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function creates the Event Log (in the format dictated by the */
+/* GHS Event Analyzer) and sets up various information for subsequent */
+/* operation. The start and end of the Event Log is determined by the */
+/* .eventlog section in the linker control file. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
/* */
/**************************************************************************/
VOID _tx_el_initialize(VOID)
@@ -150,7 +145,7 @@ UINT i;
/* Setup event_ptr (pointer to oldest event) field to the start
of the event pool. */
- *_tx_el_current_event = (UCHAR *) (((ULONG) __ghsbegin_eventlog) + TX_EL_HEADER_SIZE +
+ *_tx_el_current_event = (UCHAR *) (((ULONG) __ghsbegin_eventlog) + TX_EL_HEADER_SIZE +
(TX_EL_TNIS * TX_EL_TNI_ENTRY_SIZE));
work_ptr = work_ptr + sizeof(ULONG);
@@ -166,17 +161,17 @@ UINT i;
/* Clear the entire TNI array, this is the initial setting. */
end_ptr = work_ptr + (TX_EL_TNIS * TX_EL_TNI_ENTRY_SIZE);
memset((void *)work_ptr, 0, (TX_EL_TNIS * TX_EL_TNI_ENTRY_SIZE));
- work_ptr = end_ptr;
+ work_ptr = end_ptr;
/* At this point, we are pointing at the actual Event Entry area. */
-
+
/* Remember the start of the actual event log area. */
_tx_el_event_area_start = work_ptr;
/* Clear the entire Event area. */
end_ptr = work_ptr + event_log_size;
memset((void *)work_ptr, 0, event_log_size);
- work_ptr = end_ptr;
+ work_ptr = end_ptr;
/* Save the end pointer for later use. */
_tx_el_event_area_end = work_ptr;
@@ -201,7 +196,7 @@ UINT i;
{
/* Yes, insert a NULL into the event log string. */
- *work_ptr = (unsigned char) 0;
+ *work_ptr = (unsigned char) 0;
}
/* Setup the thread ID to NULL. */
@@ -216,40 +211,40 @@ UINT i;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_thread_register PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_thread_register PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function registers a thread in the event log for future */
+/* */
+/* This function registers a thread in the event log for future */
/* display purposes. */
-/* */
-/* INPUT */
-/* */
-/* thread_ptr Pointer to thread control block */
-/* */
-/* OUTPUT */
-/* */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread control block */
+/* */
+/* OUTPUT */
+/* */
/* TX_SUCCESS Thread was placed in TNI area */
/* TX_ERROR No more room in the TNI area */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_thread_create ThreadX thread create function */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_thread_create ThreadX thread create function */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -278,7 +273,7 @@ UINT i;
i++;
entry_ptr = entry_ptr + TX_EL_TNI_ENTRY_SIZE;
}
-
+
/* Check to see if there were no more valid entries. */
if (i >= TX_EL_TNIS)
return(TX_EL_NO_MORE_TNI_ROOM);
@@ -304,7 +299,7 @@ UINT i;
{
/* Yes, insert a NULL into the event log string. */
- *work_ptr = (unsigned char) 0;
+ *work_ptr = (unsigned char) 0;
}
/* Setup the thread ID. */
@@ -321,40 +316,40 @@ UINT i;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_thread_unregister PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_thread_unregister PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function unregisters a thread in the event log for future */
+/* */
+/* This function unregisters a thread in the event log for future */
/* display purposes. */
-/* */
-/* INPUT */
-/* */
-/* thread_ptr Pointer to thread control block */
-/* */
-/* OUTPUT */
-/* */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread control block */
+/* */
+/* OUTPUT */
+/* */
/* TX_SUCCESS Thread was placed in TNI area */
/* TX_ERROR No more room in the TNI area */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_thread_create ThreadX thread create function */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_thread_create ThreadX thread create function */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -394,7 +389,7 @@ UINT i, j;
}
else if (*work_ptr == 0)
{
-
+
/* Null terminated, just break the loop. */
break;
}
@@ -426,7 +421,7 @@ UINT i, j;
i++;
entry_ptr = entry_ptr + TX_EL_TNI_ENTRY_SIZE;
}
-
+
/* Determine status to return. */
if (found)
return(TX_SUCCESS);
@@ -435,49 +430,49 @@ UINT i, j;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_user_event_insert PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_user_event_insert PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function inserts a user event into the event log. */
-/* If the event log is full, the oldest event is overwritten. */
-/* */
-/* INPUT */
-/* */
+/* If the event log is full, the oldest event is overwritten. */
+/* */
+/* INPUT */
+/* */
/* sub_type Event subtype for kernel call */
/* info_1 First information field */
/* info_2 Second information field */
/* info_3 Third information field */
/* info_4 Fourth information field */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* ThreadX services */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* ThreadX services */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* */
/**************************************************************************/
-VOID _tx_el_user_event_insert(UINT sub_type, ULONG info_1, ULONG info_2,
+VOID _tx_el_user_event_insert(UINT sub_type, ULONG info_1, ULONG info_2,
ULONG info_3, ULONG info_4)
{
@@ -545,7 +540,7 @@ UCHAR *entry_ptr;
if (entry_ptr >= _tx_el_event_area_end)
{
- /* Yes, we have wrapped around to the end of the event area.
+ /* Yes, we have wrapped around to the end of the event area.
Start back at the top! */
entry_ptr = _tx_el_event_area_start;
}
@@ -558,41 +553,41 @@ UCHAR *entry_ptr;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_thread_running PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_thread_running PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function inserts a thread change event into the event */
/* log, which indicates that a context switch is taking place. */
/* If the event log is full, the oldest event is overwritten. */
-/* */
-/* INPUT */
-/* */
+/* */
+/* INPUT */
+/* */
/* thread_ptr Pointer to thread being */
/* scheduled */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_thread_schedule ThreadX scheduler */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_thread_schedule ThreadX scheduler */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -604,7 +599,7 @@ VOID _tx_el_thread_running(TX_THREAD *thread_ptr)
UINT upper_tb;
UCHAR *entry_ptr;
- TX_EL_NO_STATUS_EVENTS
+ TX_EL_NO_STATUS_EVENTS
/* Increment total event counter. */
_tx_el_total_events++;
@@ -646,7 +641,7 @@ UCHAR *entry_ptr;
if (entry_ptr >= _tx_el_event_area_end)
{
- /* Yes, we have wrapped around to the end of the event area.
+ /* Yes, we have wrapped around to the end of the event area.
Start back at the top! */
entry_ptr = _tx_el_event_area_start;
}
@@ -658,43 +653,43 @@ UCHAR *entry_ptr;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_thread_preempted PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_thread_preempted PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function inserts a thread preempted event into the event */
/* log, which indicates that an interrupt occurred that made a higher */
/* priority thread ready for execution. In this case, the previously */
/* executing thread has an event entered to indicate it is no longer */
/* running. */
-/* */
-/* INPUT */
-/* */
+/* */
+/* INPUT */
+/* */
/* thread_ptr Pointer to thread being */
/* scheduled */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_thread_context_restore ThreadX context restore */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_thread_context_restore ThreadX context restore */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -707,7 +702,7 @@ UINT upper_tb;
UCHAR *entry_ptr;
- TX_EL_NO_STATUS_EVENTS
+ TX_EL_NO_STATUS_EVENTS
/* Increment total event counter. */
_tx_el_total_events++;
@@ -749,7 +744,7 @@ UCHAR *entry_ptr;
if (entry_ptr >= _tx_el_event_area_end)
{
- /* Yes, we have wrapped around to the end of the event area.
+ /* Yes, we have wrapped around to the end of the event area.
Start back at the top! */
entry_ptr = _tx_el_event_area_start;
}
@@ -761,40 +756,40 @@ UCHAR *entry_ptr;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_interrupt PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_interrupt PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function inserts an interrupt event into the log, which */
/* indicates the start of interrupt processing for the specific */
-/* */
-/* INPUT */
-/* */
+/* */
+/* INPUT */
+/* */
/* interrupt_number Interrupt number supplied by */
/* ISR */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* ISR processing */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* ISR processing */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -807,7 +802,7 @@ UINT upper_tb;
UCHAR *entry_ptr;
- TX_EL_NO_INTERRUPT_EVENTS
+ TX_EL_NO_INTERRUPT_EVENTS
/* Increment total event counter. */
_tx_el_total_events++;
@@ -853,7 +848,7 @@ UCHAR *entry_ptr;
if (entry_ptr >= _tx_el_event_area_end)
{
- /* Yes, we have wrapped around to the end of the event area.
+ /* Yes, we have wrapped around to the end of the event area.
Start back at the top! */
entry_ptr = _tx_el_event_area_start;
}
@@ -865,40 +860,40 @@ UCHAR *entry_ptr;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_interrupt_end PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_interrupt_end PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function inserts an interrupt end event into the log, which */
/* indicates the end of interrupt processing for the specific */
-/* */
-/* INPUT */
-/* */
+/* */
+/* INPUT */
+/* */
/* interrupt_number Interrupt number supplied by */
/* ISR */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* ISR processing */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* ISR processing */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -911,7 +906,7 @@ UINT upper_tb;
UCHAR *entry_ptr;
- TX_EL_NO_INTERRUPT_EVENTS
+ TX_EL_NO_INTERRUPT_EVENTS
/* Increment total event counter. */
_tx_el_total_events++;
@@ -957,7 +952,7 @@ UCHAR *entry_ptr;
if (entry_ptr >= _tx_el_event_area_end)
{
- /* Yes, we have wrapped around to the end of the event area.
+ /* Yes, we have wrapped around to the end of the event area.
Start back at the top! */
entry_ptr = _tx_el_event_area_start;
}
@@ -969,39 +964,39 @@ UCHAR *entry_ptr;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_interrupt_control PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_interrupt_control PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function remaps the tx_interrupt_control service call so that */
-/* it can be tracked in the event log. */
-/* */
-/* INPUT */
-/* */
+/* */
+/* This function remaps the tx_interrupt_control service call so that */
+/* it can be tracked in the event log. */
+/* */
+/* INPUT */
+/* */
/* new_posture New interrupt posture */
/* */
-/* OUTPUT */
-/* */
-/* old_posture Old interrupt posture */
-/* */
-/* CALLS */
-/* */
-/* _tx_thread_interrupt_control Interrupt control service */
-/* */
-/* CALLED BY */
-/* */
-/* ThreadX services */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* old_posture Old interrupt posture */
+/* */
+/* CALLS */
+/* */
+/* _tx_thread_interrupt_control Interrupt control service */
+/* */
+/* CALLED BY */
+/* */
+/* ThreadX services */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -1014,7 +1009,7 @@ TX_INTERRUPT_SAVE_AREA
UINT old_posture;
- TX_EL_NO_INTERRUPT_EVENTS
+ TX_EL_NO_INTERRUPT_EVENTS
TX_DISABLE
TX_EL_KERNEL_CALL_EVENT_INSERT_INFO2(TX_EL_INTERRUPT_CONTROL, _tx_thread_current_ptr, new_posture)
@@ -1027,38 +1022,38 @@ UINT old_posture;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_event_log_on PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_event_log_on PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function disables all event filters. */
-/* */
-/* INPUT */
-/* */
-/* None */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application code */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* This function disables all event filters. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application code */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -1072,39 +1067,39 @@ VOID _tx_el_event_log_on(void)
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_event_log_off PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_event_log_off PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function sets all event filters, thereby turning event */
-/* logging off. */
-/* */
-/* INPUT */
-/* */
-/* None */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application code */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* This function sets all event filters, thereby turning event */
+/* logging off. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application code */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -1118,38 +1113,38 @@ VOID _tx_el_event_log_off(void)
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_event_log_set PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_event_log_set PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function sets the events filters specified by the user. */
-/* */
-/* INPUT */
-/* */
-/* filter Events to filter */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application code */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* This function sets the events filters specified by the user. */
+/* */
+/* INPUT */
+/* */
+/* filter Events to filter */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application code */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
diff --git a/ports/cortex_m3/ghs/src/tx_ghs.c b/ports/cortex_m3/ghs/src/tx_ghs.c
index 0be9d715..30b8054e 100644
--- a/ports/cortex_m3/ghs/src/tx_ghs.c
+++ b/ports/cortex_m3/ghs/src/tx_ghs.c
@@ -55,7 +55,7 @@ extern TX_THREAD *_tx_thread_current_ptr;
If you customize the System Library, you should remove ind_thrd.c
from the libsys.gpj subproject.
-
+
*/
/* Provide global __eh_globals value to support C++ exception handling
diff --git a/ports/cortex_m3/ghs/src/tx_thread_context_restore.arm b/ports/cortex_m3/ghs/src/tx_thread_context_restore.arm
index d89fcfd6..89e8f9d5 100644
--- a/ports/cortex_m3/ghs/src/tx_thread_context_restore.arm
+++ b/ports/cortex_m3/ghs/src/tx_thread_context_restore.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
diff --git a/ports/cortex_m3/ghs/src/tx_thread_context_save.arm b/ports/cortex_m3/ghs/src/tx_thread_context_save.arm
index 13cd6d9e..ee496a2f 100644
--- a/ports/cortex_m3/ghs/src/tx_thread_context_save.arm
+++ b/ports/cortex_m3/ghs/src/tx_thread_context_save.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
diff --git a/ports/cortex_m3/ghs/src/tx_thread_interrupt_control.arm b/ports/cortex_m3/ghs/src/tx_thread_interrupt_control.arm
index fa8e83a6..114674c6 100644
--- a/ports/cortex_m3/ghs/src/tx_thread_interrupt_control.arm
+++ b/ports/cortex_m3/ghs/src/tx_thread_interrupt_control.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
diff --git a/ports/cortex_m3/ghs/src/tx_thread_interrupt_disable.arm b/ports/cortex_m3/ghs/src/tx_thread_interrupt_disable.arm
index 26dcfec2..295219c1 100644
--- a/ports/cortex_m3/ghs/src/tx_thread_interrupt_disable.arm
+++ b/ports/cortex_m3/ghs/src/tx_thread_interrupt_disable.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
diff --git a/ports/cortex_m3/ghs/src/tx_thread_interrupt_restore.arm b/ports/cortex_m3/ghs/src/tx_thread_interrupt_restore.arm
index b850d47b..f841f177 100644
--- a/ports/cortex_m3/ghs/src/tx_thread_interrupt_restore.arm
+++ b/ports/cortex_m3/ghs/src/tx_thread_interrupt_restore.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
diff --git a/ports/cortex_m3/ghs/src/tx_thread_schedule.arm b/ports/cortex_m3/ghs/src/tx_thread_schedule.arm
index 86ef0b20..aad9e090 100644
--- a/ports/cortex_m3/ghs/src/tx_thread_schedule.arm
+++ b/ports/cortex_m3/ghs/src/tx_thread_schedule.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
diff --git a/ports/cortex_m3/ghs/src/tx_thread_stack_build.arm b/ports/cortex_m3/ghs/src/tx_thread_stack_build.arm
index 30a47d88..9e1494ea 100644
--- a/ports/cortex_m3/ghs/src/tx_thread_stack_build.arm
+++ b/ports/cortex_m3/ghs/src/tx_thread_stack_build.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
diff --git a/ports/cortex_m3/ghs/src/tx_thread_system_return.arm b/ports/cortex_m3/ghs/src/tx_thread_system_return.arm
index a1cfe337..d62b43fd 100644
--- a/ports/cortex_m3/ghs/src/tx_thread_system_return.arm
+++ b/ports/cortex_m3/ghs/src/tx_thread_system_return.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
diff --git a/ports/cortex_m3/ghs/src/tx_timer_interrupt.arm b/ports/cortex_m3/ghs/src/tx_timer_interrupt.arm
index 16d0c031..c17b147e 100644
--- a/ports/cortex_m3/ghs/src/tx_timer_interrupt.arm
+++ b/ports/cortex_m3/ghs/src/tx_timer_interrupt.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
diff --git a/ports/cortex_m3/gnu/example_build/cortexm3_crt0.S b/ports/cortex_m3/gnu/example_build/cortexm3_crt0.S
index 4228fc11..e06430d7 100644
--- a/ports/cortex_m3/gnu/example_build/cortexm3_crt0.S
+++ b/ports/cortex_m3/gnu/example_build/cortexm3_crt0.S
@@ -39,7 +39,7 @@ crt0_ctor_loop:
beq crt0_ctor_end
ldr r2, [r0]
add r0, #4
- push {r0-r1}
+ push {r0-r1}
blx r2
pop {r0-r1}
b crt0_ctor_loop
@@ -88,4 +88,3 @@ memory_set_done:
.section .stack, "wa", %nobits
.section .stack_process, "wa", %nobits
.section .heap, "wa", %nobits
-
\ No newline at end of file
diff --git a/ports/cortex_m3/gnu/example_build/cortexm3_vectors.S b/ports/cortex_m3/gnu/example_build/cortexm3_vectors.S
index 6ae558e4..dc8d0aad 100644
--- a/ports/cortex_m3/gnu/example_build/cortexm3_vectors.S
+++ b/ports/cortex_m3/gnu/example_build/cortexm3_vectors.S
@@ -4,8 +4,8 @@
.global __tx_BadHandler
.global __tx_SVCallHandler
.global __tx_DBGHandler
- .global __tx_PendSVHandler
- .global __tx_SysTickHandler
+ .global __tx_PendSVHandler
+ .global __tx_SysTickHandler
.global __tx_BadHandler
.syntax unified
@@ -15,9 +15,9 @@
.global _vectors
_vectors:
- .word __stack_end__
- .word reset_handler
- .word __tx_NMIHandler
+ .word __stack_end__
+ .word reset_handler
+ .word __tx_NMIHandler
.word __tx_HardfaultHandler
.word __tx_BadHandler
.word __tx_BadHandler
@@ -29,7 +29,7 @@ _vectors:
.word __tx_SVCallHandler //_SVC_Handler - used by Threadx scheduler //
.word __tx_DBGHandler
.word 0 // Reserved
- .word __tx_PendSVHandler
+ .word __tx_PendSVHandler
.word __tx_SysTickHandler // Used by Threadx timer functionality
.word __tx_BadHandler // Populate with user Interrupt handler
.word __tx_BadHandler
diff --git a/ports/cortex_m3/gnu/example_build/sample_threadx.c b/ports/cortex_m3/gnu/example_build/sample_threadx.c
index 597f373c..13ffadba 100644
--- a/ports/cortex_m3/gnu/example_build/sample_threadx.c
+++ b/ports/cortex_m3/gnu/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -81,42 +81,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -124,23 +124,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -243,11 +243,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -306,7 +306,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -359,7 +359,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m3/gnu/example_build/sample_threadx.ld b/ports/cortex_m3/gnu/example_build/sample_threadx.ld
index c65a1346..3f19c29e 100644
--- a/ports/cortex_m3/gnu/example_build/sample_threadx.ld
+++ b/ports/cortex_m3/gnu/example_build/sample_threadx.ld
@@ -10,7 +10,7 @@ __HEAPSIZE__ = 128;
SECTIONS
{
- .vectors :
+ .vectors :
{
KEEP(*(.vectors .vectors.*))
} > FLASH
@@ -45,7 +45,7 @@ SECTIONS
KEEP(*(.eh_frame*))
} > FLASH
- .ARM.extab :
+ .ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > FLASH
@@ -59,7 +59,7 @@ SECTIONS
__data_load_start__ = ALIGN (4);
- .data : AT (__data_load_start__)
+ .data : AT (__data_load_start__)
{
__data_start__ = .;
@@ -89,7 +89,7 @@ SECTIONS
KEEP(*(.jcr*))
. = ALIGN(4);
/* All data end */
-
+
__data_end__ = .;
} > RAM
@@ -104,7 +104,7 @@ SECTIONS
__bss_end__ = .;
} > RAM
-
+
.heap (COPY):
{
__heap_start__ = ALIGN(4);
diff --git a/ports/cortex_m3/gnu/example_build/tx_initialize_low_level.S b/ports/cortex_m3/gnu/example_build/tx_initialize_low_level.S
index c0dbf150..1a724410 100644
--- a/ports/cortex_m3/gnu/example_build/tx_initialize_low_level.S
+++ b/ports/cortex_m3/gnu/example_build/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,16 +73,6 @@ SYSTICK_CYCLES = ((SYSTEM_CLOCK / 100) -1)
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 William E. Lamie Modified Comment(s), fixed */
-/* GNU assembly comment, clean */
-/* up whitespace, resulting */
-/* in version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_m3/gnu/inc/tx_port.h b/ports/cortex_m3/gnu/inc/tx_port.h
index c3295d96..23affb8b 100644
--- a/ports/cortex_m3/gnu/inc/tx_port.h
+++ b/ports/cortex_m3/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,23 +46,6 @@
/* This file replaces the previous Cortex-M3/M4/M7 files. It unifies */
/* the ARMv7-M architecture and compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comments, updated */
-/* typedef to fix misra */
-/* violation, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -371,7 +355,7 @@ void _tx_vfp_access(void);
/* A thread can be terminated by another thread, so we first check if it's self-terminating and not in an ISR.
If so, deactivate the FPU via CONTROL.FPCA. Otherwise we are in an interrupt or another thread is terminating
- this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
+ this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
the lazy FPU save, then restore the CONTROL.FPCA state. */
#ifndef TX_MISRA_ENABLE
@@ -530,7 +514,7 @@ ULONG _tx_misra_ipsr_get(VOID);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) (b) = (UINT) __clz(__rbit((m)));
#elif defined(__GNUC__) /* GCC and AC6 Compiler */
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) __asm__ volatile (" RBIT %0,%1 ": "=r" (m) : "r" (m) ); \
- __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
+ __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
#endif
@@ -715,7 +699,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M3/GNU Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M3/GNU Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m3/gnu/readme_threadx.txt b/ports/cortex_m3/gnu/readme_threadx.txt
index d9063d65..58181f85 100644
--- a/ports/cortex_m3/gnu/readme_threadx.txt
+++ b/ports/cortex_m3/gnu/readme_threadx.txt
@@ -5,15 +5,15 @@
1. Building the ThreadX run-time Library
-Navigate to the "example_build" directory. Ensure that
-you have setup your path and other environment variables necessary for the ARM
-GNU compiler. At this point you may run the build_threadx.bat batch file.
-This will build the ThreadX run-time environment in the "example_build"
-directory.
+Navigate to the "example_build" directory. Ensure that
+you have setup your path and other environment variables necessary for the ARM
+GNU compiler. At this point you may run the build_threadx.bat batch file.
+This will build the ThreadX run-time environment in the "example_build"
+directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
@@ -22,25 +22,25 @@ application in order to use ThreadX.
The ThreadX demonstration is designed to execute on Cortex-M evaluation boards
or on a dedicated simulator.
-Building the demonstration is easy, simply execute the build_threadx_sample.bat
+Building the demonstration is easy, simply execute the build_threadx_sample.bat
batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.out is a binary
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.out is a binary
file that can be downloaded and executed on the a simulator, or downloaded to a board.
3. System Initialization
-The entry point in ThreadX for the Cortex-M using gnu tools uses the standard GNU
+The entry point in ThreadX for the Cortex-M using gnu tools uses the standard GNU
Cortex-M reset sequence. From the reset vector the C runtime will be initialized.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.S file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -49,7 +49,7 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -132,34 +132,34 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-The distribution version of ThreadX is built without any compiler optimizations.
-This makes it easy to debug because you can trace or set breakpoints inside of
-ThreadX itself. Of course, this costs some performance. To make it run faster,
-you can change the build_threadx.bat file to remove the -g option and enable
-all compiler optimizations.
+The distribution version of ThreadX is built without any compiler optimizations.
+This makes it easy to debug because you can trace or set breakpoints inside of
+ThreadX itself. Of course, this costs some performance. To make it run faster,
+you can change the build_threadx.bat file to remove the -g option and enable
+all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
6.1 Vector Area
The Cortex-M vectors start at the label __tx_vectors or similar. The application may modify
-the vector area according to its needs. There is code in tx_initialize_low_level() that will
-configure the vector base register.
+the vector area according to its needs. There is code in tx_initialize_low_level() that will
+configure the vector base register.
6.2 Managed Interrupts
-A ThreadX managed interrupt is defined below. By following these conventions, the
+A ThreadX managed interrupt is defined below. By following these conventions, the
application ISR is then allowed access to various ThreadX services from the ISR.
Here is the standard template for managed ISRs in ThreadX:
@@ -181,15 +181,15 @@ __tx_IntHandler:
Note: the Cortex-M requires exception handlers to be thumb labels, this implies bit 0 set.
To accomplish this, the declaration of the label has to be preceded by the assembler directive
-.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
-be inserted in the correct location in the interrupt vector table. This table is typically
+.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
+be inserted in the correct location in the interrupt vector table. This table is typically
located in either your runtime startup file or in the tx_initialize_low_level.S file.
7. FPU Support
-ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context - no additional setup by the application.
diff --git a/ports/cortex_m3/gnu/src/tx_misra.S b/ports/cortex_m3/gnu/src/tx_misra.S
index 8ac0c629..10548671 100644
--- a/ports/cortex_m3/gnu/src/tx_misra.S
+++ b/ports/cortex_m3/gnu/src/tx_misra.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -667,7 +668,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -682,7 +683,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARM_FP
/***********************************************************************************************/
@@ -699,8 +700,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -714,9 +715,9 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
+
.data
.word 0
diff --git a/ports/cortex_m3/gnu/src/tx_thread_context_restore.S b/ports/cortex_m3/gnu/src/tx_thread_context_restore.S
index f36f0e79..1862bb58 100644
--- a/ports/cortex_m3/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_m3/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m3/gnu/src/tx_thread_context_save.S b/ports/cortex_m3/gnu/src/tx_thread_context_save.S
index bcc690d0..ac76a239 100644
--- a/ports/cortex_m3/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_m3/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m3/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_m3/gnu/src/tx_thread_interrupt_control.S
index e7ea870e..a56149e3 100644
--- a/ports/cortex_m3/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_m3/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m3/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_m3/gnu/src/tx_thread_interrupt_disable.S
index b0169c6d..dee2237f 100644
--- a/ports/cortex_m3/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_m3/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m3/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_m3/gnu/src/tx_thread_interrupt_restore.S
index ef0298b4..bd00f5f7 100644
--- a/ports/cortex_m3/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_m3/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m3/gnu/src/tx_thread_schedule.S b/ports/cortex_m3/gnu/src/tx_thread_schedule.S
index 22f4f38b..9581ec38 100644
--- a/ports/cortex_m3/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_m3/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,18 +69,6 @@
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Fixed predefined macro name, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
diff --git a/ports/cortex_m3/gnu/src/tx_thread_stack_build.S b/ports/cortex_m3/gnu/src/tx_thread_stack_build.S
index d78ebdc1..5b7d97c4 100644
--- a/ports/cortex_m3/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_m3/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m3/gnu/src/tx_thread_system_return.S b/ports/cortex_m3/gnu/src/tx_thread_system_return.S
index 3fa0c7a2..9d9a32fc 100644
--- a/ports/cortex_m3/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_m3/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m3/gnu/src/tx_timer_interrupt.S b/ports/cortex_m3/gnu/src/tx_timer_interrupt.S
index fc3e9db3..7f9a4359 100644
--- a/ports/cortex_m3/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_m3/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,17 +71,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comment(s), added */
-/* TX_NO_TIMER support, */
-/* resulting in version 6.1.10 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m3/iar/CMakeLists.txt b/ports/cortex_m3/iar/CMakeLists.txt
index a524d79f..57be3aeb 100644
--- a/ports/cortex_m3/iar/CMakeLists.txt
+++ b/ports/cortex_m3/iar/CMakeLists.txt
@@ -7,7 +7,7 @@ target_sources(${PROJECT_NAME}
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_save.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_control.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_disable.S
- ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_restore.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_restore.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_schedule.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_build.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_return.S
diff --git a/ports/cortex_m3/iar/example_build/cstartup_M.s b/ports/cortex_m3/iar/example_build/cstartup_M.s
index 75d9369b..d1c5aa3e 100644
--- a/ports/cortex_m3/iar/example_build/cstartup_M.s
+++ b/ports/cortex_m3/iar/example_build/cstartup_M.s
@@ -2,16 +2,16 @@
PUBLIC __vector_table
SECTION .text:CODE:REORDER(1)
-
+
;; Keep vector table even if it's not referenced
REQUIRE __vector_table
-
+
THUMB
-
+
;; Forward declaration of sections.
SECTION CSTACK:DATA:NOROOT(3)
SECTION .intvec:CODE:NOROOT(2)
-
+
DATA
__vector_table
diff --git a/ports/cortex_m3/iar/example_build/sample_threadx.c b/ports/cortex_m3/iar/example_build/sample_threadx.c
index c67d75d0..a12160fa 100644
--- a/ports/cortex_m3/iar/example_build/sample_threadx.c
+++ b/ports/cortex_m3/iar/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -85,7 +85,7 @@ CHAR *pointer = TX_NULL;
#ifdef TX_ENABLE_EVENT_TRACE
tx_trace_enable(trace_buffer, sizeof(trace_buffer), 32);
#endif
-
+
/* Create a byte memory pool from which to allocate the thread stacks. */
tx_byte_pool_create(&byte_pool_0, "byte pool 0", byte_pool_memory, DEMO_BYTE_POOL_SIZE);
@@ -96,42 +96,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -139,23 +139,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -258,11 +258,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -321,7 +321,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -374,7 +374,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m3/iar/example_build/tx_initialize_low_level.s b/ports/cortex_m3/iar/example_build/tx_initialize_low_level.s
index 4a62fd94..bf7b64b0 100644
--- a/ports/cortex_m3/iar/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_m3/iar/example_build/tx_initialize_low_level.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -73,12 +73,6 @@ __tx_free_memory_start
;/* */
;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
;{
diff --git a/ports/cortex_m3/iar/inc/tx_port.h b/ports/cortex_m3/iar/inc/tx_port.h
index f9aee569..ff8b75ca 100644
--- a/ports/cortex_m3/iar/inc/tx_port.h
+++ b/ports/cortex_m3/iar/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,23 +46,6 @@
/* This file replaces the previous Cortex-M3/M4/M7 files. It unifies */
/* the ARMv7-M architecture and compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comments, updated */
-/* typedef to fix misra */
-/* violation, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -371,7 +355,7 @@ void _tx_vfp_access(void);
/* A thread can be terminated by another thread, so we first check if it's self-terminating and not in an ISR.
If so, deactivate the FPU via CONTROL.FPCA. Otherwise we are in an interrupt or another thread is terminating
- this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
+ this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
the lazy FPU save, then restore the CONTROL.FPCA state. */
#ifndef TX_MISRA_ENABLE
@@ -530,7 +514,7 @@ ULONG _tx_misra_ipsr_get(VOID);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) (b) = (UINT) __clz(__rbit((m)));
#elif defined(__GNUC__) /* GCC and AC6 Compiler */
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) __asm__ volatile (" RBIT %0,%1 ": "=r" (m) : "r" (m) ); \
- __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
+ __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
#endif
@@ -715,7 +699,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M3/IAR Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M3/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m3/iar/readme_threadx.txt b/ports/cortex_m3/iar/readme_threadx.txt
index 28b54e03..388c40e6 100644
--- a/ports/cortex_m3/iar/readme_threadx.txt
+++ b/ports/cortex_m3/iar/readme_threadx.txt
@@ -6,45 +6,45 @@
1. Building the ThreadX run-time Library
Building the ThreadX library is easy. First, open the Azure RTOS workspace
-azure_rtos.eww. Next, make the TX project the "active project" in the
-IAR Embedded Workbench and select the "Make" button. You should observe
-assembly and compilation of a series of ThreadX source files. This
-results in the ThreadX run-time library file tx.a, which is needed by
+azure_rtos.eww. Next, make the TX project the "active project" in the
+IAR Embedded Workbench and select the "Make" button. You should observe
+assembly and compilation of a series of ThreadX source files. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
2. Demonstration System
-The ThreadX demonstration is designed to execute under the IAR debugger under
+The ThreadX demonstration is designed to execute under the IAR debugger under
simulation.
Building the demonstration is easy; simply open the threadx.www workspace file,
-make the sample_threadx.ewp project the "active project" in the IAR Embedded
+make the sample_threadx.ewp project the "active project" in the IAR Embedded
Workbench, and select the "Make" button.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.out is a
-binary ELF file that can be downloaded and executed on the IAR Windows-based
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.out is a
+binary ELF file that can be downloaded and executed on the IAR Windows-based
Cortex-M simulator.
3. System Initialization
-The entry point in ThreadX for the Cortex-M using IAR tools is at label
-__iar_program_start. This is defined within the IAR compiler's startup code.
-In addition, this is where all static and global preset C variable
+The entry point in ThreadX for the Cortex-M using IAR tools is at label
+__iar_program_start. This is defined within the IAR compiler's startup code.
+In addition, this is where all static and global preset C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, and a periodic timer interrupt source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, and a periodic timer interrupt source.
By default, the vector area is defined at the top of cstartup_M.s, which is
-a slightly modified from the base IAR file.
+a slightly modified from the base IAR file.
The _tx_initialize_low_level function inside of tx_initialize_low_level.s
-also determines the first available address for use by the application, which
-is supplied as the sole input parameter to your application definition function,
-tx_application_define. To accomplish this, a section is created in
-tx_initialize_low_level.s called FREE_MEM, which must be located after all
+also determines the first available address for use by the application, which
+is supplied as the sole input parameter to your application definition function,
+tx_application_define. To accomplish this, a section is created in
+tx_initialize_low_level.s called FREE_MEM, which must be located after all
other RAM sections in memory.
@@ -53,7 +53,7 @@ other RAM sections in memory.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -136,20 +136,20 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
-The Cortex-M vectors start at the label __vector_table and is defined in cstartup_M.s.
+The Cortex-M vectors start at the label __vector_table and is defined in cstartup_M.s.
The application may modify the vector area according to its needs.
@@ -188,14 +188,14 @@ should have the following line added (if not already in place):
initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
-The project options "General Options -> Library Configuration" should also have the
+The project options "General Options -> Library Configuration" should also have the
"Enable thread support in library" box selected.
8. VFP Support
-ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context - no additional setup by the application.
diff --git a/ports/cortex_m3/iar/src/tx_iar.c b/ports/cortex_m3/iar/src/tx_iar.c
index c6092de3..238b485e 100644
--- a/ports/cortex_m3/iar/src/tx_iar.c
+++ b/ports/cortex_m3/iar/src/tx_iar.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,24 +423,24 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#include
+#include
void * __aeabi_read_tp();
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports/cortex_m3/iar/src/tx_misra.s b/ports/cortex_m3/iar/src/tx_misra.s
index f86d9a65..642bb89e 100644
--- a/ports/cortex_m3/iar/src/tx_misra.s
+++ b/ports/cortex_m3/iar/src/tx_misra.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -120,7 +121,7 @@
SECTION `.data`:DATA:REORDER:NOROOT(2)
DATA
-// 51 CHAR _tx_version_id[100] = "Copyright (c) 2024 Microsoft Corporation. * ThreadX 6.1 MISRA C Compliant *";
+// 51 CHAR _tx_version_id[100] = "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX 6.1 MISRA C Compliant *";
_tx_version_id:
DC8 43H, 6FH, 70H, 79H, 72H, 69H, 67H, 68H
DC8 74H, 20H, 28H, 63H, 29H, 20H, 31H, 39H
@@ -707,7 +708,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -722,7 +723,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARMVFP__
/***********************************************************************************************/
@@ -739,8 +740,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -754,10 +755,10 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
-
+
+
SECTION `.iar_vfe_header`:DATA:NOALLOC:NOROOT(2)
SECTION_TYPE SHT_PROGBITS, 0
DATA
diff --git a/ports/cortex_m3/iar/src/tx_thread_context_restore.s b/ports/cortex_m3/iar/src/tx_thread_context_restore.s
index 35aeaf5b..96b7d2d7 100644
--- a/ports/cortex_m3/iar/src/tx_thread_context_restore.s
+++ b/ports/cortex_m3/iar/src/tx_thread_context_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* CALLED BY */
/* */
/* ISRs Interrupt Service Routines */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m3/iar/src/tx_thread_context_save.s b/ports/cortex_m3/iar/src/tx_thread_context_save.s
index f8bf5036..9d575f8f 100644
--- a/ports/cortex_m3/iar/src/tx_thread_context_save.s
+++ b/ports/cortex_m3/iar/src/tx_thread_context_save.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m3/iar/src/tx_thread_interrupt_control.s b/ports/cortex_m3/iar/src/tx_thread_interrupt_control.s
index a0f3a5d0..75952281 100644
--- a/ports/cortex_m3/iar/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_m3/iar/src/tx_thread_interrupt_control.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m3/iar/src/tx_thread_interrupt_disable.s b/ports/cortex_m3/iar/src/tx_thread_interrupt_disable.s
index 999af964..ce7ceb62 100644
--- a/ports/cortex_m3/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_m3/iar/src/tx_thread_interrupt_disable.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m3/iar/src/tx_thread_interrupt_restore.s b/ports/cortex_m3/iar/src/tx_thread_interrupt_restore.s
index 2e55ed27..3cc26d93 100644
--- a/ports/cortex_m3/iar/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_m3/iar/src/tx_thread_interrupt_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m3/iar/src/tx_thread_schedule.s b/ports/cortex_m3/iar/src/tx_thread_schedule.s
index 882d2017..0ef3a88e 100644
--- a/ports/cortex_m3/iar/src/tx_thread_schedule.s
+++ b/ports/cortex_m3/iar/src/tx_thread_schedule.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,17 +68,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
diff --git a/ports/cortex_m3/iar/src/tx_thread_stack_build.s b/ports/cortex_m3/iar/src/tx_thread_stack_build.s
index 116ba71c..eb2c3ffb 100644
--- a/ports/cortex_m3/iar/src/tx_thread_stack_build.s
+++ b/ports/cortex_m3/iar/src/tx_thread_stack_build.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* CALLED BY */
/* */
/* _tx_thread_create Create thread service */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m3/iar/src/tx_thread_system_return.s b/ports/cortex_m3/iar/src/tx_thread_system_return.s
index a19bd35d..712a6e5c 100644
--- a/ports/cortex_m3/iar/src/tx_thread_system_return.s
+++ b/ports/cortex_m3/iar/src/tx_thread_system_return.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* CALLED BY */
/* */
/* ThreadX components */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m3/iar/src/tx_timer_interrupt.s b/ports/cortex_m3/iar/src/tx_timer_interrupt.s
index a2d8ca32..2801dd7d 100644
--- a/ports/cortex_m3/iar/src/tx_timer_interrupt.s
+++ b/ports/cortex_m3/iar/src/tx_timer_interrupt.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,18 +72,6 @@
/* CALLED BY */
/* */
/* interrupt vector */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comment(s), added */
-/* TX_NO_TIMER support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m3/keil/example_build/sample_threadx.c b/ports/cortex_m3/keil/example_build/sample_threadx.c
index 96c4eb5a..34453f42 100644
--- a/ports/cortex_m3/keil/example_build/sample_threadx.c
+++ b/ports/cortex_m3/keil/example_build/sample_threadx.c
@@ -77,35 +77,35 @@ void tx_application_define(void *first_unused_memory)
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- thread_0_stack, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ thread_0_stack, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- thread_1_stack, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ thread_1_stack, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- thread_2_stack, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ thread_2_stack, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- thread_3_stack, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ thread_3_stack, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- thread_4_stack, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ thread_4_stack, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- thread_5_stack, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ thread_5_stack, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Create the message queue shared by threads 1 and 2. */
@@ -189,11 +189,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -252,7 +252,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
diff --git a/ports/cortex_m3/keil/example_build/tx_initialize_low_level.s b/ports/cortex_m3/keil/example_build/tx_initialize_low_level.s
index 4ecf4ab2..9c6dd97c 100644
--- a/ports/cortex_m3/keil/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_m3/keil/example_build/tx_initialize_low_level.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -121,12 +121,6 @@ Reset_Handler
;/* */
;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
;{
diff --git a/ports/cortex_m3/keil/inc/tx_port.h b/ports/cortex_m3/keil/inc/tx_port.h
index dcf480e2..6ec876dc 100644
--- a/ports/cortex_m3/keil/inc/tx_port.h
+++ b/ports/cortex_m3/keil/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,23 +46,6 @@
/* This file replaces the previous Cortex-M3/M4/M7 files. It unifies */
/* the ARMv7-M architecture and compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comments, updated */
-/* typedef to fix misra */
-/* violation, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -371,7 +355,7 @@ void _tx_vfp_access(void);
/* A thread can be terminated by another thread, so we first check if it's self-terminating and not in an ISR.
If so, deactivate the FPU via CONTROL.FPCA. Otherwise we are in an interrupt or another thread is terminating
- this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
+ this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
the lazy FPU save, then restore the CONTROL.FPCA state. */
#ifndef TX_MISRA_ENABLE
@@ -530,7 +514,7 @@ ULONG _tx_misra_ipsr_get(VOID);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) (b) = (UINT) __clz(__rbit((m)));
#elif defined(__GNUC__) /* GCC and AC6 Compiler */
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) __asm__ volatile (" RBIT %0,%1 ": "=r" (m) : "r" (m) ); \
- __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
+ __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
#endif
@@ -715,7 +699,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M3/Keil Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M3/Keil Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m3/keil/readme_threadx.txt b/ports/cortex_m3/keil/readme_threadx.txt
index 9cd94bc2..7eee605e 100644
--- a/ports/cortex_m3/keil/readme_threadx.txt
+++ b/ports/cortex_m3/keil/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M3
+ Microsoft's Azure RTOS ThreadX for Cortex-M3
Thumb & 32-bit Mode
@@ -6,29 +6,29 @@
1. Building the ThreadX run-time Library
-Building the ThreadX library is easy, simply load the project file
-ThreadX_Library.Uv2, which is located inside the "example_build" directory.
+Building the ThreadX library is easy, simply load the project file
+ThreadX_Library.Uv2, which is located inside the "example_build" directory.
Once the ThreadX library files are displayed in the project window,
select the "Build Target" operation and observe the compilation and assembly
-of the ThreadX library. This project build produces the ThreadX library
+of the ThreadX library. This project build produces the ThreadX library
file ThreadX_Library.lib.
2. Demonstration System
The ThreadX demonstration is designed to execute under the Keil simulator or
-Cortex-M3 hardware. This demonstration is slightly smaller than typical ThreadX
+Cortex-M3 hardware. This demonstration is slightly smaller than typical ThreadX
demonstrations, and thus requires less than 7KB of Flash and less than 4KB of RAM.
-Building the demonstration is easy; simply open the ThreadX demonstration
-project file ThreadX_Demo.Uv2, which is located inside the "example_build"
-directory.
+Building the demonstration is easy; simply open the ThreadX demonstration
+project file ThreadX_Demo.Uv2, which is located inside the "example_build"
+directory.
-Once open, select the "Build Target" operation and observe the compilation of
-sample_threadx.c (which is the demonstration application) and linking with
-ThreadX_Library.lib. The resulting file ThreadX_Demo.axf is a binary file that
-can be downloaded and executed under the uVision simulator or Cortex-M3 hardware.
+Once open, select the "Build Target" operation and observe the compilation of
+sample_threadx.c (which is the demonstration application) and linking with
+ThreadX_Library.lib. The resulting file ThreadX_Demo.axf is a binary file that
+can be downloaded and executed under the uVision simulator or Cortex-M3 hardware.
For simulator execution, the following memory regions need to be defined via
the "Debug -> Memory Map" dialog:
@@ -39,17 +39,17 @@ the "Debug -> Memory Map" dialog:
3. System Initialization
-The entry point in ThreadX for the Cortex-M3 using Keil tools is at label
-__main. This is defined within the Keil compiler's startup code. In
-addition, this is where all static and global pre-set C variable
+The entry point in ThreadX for the Cortex-M3 using Keil tools is at label
+__main. This is defined within the Keil compiler's startup code. In
+addition, this is where all static and global pre-set C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -58,11 +58,11 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M3 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
- Stack Offset Stack Contents
+ Stack Offset Stack Contents
0x00 r4
0x04 r5
@@ -84,21 +84,21 @@ tx_thread_stack_ptr in the associated thread control block TX_THREAD.
5. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
-performance. To make it run faster, you can change the ThreadX_Library.Uv2
-project to debugging and enable all compiler optimizations.
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
+performance. To make it run faster, you can change the ThreadX_Library.Uv2
+project to debugging and enable all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M3
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
diff --git a/ports/cortex_m3/keil/src/tx_thread_context_restore.s b/ports/cortex_m3/keil/src/tx_thread_context_restore.s
index c7cd720d..bdb0e782 100644
--- a/ports/cortex_m3/keil/src/tx_thread_context_restore.s
+++ b/ports/cortex_m3/keil/src/tx_thread_context_restore.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -62,12 +62,6 @@
;/* */
;/* ISRs Interrupt Service Routines */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
;{
diff --git a/ports/cortex_m3/keil/src/tx_thread_context_save.s b/ports/cortex_m3/keil/src/tx_thread_context_save.s
index e6fe47cb..09fc9959 100644
--- a/ports/cortex_m3/keil/src/tx_thread_context_save.s
+++ b/ports/cortex_m3/keil/src/tx_thread_context_save.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -61,12 +61,6 @@
;/* */
;/* ISRs */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
;{
diff --git a/ports/cortex_m3/keil/src/tx_thread_interrupt_control.s b/ports/cortex_m3/keil/src/tx_thread_interrupt_control.s
index 2d7fa49c..29bf8f5c 100644
--- a/ports/cortex_m3/keil/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_m3/keil/src/tx_thread_interrupt_control.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -52,12 +52,6 @@
;/* */
;/* Application Code */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
;{
diff --git a/ports/cortex_m3/keil/src/tx_thread_interrupt_disable.s b/ports/cortex_m3/keil/src/tx_thread_interrupt_disable.s
index a63737ab..d40d4550 100644
--- a/ports/cortex_m3/keil/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_m3/keil/src/tx_thread_interrupt_disable.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -52,12 +52,6 @@
;/* */
;/* Application Code */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(UINT new_posture)
;{
diff --git a/ports/cortex_m3/keil/src/tx_thread_interrupt_restore.s b/ports/cortex_m3/keil/src/tx_thread_interrupt_restore.s
index 29ff36ec..6661a9d3 100644
--- a/ports/cortex_m3/keil/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_m3/keil/src/tx_thread_interrupt_restore.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -52,12 +52,6 @@
;/* */
;/* Application Code */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_interrupt_restore(UINT new_posture)
;{
diff --git a/ports/cortex_m3/keil/src/tx_thread_schedule.s b/ports/cortex_m3/keil/src/tx_thread_schedule.s
index afaa3082..bef93a8e 100644
--- a/ports/cortex_m3/keil/src/tx_thread_schedule.s
+++ b/ports/cortex_m3/keil/src/tx_thread_schedule.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -71,15 +71,6 @@
;/* _tx_thread_system_return Return to system from thread */
;/* _tx_thread_context_restore Restore thread's context */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 03-02-2021 Scott Larson Modified comment(s), add */
-;/* low power code, */
-;/* resulting in version 6.1.5 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
;{
diff --git a/ports/cortex_m3/keil/src/tx_thread_stack_build.s b/ports/cortex_m3/keil/src/tx_thread_stack_build.s
index cf5cf6a3..a01b9daa 100644
--- a/ports/cortex_m3/keil/src/tx_thread_stack_build.s
+++ b/ports/cortex_m3/keil/src/tx_thread_stack_build.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -54,12 +54,6 @@
;/* */
;/* _tx_thread_create Create thread service */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
;{
diff --git a/ports/cortex_m3/keil/src/tx_thread_system_return.s b/ports/cortex_m3/keil/src/tx_thread_system_return.s
index 80bb5259..75f43ee5 100644
--- a/ports/cortex_m3/keil/src/tx_thread_system_return.s
+++ b/ports/cortex_m3/keil/src/tx_thread_system_return.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -54,12 +54,6 @@
;/* */
;/* ThreadX components */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
;{
diff --git a/ports/cortex_m3/keil/src/tx_timer_interrupt.s b/ports/cortex_m3/keil/src/tx_timer_interrupt.s
index 2ad0ac89..5946c7e6 100644
--- a/ports/cortex_m3/keil/src/tx_timer_interrupt.s
+++ b/ports/cortex_m3/keil/src/tx_timer_interrupt.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -71,12 +71,6 @@
;/* */
;/* interrupt vector */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
;{
diff --git a/ports/cortex_m33/ac6/example_build/ARMCM33_DSP_FP_TZ_config.txt b/ports/cortex_m33/ac6/example_build/ARMCM33_DSP_FP_TZ_config.txt
index 04e32d1f..b65ba4c8 100644
--- a/ports/cortex_m33/ac6/example_build/ARMCM33_DSP_FP_TZ_config.txt
+++ b/ports/cortex_m33/ac6/example_build/ARMCM33_DSP_FP_TZ_config.txt
@@ -14,7 +14,7 @@ cpu0.INITNSVTOR=0x0 # (int , init-time) defa
cpu0.SAU=0x8 # (int , init-time) default = '0x4' : Number of SAU regions (0 => no SAU) : [0x0..0x8]
cpu0.SAU_CTRL.ENABLE=0 # (bool , init-time) default = '0' : Enable SAU at reset
cpu0.SAU_CTRL.ALLNS=0 # (bool , init-time) default = '0' : At reset, the SAU treats entire memory space as NS when the SAU is disabled if this is set
-idau.NUM_IDAU_REGION=0x0 # (int , init-time) default = '0xA' :
+idau.NUM_IDAU_REGION=0x0 # (int , init-time) default = '0xA' :
cpu0.LOCK_SAU=0 # (bool , init-time) default = '0' : Lock down of SAU registers write
cpu0.LOCK_S_MPU=0 # (bool , init-time) default = '0' : Lock down of Secure MPU registers write
cpu0.LOCK_NS_MPU=0 # (bool , init-time) default = '0' : Lock down of Non-Secure MPU registers write
diff --git a/ports/cortex_m33/ac6/example_build/RTE/_ThreadX_Library_Project/RTE_Components.h b/ports/cortex_m33/ac6/example_build/RTE/_ThreadX_Library_Project/RTE_Components.h
index 1eb74752..262dc09b 100644
--- a/ports/cortex_m33/ac6/example_build/RTE/_ThreadX_Library_Project/RTE_Components.h
+++ b/ports/cortex_m33/ac6/example_build/RTE/_ThreadX_Library_Project/RTE_Components.h
@@ -3,8 +3,8 @@
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
- * Project: 'ThreadX_Library'
- * Target: 'ThreadX_Library_Project'
+ * Project: 'ThreadX_Library'
+ * Target: 'ThreadX_Library_Project'
*/
#ifndef RTE_COMPONENTS_H
@@ -12,7 +12,7 @@
/*
- * Define the Device Header File:
+ * Define the Device Header File:
*/
#define CMSIS_device_header "ARMCM33_DSP_FP_TZ.h"
diff --git a/ports/cortex_m33/ac6/example_build/demo_secure_zone/Abstract.txt b/ports/cortex_m33/ac6/example_build/demo_secure_zone/Abstract.txt
index 0d1d8c52..f2b8a819 100644
--- a/ports/cortex_m33/ac6/example_build/demo_secure_zone/Abstract.txt
+++ b/ports/cortex_m33/ac6/example_build/demo_secure_zone/Abstract.txt
@@ -1,10 +1,10 @@
This ARM Cortex-M33 secure/non-secure example project that
-shows the setup of the CMSIS-RTOS2 RTX for TrustZone for
-ARMv8-M applications.
+shows the setup of the CMSIS-RTOS2 RTX for TrustZone for
+ARMv8-M applications.
The application uses CMSIS and can be executed on a Fixed
-Virtual Platform (FVP) simulation model. The application
-demonstrates three RTOS threads.
+Virtual Platform (FVP) simulation model. The application
+demonstrates three RTOS threads.
Secure application:
diff --git a/ports/cortex_m33/ac6/example_build/demo_secure_zone/RTE/Device/ARMCM33_DSP_FP_TZ/system_ARMCM33.c b/ports/cortex_m33/ac6/example_build/demo_secure_zone/RTE/Device/ARMCM33_DSP_FP_TZ/system_ARMCM33.c
index 2df478ae..3d625287 100644
--- a/ports/cortex_m33/ac6/example_build/demo_secure_zone/RTE/Device/ARMCM33_DSP_FP_TZ/system_ARMCM33.c
+++ b/ports/cortex_m33/ac6/example_build/demo_secure_zone/RTE/Device/ARMCM33_DSP_FP_TZ/system_ARMCM33.c
@@ -94,7 +94,7 @@ void SystemInit (void)
#endif
SystemCoreClock = SYSTEM_CLOCK;
-
+
*(uint32_t *)0xE000ED24 = 0x000F0000; /* S: enable secure, usage, bus, mem faults */
*(uint32_t *)0xE002ED24 = 0x000F0000; /* NS: enable secure, usage, bus, mem faults */
}
diff --git a/ports/cortex_m33/ac6/example_build/demo_secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h b/ports/cortex_m33/ac6/example_build/demo_secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
index 65bfdcd7..ebbc79c0 100644
--- a/ports/cortex_m33/ac6/example_build/demo_secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
+++ b/ports/cortex_m33/ac6/example_build/demo_secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
@@ -3,8 +3,8 @@
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
- * Project: 'demo_secure_zone'
- * Target: 'FVP Simulation Model'
+ * Project: 'demo_secure_zone'
+ * Target: 'FVP Simulation Model'
*/
#ifndef RTE_COMPONENTS_H
@@ -12,7 +12,7 @@
/*
- * Define the Device Header File:
+ * Define the Device Header File:
*/
#define CMSIS_device_header "ARMCM33_DSP_FP_TZ.h"
diff --git a/ports/cortex_m33/ac6/example_build/demo_secure_zone/interface.c b/ports/cortex_m33/ac6/example_build/demo_secure_zone/interface.c
index 4e6e8eee..af6533c3 100644
--- a/ports/cortex_m33/ac6/example_build/demo_secure_zone/interface.c
+++ b/ports/cortex_m33/ac6/example_build/demo_secure_zone/interface.c
@@ -31,19 +31,19 @@
typedef funcptr funcptr_NS __attribute__((cmse_nonsecure_call));
/* Non-secure callable (entry) function */
-int func1(int x) __attribute__((cmse_nonsecure_entry)) {
- return x+3;
+int func1(int x) __attribute__((cmse_nonsecure_entry)) {
+ return x+3;
}
/* Non-secure callable (entry) function, calling a non-secure callback function */
int func2(funcptr callback, int x) __attribute__((cmse_nonsecure_entry)) {
funcptr_NS callback_NS; // non-secure callback function pointer
int y;
-
+
/* return function pointer with cleared LSB */
callback_NS = (funcptr_NS)cmse_nsfptr_create(callback);
-
+
y = callback_NS (x+1);
-
+
return (y+2);
}
diff --git a/ports/cortex_m33/ac6/example_build/demo_secure_zone/main_ns.c b/ports/cortex_m33/ac6/example_build/demo_secure_zone/main_ns.c
index a65b6880..04d857ff 100644
--- a/ports/cortex_m33/ac6/example_build/demo_secure_zone/main_ns.c
+++ b/ports/cortex_m33/ac6/example_build/demo_secure_zone/main_ns.c
@@ -63,7 +63,7 @@ void ThreadA (void *argument) {
static int callbackB (int val) {
uint32_t flags;
-
+
flags = osThreadFlagsWait (1U, osFlagsWaitAny, osWaitForever);
if (flags == 1U) {
return (val+1);
diff --git a/ports/cortex_m33/ac6/example_build/demo_secure_zone/main_s.c b/ports/cortex_m33/ac6/example_build/demo_secure_zone/main_s.c
index 2c667821..74fa242e 100644
--- a/ports/cortex_m33/ac6/example_build/demo_secure_zone/main_s.c
+++ b/ports/cortex_m33/ac6/example_build/demo_secure_zone/main_s.c
@@ -24,36 +24,36 @@
* Title: Code template for secure main function
*
*---------------------------------------------------------------------------*/
-
+
/* Use CMSE intrinsics */
#include
#include
#include "RTE_Components.h"
#include CMSIS_device_header
-
+
/* TZ_START_NS: Start address of non-secure application */
#ifndef TZ_START_NS
#define TZ_START_NS (0x200000U)
#endif
-
+
/* typedef for non-secure callback functions */
typedef void (*funcptr_void) (void) __attribute__((cmse_nonsecure_call));
-
+
/* Secure main() */
int main(void) {
funcptr_void NonSecure_ResetHandler;
-
+
/* Add user setup code for secure part here*/
-
+
/* Set non-secure main stack (MSP_NS) */
__TZ_set_MSP_NS(*((uint32_t *)(TZ_START_NS)));
-
+
/* Get non-secure reset handler */
NonSecure_ResetHandler = (funcptr_void)(*((uint32_t *)((TZ_START_NS) + 4U)));
-
+
/* Start non-secure state software application */
NonSecure_ResetHandler();
-
+
/* Non-secure software does not return, this code is not executed */
while (1) {
__NOP();
diff --git a/ports/cortex_m33/ac6/example_build/demo_secure_zone/tz_context.c b/ports/cortex_m33/ac6/example_build/demo_secure_zone/tz_context.c
index f3152890..ca7f0c56 100644
--- a/ports/cortex_m33/ac6/example_build/demo_secure_zone/tz_context.c
+++ b/ports/cortex_m33/ac6/example_build/demo_secure_zone/tz_context.c
@@ -24,7 +24,7 @@
* Title: Context Management for ARMv8-M TrustZone - Sample implementation
*
*---------------------------------------------------------------------------*/
-
+
#include "RTE_Components.h"
#include CMSIS_device_header
#include "tz_context.h"
diff --git a/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/RTE/CMSIS/RTX_Config.c b/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/RTE/CMSIS/RTX_Config.c
index e4871014..d0f6b08b 100644
--- a/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/RTE/CMSIS/RTX_Config.c
+++ b/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/RTE/CMSIS/RTX_Config.c
@@ -24,17 +24,17 @@
*
* -----------------------------------------------------------------------------
*/
-
+
#include "cmsis_compiler.h"
#include "rtx_os.h"
-
+
// OS Idle Thread
__WEAK __NO_RETURN void osRtxIdleThread (void *argument) {
(void)argument;
for (;;) {}
}
-
+
// OS Error Callback function
__WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) {
(void)object_id;
diff --git a/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/RTE/CMSIS/RTX_Config.h b/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/RTE/CMSIS/RTX_Config.h
index 3021efbc..49fc392e 100644
--- a/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/RTE/CMSIS/RTX_Config.h
+++ b/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/RTE/CMSIS/RTX_Config.h
@@ -24,52 +24,52 @@
*
* -----------------------------------------------------------------------------
*/
-
+
#ifndef RTX_CONFIG_H_
#define RTX_CONFIG_H_
-
+
#ifdef _RTE_
#include "RTE_Components.h"
#ifdef RTE_RTX_CONFIG_H
#include RTE_RTX_CONFIG_H
#endif
#endif
-
+
//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
-
+
// System Configuration
// =======================
-
+
// Global Dynamic Memory size [bytes] <0-1073741824:8>
// Defines the combined global dynamic memory size.
// Default: 4096
#ifndef OS_DYNAMIC_MEM_SIZE
#define OS_DYNAMIC_MEM_SIZE 4096
#endif
-
+
// Kernel Tick Frequency [Hz] <1-1000000>
// Defines base time unit for delays and timeouts.
// Default: 1000 (1ms tick)
#ifndef OS_TICK_FREQ
#define OS_TICK_FREQ 1000
#endif
-
+
// Round-Robin Thread switching
// Enables Round-Robin Thread switching.
#ifndef OS_ROBIN_ENABLE
#define OS_ROBIN_ENABLE 1
#endif
-
+
// Round-Robin Timeout <1-1000>
// Defines how many ticks a thread will execute before a thread switch.
// Default: 5
#ifndef OS_ROBIN_TIMEOUT
#define OS_ROBIN_TIMEOUT 5
#endif
-
+
//
-
-// ISR FIFO Queue
+
+// ISR FIFO Queue
// <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries
// <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries
// <96=> 96 entries <128=> 128 entries <196=> 196 entries <256=> 256 entries
@@ -78,38 +78,38 @@
#ifndef OS_ISR_FIFO_QUEUE
#define OS_ISR_FIFO_QUEUE 16
#endif
-
+
// Object Memory usage counters
// Enables object memory usage counters (requires RTX source variant).
#ifndef OS_OBJ_MEM_USAGE
#define OS_OBJ_MEM_USAGE 0
#endif
-
+
//
-
+
// Thread Configuration
// =======================
-
+
// Object specific Memory allocation
// Enables object specific memory allocation.
#ifndef OS_THREAD_OBJ_MEM
#define OS_THREAD_OBJ_MEM 0
#endif
-
+
// Number of user Threads <1-1000>
// Defines maximum number of user threads that can be active at the same time.
// Applies to user threads with system provided memory for control blocks.
#ifndef OS_THREAD_NUM
#define OS_THREAD_NUM 1
#endif
-
+
// Number of user Threads with default Stack size <0-1000>
// Defines maximum number of user threads with default stack size.
// Applies to user threads with zero stack size specified.
#ifndef OS_THREAD_DEF_STACK_NUM
#define OS_THREAD_DEF_STACK_NUM 0
#endif
-
+
// Total Stack size [bytes] for user Threads with user-provided Stack size <0-1073741824:8>
// Defines the combined stack size for user threads with user-provided stack size.
// Applies to user threads with user-provided stack size and system provided memory for stack.
@@ -117,23 +117,23 @@
#ifndef OS_THREAD_USER_STACK_SIZE
#define OS_THREAD_USER_STACK_SIZE 0
#endif
-
+
//
-
+
// Default Thread Stack size [bytes] <96-1073741824:8>
// Defines stack size for threads with zero stack size specified.
// Default: 256
#ifndef OS_STACK_SIZE
#define OS_STACK_SIZE 256
#endif
-
+
// Idle Thread Stack size [bytes] <72-1073741824:8>
// Defines stack size for Idle thread.
// Default: 256
#ifndef OS_IDLE_THREAD_STACK_SIZE
#define OS_IDLE_THREAD_STACK_SIZE 256
#endif
-
+
// Idle Thread TrustZone Module Identifier
// Defines TrustZone Thread Context Management Identifier.
// Applies only to cores with TrustZone technology.
@@ -141,49 +141,49 @@
#ifndef OS_IDLE_THREAD_TZ_MOD_ID
#define OS_IDLE_THREAD_TZ_MOD_ID 0
#endif
-
+
// Stack overrun checking
// Enables stack overrun check at thread switch.
// Enabling this option increases slightly the execution time of a thread switch.
#ifndef OS_STACK_CHECK
#define OS_STACK_CHECK 1
#endif
-
+
// Stack usage watermark
// Initializes thread stack with watermark pattern for analyzing stack usage.
// Enabling this option increases significantly the execution time of thread creation.
#ifndef OS_STACK_WATERMARK
#define OS_STACK_WATERMARK 0
#endif
-
-// Processor mode for Thread execution
-// <0=> Unprivileged mode
+
+// Processor mode for Thread execution
+// <0=> Unprivileged mode
// <1=> Privileged mode
// Default: Privileged mode
#ifndef OS_PRIVILEGE_MODE
#define OS_PRIVILEGE_MODE 1
#endif
-
+
//
-
+
// Timer Configuration
// ======================
-
+
// Object specific Memory allocation
// Enables object specific memory allocation.
#ifndef OS_TIMER_OBJ_MEM
#define OS_TIMER_OBJ_MEM 0
#endif
-
+
// Number of Timer objects <1-1000>
// Defines maximum number of objects that can be active at the same time.
// Applies to objects with system provided memory for control blocks.
#ifndef OS_TIMER_NUM
#define OS_TIMER_NUM 1
#endif
-
+
//
-
+
// Timer Thread Priority
// <8=> Low
// <16=> Below Normal <24=> Normal <32=> Above Normal
@@ -194,7 +194,7 @@
#ifndef OS_TIMER_THREAD_PRIO
#define OS_TIMER_THREAD_PRIO 40
#endif
-
+
// Timer Thread Stack size [bytes] <0-1073741824:8>
// Defines stack size for Timer thread.
// May be set to 0 when timers are not used.
@@ -202,7 +202,7 @@
#ifndef OS_TIMER_THREAD_STACK_SIZE
#define OS_TIMER_THREAD_STACK_SIZE 256
#endif
-
+
// Timer Thread TrustZone Module Identifier
// Defines TrustZone Thread Context Management Identifier.
// Applies only to cores with TrustZone technology.
@@ -210,7 +210,7 @@
#ifndef OS_TIMER_THREAD_TZ_MOD_ID
#define OS_TIMER_THREAD_TZ_MOD_ID 0
#endif
-
+
// Timer Callback Queue entries <0-256>
// Number of concurrent active timer callback functions.
// May be set to 0 when timers are not used.
@@ -218,85 +218,85 @@
#ifndef OS_TIMER_CB_QUEUE
#define OS_TIMER_CB_QUEUE 4
#endif
-
+
//
-
+
// Event Flags Configuration
// ============================
-
+
// Object specific Memory allocation
// Enables object specific memory allocation.
#ifndef OS_EVFLAGS_OBJ_MEM
#define OS_EVFLAGS_OBJ_MEM 0
#endif
-
+
// Number of Event Flags objects <1-1000>
// Defines maximum number of objects that can be active at the same time.
// Applies to objects with system provided memory for control blocks.
#ifndef OS_EVFLAGS_NUM
#define OS_EVFLAGS_NUM 1
#endif
-
+
//
-
+
//
-
+
// Mutex Configuration
// ======================
-
+
// Object specific Memory allocation
// Enables object specific memory allocation.
#ifndef OS_MUTEX_OBJ_MEM
#define OS_MUTEX_OBJ_MEM 0
#endif
-
+
// Number of Mutex objects <1-1000>
// Defines maximum number of objects that can be active at the same time.
// Applies to objects with system provided memory for control blocks.
#ifndef OS_MUTEX_NUM
#define OS_MUTEX_NUM 1
#endif
-
+
//
-
+
//
-
+
// Semaphore Configuration
// ==========================
-
+
// Object specific Memory allocation
// Enables object specific memory allocation.
#ifndef OS_SEMAPHORE_OBJ_MEM
#define OS_SEMAPHORE_OBJ_MEM 0
#endif
-
+
// Number of Semaphore objects <1-1000>
// Defines maximum number of objects that can be active at the same time.
// Applies to objects with system provided memory for control blocks.
#ifndef OS_SEMAPHORE_NUM
#define OS_SEMAPHORE_NUM 1
#endif
-
+
//
-
+
//
-
+
// Memory Pool Configuration
// ============================
-
+
// Object specific Memory allocation
// Enables object specific memory allocation.
#ifndef OS_MEMPOOL_OBJ_MEM
#define OS_MEMPOOL_OBJ_MEM 0
#endif
-
+
// Number of Memory Pool objects <1-1000>
// Defines maximum number of objects that can be active at the same time.
// Applies to objects with system provided memory for control blocks.
#ifndef OS_MEMPOOL_NUM
#define OS_MEMPOOL_NUM 1
#endif
-
+
// Data Storage Memory size [bytes] <0-1073741824:8>
// Defines the combined data storage memory size.
// Applies to objects with system provided memory for data storage.
@@ -304,27 +304,27 @@
#ifndef OS_MEMPOOL_DATA_SIZE
#define OS_MEMPOOL_DATA_SIZE 0
#endif
-
+
//
-
+
//
-
+
// Message Queue Configuration
// ==============================
-
+
// Object specific Memory allocation
// Enables object specific memory allocation.
#ifndef OS_MSGQUEUE_OBJ_MEM
#define OS_MSGQUEUE_OBJ_MEM 0
#endif
-
+
// Number of Message Queue objects <1-1000>
// Defines maximum number of objects that can be active at the same time.
// Applies to objects with system provided memory for control blocks.
#ifndef OS_MSGQUEUE_NUM
#define OS_MSGQUEUE_NUM 1
#endif
-
+
// Data Storage Memory size [bytes] <0-1073741824:8>
// Defines the combined data storage memory size.
// Applies to objects with system provided memory for data storage.
@@ -332,26 +332,26 @@
#ifndef OS_MSGQUEUE_DATA_SIZE
#define OS_MSGQUEUE_DATA_SIZE 0
#endif
-
+
//
-
+
//
-
+
// Event Recorder Configuration
// ===============================
-
+
// Global Initialization
// Initialize Event Recorder during 'osKernelInitialize'.
#ifndef OS_EVR_INIT
#define OS_EVR_INIT 0
#endif
-
+
// Start recording
// Start event recording after initialization.
#ifndef OS_EVR_START
#define OS_EVR_START 1
#endif
-
+
// Global Event Filter Setup
// Initial recording level applied to all components.
// Error events
@@ -362,11 +362,11 @@
#ifndef OS_EVR_LEVEL
#define OS_EVR_LEVEL 0x00U
#endif
-
+
// RTOS Event Filter Setup
// Recording levels for RTX components.
// Only applicable if events for the respective component are generated.
-
+
// Memory Management
// Recording level for Memory Management events.
// Error events
@@ -374,10 +374,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_MEMORY_LEVEL
+#ifndef OS_EVR_MEMORY_LEVEL
#define OS_EVR_MEMORY_LEVEL 0x01U
#endif
-
+
// Kernel
// Recording level for Kernel events.
// Error events
@@ -385,10 +385,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_KERNEL_LEVEL
+#ifndef OS_EVR_KERNEL_LEVEL
#define OS_EVR_KERNEL_LEVEL 0x01U
#endif
-
+
// Thread
// Recording level for Thread events.
// Error events
@@ -396,10 +396,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_THREAD_LEVEL
+#ifndef OS_EVR_THREAD_LEVEL
#define OS_EVR_THREAD_LEVEL 0x05U
#endif
-
+
// Generic Wait
// Recording level for Generic Wait events.
// Error events
@@ -407,10 +407,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_WAIT_LEVEL
+#ifndef OS_EVR_WAIT_LEVEL
#define OS_EVR_WAIT_LEVEL 0x01U
#endif
-
+
// Thread Flags
// Recording level for Thread Flags events.
// Error events
@@ -418,10 +418,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_THFLAGS_LEVEL
+#ifndef OS_EVR_THFLAGS_LEVEL
#define OS_EVR_THFLAGS_LEVEL 0x01U
#endif
-
+
// Event Flags
// Recording level for Event Flags events.
// Error events
@@ -429,10 +429,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_EVFLAGS_LEVEL
+#ifndef OS_EVR_EVFLAGS_LEVEL
#define OS_EVR_EVFLAGS_LEVEL 0x01U
#endif
-
+
// Timer
// Recording level for Timer events.
// Error events
@@ -440,10 +440,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_TIMER_LEVEL
+#ifndef OS_EVR_TIMER_LEVEL
#define OS_EVR_TIMER_LEVEL 0x01U
#endif
-
+
// Mutex
// Recording level for Mutex events.
// Error events
@@ -451,10 +451,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_MUTEX_LEVEL
+#ifndef OS_EVR_MUTEX_LEVEL
#define OS_EVR_MUTEX_LEVEL 0x01U
#endif
-
+
// Semaphore
// Recording level for Semaphore events.
// Error events
@@ -462,10 +462,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_SEMAPHORE_LEVEL
+#ifndef OS_EVR_SEMAPHORE_LEVEL
#define OS_EVR_SEMAPHORE_LEVEL 0x01U
#endif
-
+
// Memory Pool
// Recording level for Memory Pool events.
// Error events
@@ -473,10 +473,10 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_MEMPOOL_LEVEL
+#ifndef OS_EVR_MEMPOOL_LEVEL
#define OS_EVR_MEMPOOL_LEVEL 0x01U
#endif
-
+
// Message Queue
// Recording level for Message Queue events.
// Error events
@@ -484,87 +484,87 @@
// Operation events
// Detailed operation events
//
-#ifndef OS_EVR_MSGQUEUE_LEVEL
+#ifndef OS_EVR_MSGQUEUE_LEVEL
#define OS_EVR_MSGQUEUE_LEVEL 0x01U
#endif
-
+
//
-
+
//
-
+
// RTOS Event Generation
// Enables event generation for RTX components (requires RTX source variant).
-
+
// Memory Management
// Enables Memory Management event generation.
#ifndef OS_EVR_MEMORY
#define OS_EVR_MEMORY 1
#endif
-
+
// Kernel
// Enables Kernel event generation.
#ifndef OS_EVR_KERNEL
#define OS_EVR_KERNEL 1
#endif
-
+
// Thread
// Enables Thread event generation.
#ifndef OS_EVR_THREAD
#define OS_EVR_THREAD 1
#endif
-
+
// Generic Wait
// Enables Generic Wait event generation.
#ifndef OS_EVR_WAIT
#define OS_EVR_WAIT 1
#endif
-
+
// Thread Flags
// Enables Thread Flags event generation.
#ifndef OS_EVR_THFLAGS
#define OS_EVR_THFLAGS 1
#endif
-
+
// Event Flags
// Enables Event Flags event generation.
#ifndef OS_EVR_EVFLAGS
#define OS_EVR_EVFLAGS 1
#endif
-
+
// Timer
// Enables Timer event generation.
#ifndef OS_EVR_TIMER
#define OS_EVR_TIMER 1
#endif
-
+
// Mutex
// Enables Mutex event generation.
#ifndef OS_EVR_MUTEX
#define OS_EVR_MUTEX 1
#endif
-
+
// Semaphore
// Enables Semaphore event generation.
#ifndef OS_EVR_SEMAPHORE
#define OS_EVR_SEMAPHORE 1
#endif
-
+
// Memory Pool
// Enables Memory Pool event generation.
#ifndef OS_EVR_MEMPOOL
#define OS_EVR_MEMPOOL 1
#endif
-
+
// Message Queue
// Enables Message Queue event generation.
#ifndef OS_EVR_MSGQUEUE
#define OS_EVR_MSGQUEUE 1
#endif
-
+
//
-
+
//
-
+
// Number of Threads which use standard C/C++ library libspace
// (when thread specific memory allocation is not used).
#if (OS_THREAD_OBJ_MEM == 0)
@@ -572,7 +572,7 @@
#else
#define OS_THREAD_LIBSPACE_NUM OS_THREAD_NUM
#endif
-
+
//------------- <<< end of configuration section >>> ---------------------------
-
+
#endif // RTX_CONFIG_H_
diff --git a/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h b/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
index 78d1b429..62e042d2 100644
--- a/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
+++ b/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
@@ -3,8 +3,8 @@
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
- * Project: 'demo_threadx_non-secure_zone'
- * Target: 'FVP Simulation Model'
+ * Project: 'demo_threadx_non-secure_zone'
+ * Target: 'FVP Simulation Model'
*/
#ifndef RTE_COMPONENTS_H
@@ -12,7 +12,7 @@
/*
- * Define the Device Header File:
+ * Define the Device Header File:
*/
#define CMSIS_device_header "ARMCM33_DSP_FP_TZ.h"
diff --git a/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/RTE/_ThreadX_Library_Project/RTE_Components.h b/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/RTE/_ThreadX_Library_Project/RTE_Components.h
index 1eb74752..262dc09b 100644
--- a/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/RTE/_ThreadX_Library_Project/RTE_Components.h
+++ b/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/RTE/_ThreadX_Library_Project/RTE_Components.h
@@ -3,8 +3,8 @@
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
- * Project: 'ThreadX_Library'
- * Target: 'ThreadX_Library_Project'
+ * Project: 'ThreadX_Library'
+ * Target: 'ThreadX_Library_Project'
*/
#ifndef RTE_COMPONENTS_H
@@ -12,7 +12,7 @@
/*
- * Define the Device Header File:
+ * Define the Device Header File:
*/
#define CMSIS_device_header "ARMCM33_DSP_FP_TZ.h"
diff --git a/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/demo_threadx.c b/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/demo_threadx.c
index 7257ac6d..cea22889 100644
--- a/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/demo_threadx.c
+++ b/ports/cortex_m33/ac6/example_build/demo_threadx_non-secure_zone/demo_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. Please refer to Chapter 6 of the ThreadX User Guide for a complete
description of this demonstration. */
@@ -68,7 +68,7 @@ void thread_6_and_7_entry(ULONG thread_input);
int main()
{
-
+
/* Please refer to Chapter 6 of the ThreadX User Guide for a complete
description of this demonstration. */
@@ -86,7 +86,7 @@ void tx_application_define(void *first_unused_memory)
CHAR *pointer;
(VOID)first_unused_memory; /* unused parameter. */
-
+
#ifdef TX_ENABLE_EVENT_TRACE
tx_trace_enable(trace_buffer, sizeof(trace_buffer), 32);
#endif
@@ -101,41 +101,41 @@ CHAR *pointer;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -143,23 +143,23 @@ CHAR *pointer;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -188,7 +188,7 @@ CHAR *pointer;
/* Release the block back to the pool. */
tx_block_release(pointer);
-
+
tx_thread_secure_stack_allocate(&thread_0,256);
tx_thread_secure_stack_allocate(&thread_1,256);
tx_thread_secure_stack_allocate(&thread_2,256);
@@ -206,13 +206,13 @@ CHAR *pointer;
void thread_0_entry(ULONG thread_input)
{
UINT status;
-
+
(VOID)thread_input; /* unused parameter. */
-
+
/* This thread simply sits in while-forever-sleep loop. */
while(1)
{
-
+
/* Increment the thread counter. */
thread_0_counter++;
@@ -235,11 +235,11 @@ void thread_1_entry(ULONG thread_input)
UINT status;
(VOID)thread_input; /* unused parameter. */
-
+
/* This thread simply sends messages to a queue shared by thread 2. */
while(1)
{
-
+
/* Increment the thread counter. */
thread_1_counter++;
@@ -263,7 +263,7 @@ ULONG received_message;
UINT status;
(VOID)thread_input; /* unused parameter. */
-
+
/* This thread retrieves messages placed on the queue by thread 1. */
while(1)
{
@@ -274,11 +274,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -289,7 +289,7 @@ void thread_3_and_4_entry(ULONG thread_input)
{
UINT status;
-
+
/* This function is executed from thread 3 and thread 4. As the loop
below shows, these function compete for ownership of semaphore_0. */
while(1)
@@ -328,7 +328,7 @@ UINT status;
ULONG actual_flags;
(VOID)thread_input; /* unused parameter. */
-
+
/* This thread simply waits for an event in a forever loop. */
while(1)
{
@@ -337,7 +337,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -390,7 +390,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m33/ac6/example_build/tx_initialize_low_level.S b/ports/cortex_m33/ac6/example_build/tx_initialize_low_level.S
index 765b8174..2f10e84a 100644
--- a/ports/cortex_m33/ac6/example_build/tx_initialize_low_level.S
+++ b/ports/cortex_m33/ac6/example_build/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,12 +63,6 @@ HEAP_SIZE = 0x00000000
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_m33/ac6/inc/tx_port.h b/ports/cortex_m33/ac6/inc/tx_port.h
index cd9a5877..e2a8f6e6 100644
--- a/ports/cortex_m33/ac6/inc/tx_port.h
+++ b/ports/cortex_m33/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,39 +46,6 @@
/* This file replaces the previous Cortex-M33 files. It unifies */
/* the Cortex-M33 compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-02-2021 Scott Larson Modified comment(s), added */
-/* ULONG64_DEFINED, */
-/* resulting in version 6.1.5 */
-/* 06-02-2021 Scott Larson Modified comment(s), removed */
-/* unneeded header file, funcs */
-/* set_control and get_control */
-/* changed to inline, */
-/* added symbol to enable */
-/* stack error handler, */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Scott Larson Modified comment(s), improved */
-/* stack check error handling, */
-/* resulting in version 6.1.9 */
-/* 01-31-2022 Scott Larson Modified comment(s), unified */
-/* this file across compilers, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* 03-08-2023 Scott Larson Removed unneeded #include, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -645,7 +613,7 @@ VOID _tx_thread_interrupt_restore(UIN
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M33/AC6 Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M33/AC6 Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m33/ac6/inc/tx_secure_interface.h b/ports/cortex_m33/ac6/inc/tx_secure_interface.h
index 39b5d5fd..5ac37fbf 100644
--- a/ports/cortex_m33/ac6/inc/tx_secure_interface.h
+++ b/ports/cortex_m33/ac6/inc/tx_secure_interface.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,12 +38,6 @@
/* It is assumed that tx_api.h and tx_port.h have already been */
/* included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_SECURE_INTERFACE_H
diff --git a/ports/cortex_m33/ac6/readme_threadx.txt b/ports/cortex_m33/ac6/readme_threadx.txt
index 9311ffd4..a99a096a 100644
--- a/ports/cortex_m33/ac6/readme_threadx.txt
+++ b/ports/cortex_m33/ac6/readme_threadx.txt
@@ -1,46 +1,46 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M33
+ Microsoft's Azure RTOS ThreadX for Cortex-M33
Using the AC6 Tools in Keil uVision
1. Import the ThreadX Projects
-In order to build the ThreadX library and the ThreadX demonstration, first open
-the AzureRTOS.uvmpw workspace (located in the "example_build" directory)
+In order to build the ThreadX library and the ThreadX demonstration, first open
+the AzureRTOS.uvmpw workspace (located in the "example_build" directory)
into Keil.
2. Building the ThreadX run-time Library
Building the ThreadX library is easy; simply set the ThreadX_Library project
-as active, then then build the library. You should now observe the compilation
+as active, then then build the library. You should now observe the compilation
and assembly of the ThreadX library. This project build produces the ThreadX
library file ThreadX_Library.lib.
-Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
-replace the common files of the same name.
+Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
+replace the common files of the same name.
3. Demonstration System
The ThreadX demonstration is designed to execute under the Keil debugger on the
FVP_MPS2_Cortex-M33_MDK simulator.
-Building the demonstration is easy; simply select the "Batch Build" button.
-You should now observe the compilation and assembly of the ThreadX demonstration of
-both the demo_secure_zone and demo_threadx_non-secure_zone projects.
+Building the demonstration is easy; simply select the "Batch Build" button.
+You should now observe the compilation and assembly of the ThreadX demonstration of
+both the demo_secure_zone and demo_threadx_non-secure_zone projects.
Then click the Start/Stop Debug Session button to start the simulator and begin debugging.
You are now ready to execute the ThreadX demonstration.
4. System Initialization
-The entry point in ThreadX for the Cortex-M33 using AC6 tools uses the standard AC6
+The entry point in ThreadX for the Cortex-M33 using AC6 tools uses the standard AC6
Cortex-M33 reset sequence. From the reset vector the C runtime will be initialized.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -49,7 +49,7 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M33 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -132,26 +132,26 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
6. Improving Performance
-To make ThreadX and the application(s) run faster, you can enable
-all compiler optimizations.
+To make ThreadX and the application(s) run faster, you can enable
+all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M33
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-M33 vectors start at the label __Vectors or similar. The application may modify
-the vector area according to its needs. There is code in tx_initialize_low_level() that will
-configure the vector base register.
+the vector area according to its needs. There is code in tx_initialize_low_level() that will
+configure the vector base register.
7.2 Managed Interrupts
@@ -177,7 +177,7 @@ your_assembly_isr:
; VOID your_assembly_isr(VOID)
; {
PUSH {r0, lr}
-;
+;
; /* Do interrupt handler work here */
; /* BL */
@@ -187,15 +187,15 @@ your_assembly_isr:
Note: the Cortex-M33 requires exception handlers to be thumb labels, this implies bit 0 set.
To accomplish this, the declaration of the label has to be preceded by the assembler directive
-.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
-be inserted in the correct location in the interrupt vector table. This table is typically
+.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
+be inserted in the correct location in the interrupt vector table. This table is typically
located in either your runtime startup file or in the tx_initialize_low_level.s file.
8. FPU Support
-ThreadX for Cortex-M33 supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M33 supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context.
diff --git a/ports/cortex_m33/ac6/src/tx_initialize_low_level.S b/ports/cortex_m33/ac6/src/tx_initialize_low_level.S
index 04bd54c2..896abe06 100644
--- a/ports/cortex_m33/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_m33/ac6/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@ HEAP_SIZE = 0x00000000
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_m33/ac6/src/tx_misra.S b/ports/cortex_m33/ac6/src/tx_misra.S
index 8ac0c629..10548671 100644
--- a/ports/cortex_m33/ac6/src/tx_misra.S
+++ b/ports/cortex_m33/ac6/src/tx_misra.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -667,7 +668,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -682,7 +683,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARM_FP
/***********************************************************************************************/
@@ -699,8 +700,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -714,9 +715,9 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
+
.data
.word 0
diff --git a/ports/cortex_m33/ac6/src/tx_thread_context_restore.S b/ports/cortex_m33/ac6/src/tx_thread_context_restore.S
index caaec9e6..da331bcc 100644
--- a/ports/cortex_m33/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_m33/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m33/ac6/src/tx_thread_context_save.S b/ports/cortex_m33/ac6/src/tx_thread_context_save.S
index 71c1a185..3519b6cb 100644
--- a/ports/cortex_m33/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_m33/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m33/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_m33/ac6/src/tx_thread_interrupt_control.S
index e2c9e1a5..a408e71d 100644
--- a/ports/cortex_m33/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_m33/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m33/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_m33/ac6/src/tx_thread_interrupt_disable.S
index 03e63305..8a56f098 100644
--- a/ports/cortex_m33/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_m33/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m33/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_m33/ac6/src/tx_thread_interrupt_restore.S
index d88390fc..1a8e4767 100644
--- a/ports/cortex_m33/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_m33/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m33/ac6/src/tx_thread_schedule.S b/ports/cortex_m33/ac6/src/tx_thread_schedule.S
index 1609d902..5aec68b6 100644
--- a/ports/cortex_m33/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_m33/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,23 +61,6 @@
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 04-02-2021 Scott Larson Modified comment(s), added */
-/* low power code, */
-/* resulting in version 6.1.6 */
-/* 06-02-2021 Scott Larson Added secure stack initialize */
-/* in SVC handler, */
-/* resulting in version 6.1.7 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 03-08-2023 Scott Larson Added preproc FPU option, */
-/* included tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -354,7 +338,7 @@ SVC_Handler:
CMP r1, #2 // Is it a secure stack free request?
BEQ _tx_svc_secure_free // Yes, go there
-
+
CMP r1, #3 // Is it a secure stack init request?
BEQ _tx_svc_secure_init // Yes, go there
diff --git a/ports/cortex_m33/ac6/src/tx_thread_secure_stack.c b/ports/cortex_m33/ac6/src/tx_thread_secure_stack.c
index 3f585b78..50b85fa1 100644
--- a/ports/cortex_m33/ac6/src/tx_thread_secure_stack.c
+++ b/ports/cortex_m33/ac6/src/tx_thread_secure_stack.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -102,21 +103,6 @@ static INT tx_head_free_index = 0U;
/* */
/* _tx_initialize_kernel_enter */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 10-16-2020 Scott Larson Modified comment(s), */
-/* resulting in version 6.1.1 */
-/* 06-02-2021 Scott Larson Modified comment(s), and */
-/* changed name, execute in */
-/* handler mode, */
-/* resulting in version 6.1.7 */
-/* 01-31-2022 Himanshu Gupta Modified comments(s), updated */
-/* secure stack allocation, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
__attribute__((cmse_nonsecure_entry))
UINT _tx_thread_secure_mode_stack_initialize(void)
diff --git a/ports/cortex_m33/ac6/src/tx_thread_secure_stack_allocate.S b/ports/cortex_m33/ac6/src/tx_thread_secure_stack_allocate.S
index 2b14e227..e6cb78d2 100644
--- a/ports/cortex_m33/ac6/src/tx_thread_secure_stack_allocate.S
+++ b/ports/cortex_m33/ac6/src/tx_thread_secure_stack_allocate.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,14 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
// {
diff --git a/ports/cortex_m33/ac6/src/tx_thread_secure_stack_free.S b/ports/cortex_m33/ac6/src/tx_thread_secure_stack_free.S
index 33dc5fba..a2ebaab4 100644
--- a/ports/cortex_m33/ac6/src/tx_thread_secure_stack_free.S
+++ b/ports/cortex_m33/ac6/src/tx_thread_secure_stack_free.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,14 +54,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_free(TX_THREAD *thread_ptr)
// {
diff --git a/ports/cortex_m33/ac6/src/tx_thread_secure_stack_initialize.S b/ports/cortex_m33/ac6/src/tx_thread_secure_stack_initialize.S
index a5bab0f0..3413f31c 100644
--- a/ports/cortex_m33/ac6/src/tx_thread_secure_stack_initialize.S
+++ b/ports/cortex_m33/ac6/src/tx_thread_secure_stack_initialize.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,18 +54,6 @@
/* */
/* TX_PORT_SPECIFIC_PRE_INITIALIZATION */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* resulting in version 6.1.12 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_secure_stack_initialize(VOID)
// {
diff --git a/ports/cortex_m33/ac6/src/tx_thread_stack_build.S b/ports/cortex_m33/ac6/src/tx_thread_stack_build.S
index 7d39f949..02dcddf3 100644
--- a/ports/cortex_m33/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_m33/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m33/ac6/src/tx_thread_system_return.S b/ports/cortex_m33/ac6/src/tx_thread_system_return.S
index 0a61cfc7..3c97b666 100644
--- a/ports/cortex_m33/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_m33/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m33/ac6/src/tx_timer_interrupt.S b/ports/cortex_m33/ac6/src/tx_timer_interrupt.S
index b8cc2be5..1182f910 100644
--- a/ports/cortex_m33/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_m33/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m33/ac6/src/txe_thread_secure_stack_allocate.c b/ports/cortex_m33/ac6/src/txe_thread_secure_stack_allocate.c
index 7d669a6f..344e5fd9 100644
--- a/ports/cortex_m33/ac6/src/txe_thread_secure_stack_allocate.c
+++ b/ports/cortex_m33/ac6/src/txe_thread_secure_stack_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
{
@@ -76,10 +71,10 @@ UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_siz
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m33/ac6/src/txe_thread_secure_stack_free.c b/ports/cortex_m33/ac6/src/txe_thread_secure_stack_free.c
index 55299fe9..76832975 100644
--- a/ports/cortex_m33/ac6/src/txe_thread_secure_stack_free.c
+++ b/ports/cortex_m33/ac6/src/txe_thread_secure_stack_free.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,12 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
{
@@ -74,10 +69,10 @@ UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m33/gnu/inc/tx_port.h b/ports/cortex_m33/gnu/inc/tx_port.h
index 5ce23eeb..727e9fce 100644
--- a/ports/cortex_m33/gnu/inc/tx_port.h
+++ b/ports/cortex_m33/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,39 +46,6 @@
/* This file replaces the previous Cortex-M33 files. It unifies */
/* the Cortex-M33 compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-02-2021 Scott Larson Modified comment(s), added */
-/* ULONG64_DEFINED, */
-/* resulting in version 6.1.5 */
-/* 06-02-2021 Scott Larson Modified comment(s), removed */
-/* unneeded header file, funcs */
-/* set_control and get_control */
-/* changed to inline, */
-/* added symbol to enable */
-/* stack error handler, */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Scott Larson Modified comment(s), improved */
-/* stack check error handling, */
-/* resulting in version 6.1.9 */
-/* 01-31-2022 Scott Larson Modified comment(s), unified */
-/* this file across compilers, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* 03-08-2023 Scott Larson Removed unneeded #include, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -645,7 +613,7 @@ VOID _tx_thread_interrupt_restore(UIN
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M33/GNU Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M33/GNU Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m33/gnu/inc/tx_secure_interface.h b/ports/cortex_m33/gnu/inc/tx_secure_interface.h
index 39b5d5fd..5ac37fbf 100644
--- a/ports/cortex_m33/gnu/inc/tx_secure_interface.h
+++ b/ports/cortex_m33/gnu/inc/tx_secure_interface.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,12 +38,6 @@
/* It is assumed that tx_api.h and tx_port.h have already been */
/* included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_SECURE_INTERFACE_H
diff --git a/ports/cortex_m33/gnu/readme_threadx.txt b/ports/cortex_m33/gnu/readme_threadx.txt
index c7d5774e..79efe0eb 100644
--- a/ports/cortex_m33/gnu/readme_threadx.txt
+++ b/ports/cortex_m33/gnu/readme_threadx.txt
@@ -1,32 +1,32 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M33
+ Microsoft's Azure RTOS ThreadX for Cortex-M33
Using the GNU Tools
1. Building the ThreadX run-time Library
Import all ThreadX common and port-specific source files into a GNU project.
-Configure the project to build a library rather than an executable. This
-results in the ThreadX run-time library file tx.a, which is needed by
+Configure the project to build a library rather than an executable. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
-Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
-replace the common files of the same name.
+Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
+replace the common files of the same name.
2. Demonstration System
-No demonstration project is provided.
+No demonstration project is provided.
3. System Initialization
-The entry point in ThreadX for the Cortex-M33 using gnu tools uses the standard GNU
+The entry point in ThreadX for the Cortex-M33 using gnu tools uses the standard GNU
Cortex-M33 reset sequence. From the reset vector the C runtime will be initialized.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.S file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -35,7 +35,7 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M33 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -118,26 +118,26 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-To make ThreadX and the application(s) run faster, you can enable
-all compiler optimizations.
+To make ThreadX and the application(s) run faster, you can enable
+all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M33
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
6.1 Vector Area
The Cortex-M33 vectors start at the label __tx_vectors or similar. The application may modify
-the vector area according to its needs. There is code in tx_initialize_low_level() that will
-configure the vector base register.
+the vector area according to its needs. There is code in tx_initialize_low_level() that will
+configure the vector base register.
6.2 Managed Interrupts
@@ -170,15 +170,15 @@ your_assembly_isr:
Note: the Cortex-M33 requires exception handlers to be thumb labels, this implies bit 0 set.
To accomplish this, the declaration of the label has to be preceded by the assembler directive
-.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
-be inserted in the correct location in the interrupt vector table. This table is typically
+.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
+be inserted in the correct location in the interrupt vector table. This table is typically
located in either your runtime startup file or in the tx_initialize_low_level.S file.
7. FPU Support
-ThreadX for Cortex-M33 supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M33 supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context.
diff --git a/ports/cortex_m33/gnu/src/tx_initialize_low_level.S b/ports/cortex_m33/gnu/src/tx_initialize_low_level.S
index 31a22a2b..5915dc96 100644
--- a/ports/cortex_m33/gnu/src/tx_initialize_low_level.S
+++ b/ports/cortex_m33/gnu/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,16 +66,6 @@ HEAP_SIZE = 0x00000000
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Fixed predefined macro name, */
-/* resulting in version 6.1.10 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_m33/gnu/src/tx_misra.S b/ports/cortex_m33/gnu/src/tx_misra.S
index 8ac0c629..10548671 100644
--- a/ports/cortex_m33/gnu/src/tx_misra.S
+++ b/ports/cortex_m33/gnu/src/tx_misra.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -667,7 +668,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -682,7 +683,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARM_FP
/***********************************************************************************************/
@@ -699,8 +700,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -714,9 +715,9 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
+
.data
.word 0
diff --git a/ports/cortex_m33/gnu/src/tx_thread_context_restore.S b/ports/cortex_m33/gnu/src/tx_thread_context_restore.S
index fd4f1423..5d9d074a 100644
--- a/ports/cortex_m33/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_m33/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m33/gnu/src/tx_thread_context_save.S b/ports/cortex_m33/gnu/src/tx_thread_context_save.S
index 60105cd4..8d094cec 100644
--- a/ports/cortex_m33/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_m33/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m33/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_m33/gnu/src/tx_thread_interrupt_control.S
index a1492269..4ce5bc22 100644
--- a/ports/cortex_m33/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_m33/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m33/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_m33/gnu/src/tx_thread_interrupt_disable.S
index a67dff03..463ceeee 100644
--- a/ports/cortex_m33/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_m33/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m33/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_m33/gnu/src/tx_thread_interrupt_restore.S
index 6adc1d35..63667fa8 100644
--- a/ports/cortex_m33/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_m33/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m33/gnu/src/tx_thread_schedule.S b/ports/cortex_m33/gnu/src/tx_thread_schedule.S
index 68368cd0..601d89da 100644
--- a/ports/cortex_m33/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_m33/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,24 +57,6 @@
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 04-02-2021 Scott Larson Modified comment(s), added */
-/* low power code, */
-/* resulting in version 6.1.6 */
-/* 06-02-2021 Scott Larson Added secure stack initialize */
-/* in SVC handler, */
-/* resulting in version 6.1.7 */
-/* 01-31-2022 Scott Larson Fixed predefined macro name, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -351,7 +334,7 @@ SVC_Handler:
CMP r1, #2 // Is it a secure stack free request?
BEQ _tx_svc_secure_free // Yes, go there
-
+
CMP r1, #3 // Is it a secure stack init request?
BEQ _tx_svc_secure_init // Yes, go there
diff --git a/ports/cortex_m33/gnu/src/tx_thread_secure_stack.c b/ports/cortex_m33/gnu/src/tx_thread_secure_stack.c
index ac0e90a1..82acdfbb 100644
--- a/ports/cortex_m33/gnu/src/tx_thread_secure_stack.c
+++ b/ports/cortex_m33/gnu/src/tx_thread_secure_stack.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -98,21 +99,6 @@ static INT tx_head_free_index = 0U;
/* */
/* _tx_initialize_kernel_enter */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 10-16-2020 Scott Larson Modified comment(s), */
-/* resulting in version 6.1.1 */
-/* 06-02-2021 Scott Larson Change name, execute in */
-/* handler mode, */
-/* disable optimizations, */
-/* resulting in version 6.1.7 */
-/* 01-31-2022 Himanshu Gupta Modified comments(s), updated */
-/* secure stack allocation, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
__attribute__((cmse_nonsecure_entry, optimize(0)))
UINT _tx_thread_secure_mode_stack_initialize(void)
diff --git a/ports/cortex_m33/gnu/src/tx_thread_secure_stack_allocate.S b/ports/cortex_m33/gnu/src/tx_thread_secure_stack_allocate.S
index 9e875354..7a45b388 100644
--- a/ports/cortex_m33/gnu/src/tx_thread_secure_stack_allocate.S
+++ b/ports/cortex_m33/gnu/src/tx_thread_secure_stack_allocate.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,14 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
// {
diff --git a/ports/cortex_m33/gnu/src/tx_thread_secure_stack_free.S b/ports/cortex_m33/gnu/src/tx_thread_secure_stack_free.S
index bffb1d1e..950f1ce9 100644
--- a/ports/cortex_m33/gnu/src/tx_thread_secure_stack_free.S
+++ b/ports/cortex_m33/gnu/src/tx_thread_secure_stack_free.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,14 +54,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_free(TX_THREAD *thread_ptr)
// {
diff --git a/ports/cortex_m33/gnu/src/tx_thread_secure_stack_initialize.S b/ports/cortex_m33/gnu/src/tx_thread_secure_stack_initialize.S
index 945adb75..4d778d5c 100644
--- a/ports/cortex_m33/gnu/src/tx_thread_secure_stack_initialize.S
+++ b/ports/cortex_m33/gnu/src/tx_thread_secure_stack_initialize.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,18 +54,6 @@
/* */
/* TX_PORT_SPECIFIC_PRE_INITIALIZATION */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* resulting in version 6.1.12 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_secure_stack_initialize(VOID)
// {
diff --git a/ports/cortex_m33/gnu/src/tx_thread_stack_build.S b/ports/cortex_m33/gnu/src/tx_thread_stack_build.S
index 036b8238..df938e5e 100644
--- a/ports/cortex_m33/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_m33/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m33/gnu/src/tx_thread_system_return.S b/ports/cortex_m33/gnu/src/tx_thread_system_return.S
index 5649e3a7..17db56a5 100644
--- a/ports/cortex_m33/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_m33/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m33/gnu/src/tx_timer_interrupt.S b/ports/cortex_m33/gnu/src/tx_timer_interrupt.S
index 2e215343..869d81a7 100644
--- a/ports/cortex_m33/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_m33/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m33/gnu/src/txe_thread_secure_stack_allocate.c b/ports/cortex_m33/gnu/src/txe_thread_secure_stack_allocate.c
index 7d669a6f..344e5fd9 100644
--- a/ports/cortex_m33/gnu/src/txe_thread_secure_stack_allocate.c
+++ b/ports/cortex_m33/gnu/src/txe_thread_secure_stack_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
{
@@ -76,10 +71,10 @@ UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_siz
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m33/gnu/src/txe_thread_secure_stack_free.c b/ports/cortex_m33/gnu/src/txe_thread_secure_stack_free.c
index 55299fe9..76832975 100644
--- a/ports/cortex_m33/gnu/src/txe_thread_secure_stack_free.c
+++ b/ports/cortex_m33/gnu/src/txe_thread_secure_stack_free.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,12 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
{
@@ -74,10 +69,10 @@ UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m33/iar/inc/tx_port.h b/ports/cortex_m33/iar/inc/tx_port.h
index 451c6ae4..62f20620 100644
--- a/ports/cortex_m33/iar/inc/tx_port.h
+++ b/ports/cortex_m33/iar/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,39 +46,6 @@
/* This file replaces the previous Cortex-M33 files. It unifies */
/* the Cortex-M33 compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-02-2021 Scott Larson Modified comment(s), added */
-/* ULONG64_DEFINED, */
-/* resulting in version 6.1.5 */
-/* 06-02-2021 Scott Larson Modified comment(s), removed */
-/* unneeded header file, funcs */
-/* set_control and get_control */
-/* changed to inline, */
-/* added symbol to enable */
-/* stack error handler, */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Scott Larson Modified comment(s), improved */
-/* stack check error handling, */
-/* resulting in version 6.1.9 */
-/* 01-31-2022 Scott Larson Modified comment(s), unified */
-/* this file across compilers, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* 03-08-2023 Scott Larson Removed unneeded #include, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -645,7 +613,7 @@ VOID _tx_thread_interrupt_restore(UIN
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M33/IAR Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M33/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m33/iar/inc/tx_secure_interface.h b/ports/cortex_m33/iar/inc/tx_secure_interface.h
index 39b5d5fd..5ac37fbf 100644
--- a/ports/cortex_m33/iar/inc/tx_secure_interface.h
+++ b/ports/cortex_m33/iar/inc/tx_secure_interface.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,12 +38,6 @@
/* It is assumed that tx_api.h and tx_port.h have already been */
/* included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_SECURE_INTERFACE_H
diff --git a/ports/cortex_m33/iar/readme_threadx.txt b/ports/cortex_m33/iar/readme_threadx.txt
index 7758306e..ee6af2fa 100644
--- a/ports/cortex_m33/iar/readme_threadx.txt
+++ b/ports/cortex_m33/iar/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M33
+ Microsoft's Azure RTOS ThreadX for Cortex-M33
Using the IAR Tools
@@ -6,33 +6,33 @@
1. Building the ThreadX run-time Library
Import all ThreadX common and port-specific source files into an IAR project.
-Configure the project to build a library rather than an executable. This
-results in the ThreadX run-time library file tx.a, which is needed by
+Configure the project to build a library rather than an executable. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
-Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
-replace the common files of the same name.
+Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
+replace the common files of the same name.
2. Demonstration System
No demonstration is provided because the IAR EWARM 8.50 simulator does
-not simulate the Cortex-M33 correctly.
+not simulate the Cortex-M33 correctly.
3. System Initialization
-The entry point in ThreadX for the Cortex-M33 using IAR tools is at label
-__iar_program_start. This is defined within the IAR compiler's startup code.
-In addition, this is where all static and global preset C variable
+The entry point in ThreadX for the Cortex-M33 using IAR tools is at label
+__iar_program_start. This is defined within the IAR compiler's startup code.
+In addition, this is where all static and global preset C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, and a periodic timer interrupt source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, and a periodic timer interrupt source.
The _tx_initialize_low_level function inside of tx_initialize_low_level.s
-also determines the first available address for use by the application, which
-is supplied as the sole input parameter to your application definition function,
-tx_application_define. To accomplish this, a section is created in
-tx_initialize_low_level.s called FREE_MEM, which must be located after all
+also determines the first available address for use by the application, which
+is supplied as the sole input parameter to your application definition function,
+tx_application_define. To accomplish this, a section is created in
+tx_initialize_low_level.s called FREE_MEM, which must be located after all
other RAM sections in memory.
@@ -41,7 +41,7 @@ other RAM sections in memory.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M33 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -124,17 +124,17 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-To make ThreadX and the application(s) run faster, you can enable
-all compiler optimizations.
+To make ThreadX and the application(s) run faster, you can enable
+all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
-The Cortex-M33 vectors start at the label __vector_table and is typically defined in a
+The Cortex-M33 vectors start at the label __vector_table and is typically defined in a
startup.s file (or similar). The application may modify the vector area according to its needs.
@@ -182,14 +182,14 @@ should have the following line added (if not already in place):
initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
-The project options "General Options -> Library Configuration" should also have the
+The project options "General Options -> Library Configuration" should also have the
"Enable thread support in library" box selected.
8. VFP Support
-ThreadX for Cortex-M33 supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M33 supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context.
diff --git a/ports/cortex_m33/iar/src/tx_iar.c b/ports/cortex_m33/iar/src/tx_iar.c
index c6092de3..238b485e 100644
--- a/ports/cortex_m33/iar/src/tx_iar.c
+++ b/ports/cortex_m33/iar/src/tx_iar.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,24 +423,24 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#include
+#include
void * __aeabi_read_tp();
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports/cortex_m33/iar/src/tx_initialize_low_level.s b/ports/cortex_m33/iar/src/tx_initialize_low_level.s
index 16fec218..8544e8a5 100644
--- a/ports/cortex_m33/iar/src/tx_initialize_low_level.s
+++ b/ports/cortex_m33/iar/src/tx_initialize_low_level.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,13 +75,6 @@ __tx_free_memory_start
/* CALLED BY */
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_m33/iar/src/tx_misra.s b/ports/cortex_m33/iar/src/tx_misra.s
index f86d9a65..642bb89e 100644
--- a/ports/cortex_m33/iar/src/tx_misra.s
+++ b/ports/cortex_m33/iar/src/tx_misra.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -120,7 +121,7 @@
SECTION `.data`:DATA:REORDER:NOROOT(2)
DATA
-// 51 CHAR _tx_version_id[100] = "Copyright (c) 2024 Microsoft Corporation. * ThreadX 6.1 MISRA C Compliant *";
+// 51 CHAR _tx_version_id[100] = "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX 6.1 MISRA C Compliant *";
_tx_version_id:
DC8 43H, 6FH, 70H, 79H, 72H, 69H, 67H, 68H
DC8 74H, 20H, 28H, 63H, 29H, 20H, 31H, 39H
@@ -707,7 +708,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -722,7 +723,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARMVFP__
/***********************************************************************************************/
@@ -739,8 +740,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -754,10 +755,10 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
-
+
+
SECTION `.iar_vfe_header`:DATA:NOALLOC:NOROOT(2)
SECTION_TYPE SHT_PROGBITS, 0
DATA
diff --git a/ports/cortex_m33/iar/src/tx_thread_context_restore.s b/ports/cortex_m33/iar/src/tx_thread_context_restore.s
index ec1e10eb..3faf1113 100644
--- a/ports/cortex_m33/iar/src/tx_thread_context_restore.s
+++ b/ports/cortex_m33/iar/src/tx_thread_context_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,13 +56,6 @@
/* CALLED BY */
/* */
/* ISRs Interrupt Service Routines */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m33/iar/src/tx_thread_context_save.s b/ports/cortex_m33/iar/src/tx_thread_context_save.s
index 2d5629f9..2c623b9b 100644
--- a/ports/cortex_m33/iar/src/tx_thread_context_save.s
+++ b/ports/cortex_m33/iar/src/tx_thread_context_save.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,13 +56,6 @@
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m33/iar/src/tx_thread_interrupt_control.s b/ports/cortex_m33/iar/src/tx_thread_interrupt_control.s
index e268a93f..c33f8b70 100644
--- a/ports/cortex_m33/iar/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_m33/iar/src/tx_thread_interrupt_control.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,13 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m33/iar/src/tx_thread_interrupt_disable.s b/ports/cortex_m33/iar/src/tx_thread_interrupt_disable.s
index c3b6c7d4..7df58dbf 100644
--- a/ports/cortex_m33/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_m33/iar/src/tx_thread_interrupt_disable.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,13 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m33/iar/src/tx_thread_interrupt_restore.s b/ports/cortex_m33/iar/src/tx_thread_interrupt_restore.s
index 5cea7a57..443a5d51 100644
--- a/ports/cortex_m33/iar/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_m33/iar/src/tx_thread_interrupt_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,13 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m33/iar/src/tx_thread_schedule.s b/ports/cortex_m33/iar/src/tx_thread_schedule.s
index 231f69b5..af0f9196 100644
--- a/ports/cortex_m33/iar/src/tx_thread_schedule.s
+++ b/ports/cortex_m33/iar/src/tx_thread_schedule.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -73,23 +74,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 04-02-2021 Scott Larson Modified comment(s), added */
-/* low power code, */
-/* resulting in version 6.1.6 */
-/* 06-02-2021 Scott Larson Added secure stack initialize */
-/* in SVC handler, */
-/* resulting in version 6.1.7 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 03-08-2023 Scott Larson Added preproc FPU option, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -348,7 +332,7 @@ SVC_Handler:
CMP r1, #2 // Is it a secure stack free request?
BEQ _tx_svc_secure_free // Yes, go there
-
+
CMP r1, #3 // Is it a secure stack init request?
BEQ _tx_svc_secure_init // Yes, go there
diff --git a/ports/cortex_m33/iar/src/tx_thread_secure_stack.c b/ports/cortex_m33/iar/src/tx_thread_secure_stack.c
index f2cf79f5..4e4a7803 100644
--- a/ports/cortex_m33/iar/src/tx_thread_secure_stack.c
+++ b/ports/cortex_m33/iar/src/tx_thread_secure_stack.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -102,20 +103,6 @@ static INT tx_head_free_index = 0U;
/* */
/* _tx_initialize_kernel_enter */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 10-16-2020 Scott Larson Modified comment(s), */
-/* resulting in version 6.1.1 */
-/* 06-02-2021 Scott Larson Change name, execute in */
-/* handler mode, */
-/* resulting in version 6.1.7 */
-/* 01-31-2022 Himanshu Gupta Modified comments(s), updated */
-/* secure stack allocation, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
__attribute__((cmse_nonsecure_entry))
UINT _tx_thread_secure_mode_stack_initialize(void)
diff --git a/ports/cortex_m33/iar/src/tx_thread_secure_stack_allocate.s b/ports/cortex_m33/iar/src/tx_thread_secure_stack_allocate.s
index 49413f19..7a59008b 100644
--- a/ports/cortex_m33/iar/src/tx_thread_secure_stack_allocate.s
+++ b/ports/cortex_m33/iar/src/tx_thread_secure_stack_allocate.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,13 +57,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
// {
diff --git a/ports/cortex_m33/iar/src/tx_thread_secure_stack_free.s b/ports/cortex_m33/iar/src/tx_thread_secure_stack_free.s
index 281feacb..f3431f06 100644
--- a/ports/cortex_m33/iar/src/tx_thread_secure_stack_free.s
+++ b/ports/cortex_m33/iar/src/tx_thread_secure_stack_free.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,13 +55,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_free(TX_THREAD *thread_ptr)
// {
diff --git a/ports/cortex_m33/iar/src/tx_thread_secure_stack_initialize.s b/ports/cortex_m33/iar/src/tx_thread_secure_stack_initialize.s
index 20d101eb..c8e75cdd 100644
--- a/ports/cortex_m33/iar/src/tx_thread_secure_stack_initialize.s
+++ b/ports/cortex_m33/iar/src/tx_thread_secure_stack_initialize.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* CALLED BY */
/* */
/* TX_PORT_SPECIFIC_PRE_INITIALIZATION */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
// VOID _tx_thread_secure_stack_initialize(VOID)
// {
diff --git a/ports/cortex_m33/iar/src/tx_thread_stack_build.s b/ports/cortex_m33/iar/src/tx_thread_stack_build.s
index 51da3e87..68adac04 100644
--- a/ports/cortex_m33/iar/src/tx_thread_stack_build.s
+++ b/ports/cortex_m33/iar/src/tx_thread_stack_build.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,13 +58,6 @@
/* CALLED BY */
/* */
/* _tx_thread_create Create thread service */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m33/iar/src/tx_thread_system_return.s b/ports/cortex_m33/iar/src/tx_thread_system_return.s
index 9f2b721f..442e0e14 100644
--- a/ports/cortex_m33/iar/src/tx_thread_system_return.s
+++ b/ports/cortex_m33/iar/src/tx_thread_system_return.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,13 +58,6 @@
/* CALLED BY */
/* */
/* ThreadX components */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m33/iar/src/tx_timer_interrupt.s b/ports/cortex_m33/iar/src/tx_timer_interrupt.s
index edf7400b..de3cbf40 100644
--- a/ports/cortex_m33/iar/src/tx_timer_interrupt.s
+++ b/ports/cortex_m33/iar/src/tx_timer_interrupt.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,13 +72,6 @@
/* CALLED BY */
/* */
/* interrupt vector */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m33/iar/src/txe_thread_secure_stack_allocate.c b/ports/cortex_m33/iar/src/txe_thread_secure_stack_allocate.c
index 7d669a6f..344e5fd9 100644
--- a/ports/cortex_m33/iar/src/txe_thread_secure_stack_allocate.c
+++ b/ports/cortex_m33/iar/src/txe_thread_secure_stack_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
{
@@ -76,10 +71,10 @@ UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_siz
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m33/iar/src/txe_thread_secure_stack_free.c b/ports/cortex_m33/iar/src/txe_thread_secure_stack_free.c
index 55299fe9..76832975 100644
--- a/ports/cortex_m33/iar/src/txe_thread_secure_stack_free.c
+++ b/ports/cortex_m33/iar/src/txe_thread_secure_stack_free.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,12 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
{
@@ -74,10 +69,10 @@ UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m4/ac5/example_build/sample_threadx.c b/ports/cortex_m4/ac5/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/cortex_m4/ac5/example_build/sample_threadx.c
+++ b/ports/cortex_m4/ac5/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m4/ac5/example_build/tx_initialize_low_level.s b/ports/cortex_m4/ac5/example_build/tx_initialize_low_level.s
index d6d6a6bf..5f5e42b5 100644
--- a/ports/cortex_m4/ac5/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_m4/ac5/example_build/tx_initialize_low_level.s
@@ -126,12 +126,6 @@ Reset_Handler
;/* */
;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
;{
diff --git a/ports/cortex_m4/ac5/inc/tx_port.h b/ports/cortex_m4/ac5/inc/tx_port.h
index cd5c9a5f..87b3dd5c 100644
--- a/ports/cortex_m4/ac5/inc/tx_port.h
+++ b/ports/cortex_m4/ac5/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,23 +46,6 @@
/* This file replaces the previous Cortex-M3/M4/M7 files. It unifies */
/* the ARMv7-M architecture and compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comments, updated */
-/* typedef to fix misra */
-/* violation, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -371,7 +355,7 @@ void _tx_vfp_access(void);
/* A thread can be terminated by another thread, so we first check if it's self-terminating and not in an ISR.
If so, deactivate the FPU via CONTROL.FPCA. Otherwise we are in an interrupt or another thread is terminating
- this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
+ this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
the lazy FPU save, then restore the CONTROL.FPCA state. */
#ifndef TX_MISRA_ENABLE
@@ -530,7 +514,7 @@ ULONG _tx_misra_ipsr_get(VOID);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) (b) = (UINT) __clz(__rbit((m)));
#elif defined(__GNUC__) /* GCC and AC6 Compiler */
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) __asm__ volatile (" RBIT %0,%1 ": "=r" (m) : "r" (m) ); \
- __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
+ __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
#endif
@@ -715,7 +699,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M4/AC5 Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M4/AC5 Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m4/ac5/readme_threadx.txt b/ports/cortex_m4/ac5/readme_threadx.txt
index b7b7cee9..e261213e 100644
--- a/ports/cortex_m4/ac5/readme_threadx.txt
+++ b/ports/cortex_m4/ac5/readme_threadx.txt
@@ -5,14 +5,14 @@
1. Building the ThreadX run-time Library
-Navigate to the "example_build" directory. Ensure that
-you have setup your path and other environment variables necessary for the AC5
-compiler. At this point you may run the build_threadx.bat batch file. This will
-build the ThreadX run-time environment in the "example_build" directory.
+Navigate to the "example_build" directory. Ensure that
+you have setup your path and other environment variables necessary for the AC5
+compiler. At this point you may run the build_threadx.bat batch file. This will
+build the ThreadX run-time environment in the "example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
@@ -21,28 +21,28 @@ application in order to use ThreadX.
The ThreadX demonstration is designed to execute under the ARM DS Cortex-M
simulator.
-Building the demonstration is easy; simply execute the build_threadx_sample.bat
+Building the demonstration is easy; simply execute the build_threadx_sample.bat
batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.axf
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.axf
is a binary file that can be downloaded and executed on the ARM DS Cortex-M
simulator.
3. System Initialization
-The entry point in ThreadX for the Cortex-M using AC5 tools is at label
-__main. This is defined within the AC5 compiler's startup code. In
-addition, this is where all static and global pre-set C variable
+The entry point in ThreadX for the Cortex-M using AC5 tools is at label
+__main. This is defined within the AC5 compiler's startup code. In
+addition, this is where all static and global pre-set C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -51,7 +51,7 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -134,21 +134,21 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
@@ -187,8 +187,8 @@ your_assembly_isr
7. FPU Support
-ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context - no additional setup by the application.
diff --git a/ports/cortex_m4/ac5/src/tx_thread_context_restore.s b/ports/cortex_m4/ac5/src/tx_thread_context_restore.s
index de72ba83..f401e147 100644
--- a/ports/cortex_m4/ac5/src/tx_thread_context_restore.s
+++ b/ports/cortex_m4/ac5/src/tx_thread_context_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* CALLED BY */
/* */
/* ISRs Interrupt Service Routines */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m4/ac5/src/tx_thread_context_save.s b/ports/cortex_m4/ac5/src/tx_thread_context_save.s
index 572f40a8..16d7536e 100644
--- a/ports/cortex_m4/ac5/src/tx_thread_context_save.s
+++ b/ports/cortex_m4/ac5/src/tx_thread_context_save.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m4/ac5/src/tx_thread_interrupt_control.s b/ports/cortex_m4/ac5/src/tx_thread_interrupt_control.s
index c64bac49..f3e273ed 100644
--- a/ports/cortex_m4/ac5/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_m4/ac5/src/tx_thread_interrupt_control.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,15 +55,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m4/ac5/src/tx_thread_interrupt_disable.s b/ports/cortex_m4/ac5/src/tx_thread_interrupt_disable.s
index 58191f13..555691e4 100644
--- a/ports/cortex_m4/ac5/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_m4/ac5/src/tx_thread_interrupt_disable.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,15 +55,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m4/ac5/src/tx_thread_interrupt_restore.s b/ports/cortex_m4/ac5/src/tx_thread_interrupt_restore.s
index 0564cfc5..7eb19d65 100644
--- a/ports/cortex_m4/ac5/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_m4/ac5/src/tx_thread_interrupt_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,15 +55,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m4/ac5/src/tx_thread_schedule.s b/ports/cortex_m4/ac5/src/tx_thread_schedule.s
index f6ff9510..f11a31c7 100644
--- a/ports/cortex_m4/ac5/src/tx_thread_schedule.s
+++ b/ports/cortex_m4/ac5/src/tx_thread_schedule.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,17 +68,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
diff --git a/ports/cortex_m4/ac5/src/tx_thread_stack_build.s b/ports/cortex_m4/ac5/src/tx_thread_stack_build.s
index ce5e27db..5d090bbc 100644
--- a/ports/cortex_m4/ac5/src/tx_thread_stack_build.s
+++ b/ports/cortex_m4/ac5/src/tx_thread_stack_build.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* CALLED BY */
/* */
/* _tx_thread_create Create thread service */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m4/ac5/src/tx_thread_system_return.s b/ports/cortex_m4/ac5/src/tx_thread_system_return.s
index b32ebf2e..06d5ccae 100644
--- a/ports/cortex_m4/ac5/src/tx_thread_system_return.s
+++ b/ports/cortex_m4/ac5/src/tx_thread_system_return.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* CALLED BY */
/* */
/* ThreadX components */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m4/ac5/src/tx_timer_interrupt.s b/ports/cortex_m4/ac5/src/tx_timer_interrupt.s
index 3e66442b..e2682bf3 100644
--- a/ports/cortex_m4/ac5/src/tx_timer_interrupt.s
+++ b/ports/cortex_m4/ac5/src/tx_timer_interrupt.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,18 +72,6 @@
/* CALLED BY */
/* */
/* interrupt vector */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comment(s), added */
-/* TX_NO_TIMER support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m4/ac6/example_build/sample_threadx/.cproject b/ports/cortex_m4/ac6/example_build/sample_threadx/.cproject
index c131df5e..f3357354 100644
--- a/ports/cortex_m4/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_m4/ac6/example_build/sample_threadx/.cproject
@@ -1,170 +1,170 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_m4/ac6/example_build/sample_threadx/exceptions.c b/ports/cortex_m4/ac6/example_build/sample_threadx/exceptions.c
index 94c87d7a..f0dd8600 100644
--- a/ports/cortex_m4/ac6/example_build/sample_threadx/exceptions.c
+++ b/ports/cortex_m4/ac6/example_build/sample_threadx/exceptions.c
@@ -1,7 +1,7 @@
/*
** Copyright (c) 2006-2017 Arm Limited (or its affiliates). All rights reserved.
** Use, modification and redistribution of this file is subject to your possession of a
-** valid End User License Agreement for the Arm Product of which these examples are part of
+** valid End User License Agreement for the Arm Product of which these examples are part of
** and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_m4/ac6/example_build/sample_threadx/sample_threadx.c b/ports/cortex_m4/ac6/example_build/sample_threadx/sample_threadx.c
index 597f373c..13ffadba 100644
--- a/ports/cortex_m4/ac6/example_build/sample_threadx/sample_threadx.c
+++ b/ports/cortex_m4/ac6/example_build/sample_threadx/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -81,42 +81,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -124,23 +124,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -243,11 +243,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -306,7 +306,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -359,7 +359,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m4/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_m4/ac6/example_build/sample_threadx/sample_threadx.scat
index eb8e0c23..1b489e7d 100644
--- a/ports/cortex_m4/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_m4/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -1,7 +1,7 @@
;*******************************************************
; Copyright (c) 2006-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;*******************************************************
diff --git a/ports/cortex_m4/ac6/example_build/sample_threadx/tx_initialize_low_level.S b/ports/cortex_m4/ac6/example_build/sample_threadx/tx_initialize_low_level.S
index c60db600..16dd113e 100644
--- a/ports/cortex_m4/ac6/example_build/sample_threadx/tx_initialize_low_level.S
+++ b/ports/cortex_m4/ac6/example_build/sample_threadx/tx_initialize_low_level.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -75,12 +75,6 @@ SYSTICK_CYCLES = ((SYSTEM_CLOCK / 100) -1)
@/* */
@/* _tx_initialize_kernel_enter ThreadX entry function */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* */
@/**************************************************************************/
@VOID _tx_initialize_low_level(VOID)
@{
diff --git a/ports/cortex_m4/ac6/example_build/tx/.cproject b/ports/cortex_m4/ac6/example_build/tx/.cproject
index 91e9ca8f..3e44eb06 100644
--- a/ports/cortex_m4/ac6/example_build/tx/.cproject
+++ b/ports/cortex_m4/ac6/example_build/tx/.cproject
@@ -1,146 +1,146 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_m4/ac6/inc/tx_port.h b/ports/cortex_m4/ac6/inc/tx_port.h
index 5f65a194..fa109c52 100644
--- a/ports/cortex_m4/ac6/inc/tx_port.h
+++ b/ports/cortex_m4/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,23 +46,6 @@
/* This file replaces the previous Cortex-M3/M4/M7 files. It unifies */
/* the ARMv7-M architecture and compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comments, updated */
-/* typedef to fix misra */
-/* violation, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -371,7 +355,7 @@ void _tx_vfp_access(void);
/* A thread can be terminated by another thread, so we first check if it's self-terminating and not in an ISR.
If so, deactivate the FPU via CONTROL.FPCA. Otherwise we are in an interrupt or another thread is terminating
- this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
+ this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
the lazy FPU save, then restore the CONTROL.FPCA state. */
#ifndef TX_MISRA_ENABLE
@@ -530,7 +514,7 @@ ULONG _tx_misra_ipsr_get(VOID);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) (b) = (UINT) __clz(__rbit((m)));
#elif defined(__GNUC__) /* GCC and AC6 Compiler */
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) __asm__ volatile (" RBIT %0,%1 ": "=r" (m) : "r" (m) ); \
- __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
+ __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
#endif
@@ -715,7 +699,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M4/AC6 Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M4/AC6 Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m4/ac6/readme_threadx.txt b/ports/cortex_m4/ac6/readme_threadx.txt
index d98c90cb..6447c517 100644
--- a/ports/cortex_m4/ac6/readme_threadx.txt
+++ b/ports/cortex_m4/ac6/readme_threadx.txt
@@ -5,12 +5,12 @@
1. Building the ThreadX run-time Library
-In order to build the ThreadX library and the ThreadX demonstration, first import
-the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
+In order to build the ThreadX library and the ThreadX demonstration, first import
+the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
into your DS workspace.
-Building the ThreadX library is easy; simply right-click the Eclipse project
-"tx" and then select the "Build Project" button. You should now observe the compilation
+Building the ThreadX library is easy; simply right-click the Eclipse project
+"tx" and then select the "Build Project" button. You should now observe the compilation
and assembly of the ThreadX library. This project build produces the ThreadX
library file tx.a.
@@ -20,27 +20,27 @@ library file tx.a.
The ThreadX demonstration is designed to execute under the DS debugger on the
MPS2_Cortex_Mx Bare Metal simulator.
-Building the demonstration is easy; simply right-click the Eclipse project
-"sample_threadx" and then select the "Build Project" button. You should now observe
-the compilation and assembly of the ThreadX demonstration. This project build produces
-the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
+Building the demonstration is easy; simply right-click the Eclipse project
+"sample_threadx" and then select the "Build Project" button. You should now observe
+the compilation and assembly of the ThreadX demonstration. This project build produces
+the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
in the Project Explorer window, right-click on the 'cortex-mx_tx.launch' file, click
'Debug As', and then click 'cortex-mx_tx' from the submenu. This will cause the
-debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
+debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
to execute the ThreadX demonstration.
3. System Initialization
-The entry point in ThreadX for the Cortex-M using AC6 tools uses the standard GNU
+The entry point in ThreadX for the Cortex-M using AC6 tools uses the standard GNU
Cortex-M reset sequence. From the reset vector the C runtime will be initialized.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.S file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -49,7 +49,7 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -132,34 +132,34 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
6.1 Vector Area
The Cortex-M vectors start at the label __tx_vectors or similar. The application may modify
-the vector area according to its needs. There is code in tx_initialize_low_level() that will
-configure the vector base register.
+the vector area according to its needs. There is code in tx_initialize_low_level() that will
+configure the vector base register.
6.2 Managed Interrupts
-A ThreadX managed interrupt is defined below. By following these conventions, the
+A ThreadX managed interrupt is defined below. By following these conventions, the
application ISR is then allowed access to various ThreadX services from the ISR.
Here is the standard template for managed ISRs in ThreadX:
@@ -181,15 +181,15 @@ __tx_IntHandler:
Note: the Cortex-M requires exception handlers to be thumb labels, this implies bit 0 set.
To accomplish this, the declaration of the label has to be preceded by the assembler directive
-.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
-be inserted in the correct location in the interrupt vector table. This table is typically
+.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
+be inserted in the correct location in the interrupt vector table. This table is typically
located in either your runtime startup file or in the tx_initialize_low_level.S file.
7. FPU Support
-ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context - no additional setup by the application.
diff --git a/ports/cortex_m4/ac6/src/tx_misra.S b/ports/cortex_m4/ac6/src/tx_misra.S
index 8ac0c629..10548671 100644
--- a/ports/cortex_m4/ac6/src/tx_misra.S
+++ b/ports/cortex_m4/ac6/src/tx_misra.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -667,7 +668,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -682,7 +683,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARM_FP
/***********************************************************************************************/
@@ -699,8 +700,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -714,9 +715,9 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
+
.data
.word 0
diff --git a/ports/cortex_m4/ac6/src/tx_thread_context_restore.S b/ports/cortex_m4/ac6/src/tx_thread_context_restore.S
index d60cf6b8..330789f4 100644
--- a/ports/cortex_m4/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_m4/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m4/ac6/src/tx_thread_context_save.S b/ports/cortex_m4/ac6/src/tx_thread_context_save.S
index abc0ac5d..a6c1a053 100644
--- a/ports/cortex_m4/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_m4/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,14 +61,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m4/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_m4/ac6/src/tx_thread_interrupt_control.S
index 76b114b8..51b0e3fe 100644
--- a/ports/cortex_m4/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_m4/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m4/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_m4/ac6/src/tx_thread_interrupt_disable.S
index b2fb050d..df262e8c 100644
--- a/ports/cortex_m4/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_m4/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m4/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_m4/ac6/src/tx_thread_interrupt_restore.S
index 47c8f0f9..d3e167bd 100644
--- a/ports/cortex_m4/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_m4/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m4/ac6/src/tx_thread_schedule.S b/ports/cortex_m4/ac6/src/tx_thread_schedule.S
index b02b6eee..0b15b4de 100644
--- a/ports/cortex_m4/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_m4/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,16 +71,6 @@
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
diff --git a/ports/cortex_m4/ac6/src/tx_thread_stack_build.S b/ports/cortex_m4/ac6/src/tx_thread_stack_build.S
index 8cdaa034..5ae2c8f7 100644
--- a/ports/cortex_m4/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_m4/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m4/ac6/src/tx_thread_system_return.S b/ports/cortex_m4/ac6/src/tx_thread_system_return.S
index f75b1e7a..b4348f9d 100644
--- a/ports/cortex_m4/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_m4/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m4/ac6/src/tx_timer_interrupt.S b/ports/cortex_m4/ac6/src/tx_timer_interrupt.S
index f1f39c3f..1a52ecda 100644
--- a/ports/cortex_m4/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_m4/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,17 +71,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comment(s), added */
-/* TX_NO_TIMER support, */
-/* resulting in version 6.1.10 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m4/ghs/example_build/sample_threadx.c b/ports/cortex_m4/ghs/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/cortex_m4/ghs/example_build/sample_threadx.c
+++ b/ports/cortex_m4/ghs/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m4/ghs/example_build/tx_initialize_low_level.arm b/ports/cortex_m4/ghs/example_build/tx_initialize_low_level.arm
index 03a9a100..1a144b7b 100644
--- a/ports/cortex_m4/ghs/example_build/tx_initialize_low_level.arm
+++ b/ports/cortex_m4/ghs/example_build/tx_initialize_low_level.arm
@@ -1,18 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Initialize */
/** */
@@ -24,42 +24,42 @@
.text
.align 4
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_initialize_low_level Cortex-M4/GHS */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_initialize_low_level Cortex-M4/GHS */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function is responsible for any low-level processor */
-/* initialization, including setting up interrupt vectors, setting */
-/* up a periodic timer interrupt source, saving the system stack */
-/* pointer for use in ISR processing later, and finding the first */
-/* available RAM memory address for tx_application_define. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_initialize_kernel_enter ThreadX entry function */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* */
+/* This function is responsible for any low-level processor */
+/* initialization, including setting up interrupt vectors, setting */
+/* up a periodic timer interrupt source, saving the system stack */
+/* pointer for use in ISR processing later, and finding the first */
+/* available RAM memory address for tx_application_define. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_initialize_kernel_enter ThreadX entry function */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -71,7 +71,7 @@
_tx_initialize_low_level:
/* Disable interrupts. */
-
+
CPSID i ; Disable interrupts
@@ -79,7 +79,7 @@ _tx_initialize_low_level:
/* _tx_thread_system_stack_ptr = (VOID_PTR) (sp); */
LDR r1,=_tx_thread_system_stack_ptr ; Pickup address of system stack ptr
- STR sp, [r1] ; Save system stack
+ STR sp, [r1] ; Save system stack
/* Save the first available memory address. */
@@ -95,14 +95,14 @@ _tx_initialize_low_level:
LDR r0, =0xE0001000 ; Build address of DWT register
LDR r1, [r0] ; Pickup the current value
ORR r1, r1, 1 ; Set the CYCCNTENA bit
- STR r1, [r0] ; Enable the cycle count register
+ STR r1, [r0] ; Enable the cycle count register
/* Setup Vector Table Offset Register. */
-
+
MOV r0, 0xE000E000 ; Build address of NVIC registers
LDR r1, =__vectors ; Pickup address of vector table
- STR r1, [r0, 0xD08] ; Set vector table address
+ STR r1, [r0, 0xD08] ; Set vector table address
/* Configure SysTick for 100Hz clock, or 16384 cycles if no reference. */
@@ -134,7 +134,7 @@ _tx_initialize_low_level:
#endif
/* Return to caller. */
-
+
BX lr ; Return to caller
.type _tx_initialize_low_level,$function
@@ -145,7 +145,7 @@ _tx_initialize_low_level:
/* Define shells for each of the interrupt vectors. */
.globl __tx_BadHandler
-__tx_BadHandler:
+__tx_BadHandler:
B __tx_BadHandler
.type __tx_BadHandler,$function
@@ -161,7 +161,7 @@ __tx_IntHandler:
MOV r0, 0 ; Build interrupt code
BL _tx_el_interrupt ; Call interrupt event logging
#endif
-
+
; /* Do interrupt handler work here */
; /* .... */
@@ -199,7 +199,7 @@ __tx_SysTickHandler:
.size __tx_SysTickHandler,.-__tx_SysTickHandler
- .globl __tx_NMIHandler
+ .globl __tx_NMIHandler
__tx_NMIHandler:
B __tx_NMIHandler
@@ -220,7 +220,7 @@ __tx_SVCallHandler:
B __tx_SVCallHandler
.type __tx_SVCallHandler,$function
- .size __tx_SVCallHandler,.-__tx_SVCallHandler
+ .size __tx_SVCallHandler,.-__tx_SVCallHandler
/* Reference build options and version ID to ensure they come in. */
diff --git a/ports/cortex_m4/ghs/inc/tx_el.h b/ports/cortex_m4/ghs/inc/tx_el.h
index 4662f241..72e5bbe3 100644
--- a/ports/cortex_m4/ghs/inc/tx_el.h
+++ b/ports/cortex_m4/ghs/inc/tx_el.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** ThreadX/GHS Event Log (EL) */
@@ -20,27 +21,21 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* COMPONENT DEFINITION RELEASE */
-/* */
-/* tx_el.h PORTABLE C/GHS */
+/**************************************************************************/
+/* */
+/* COMPONENT DEFINITION RELEASE */
+/* */
+/* tx_el.h PORTABLE C/GHS */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file defines the ThreadX event log functions for the GHS MULTI */
-/* EventAnalyzer. It is assumed that tx_api.h and tx_port.h have */
-/* already been included. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This file defines the ThreadX event log functions for the GHS MULTI */
+/* EventAnalyzer. It is assumed that tx_api.h and tx_port.h have */
+/* already been included. */
/* */
/**************************************************************************/
@@ -53,16 +48,16 @@
#define TX_EL_VERSION_ID 2 /* Event log version ID */
#define TX_EL_HEADER_SIZE 24 /* Event log header size */
#define TX_EL_TNIS 16 /* Number of thread names supported */
- /* If the application needs to */
- /* track more thread names, just */
- /* increase this number and re- */
- /* build the ThreadX library. */
+ /* If the application needs to */
+ /* track more thread names, just */
+ /* increase this number and re- */
+ /* build the ThreadX library. */
#define TX_EL_TNI_ENTRY_SIZE 44 /* Thread name entries are 44 bytes */
#define TX_EL_TNI_NAME_SIZE 34 /* Thread name size in TNI */
#define TX_EL_NO_MORE_TNI_ROOM 1 /* Error return from thread register*/
-#define TX_EL_NAME_NOT_FOUND 2 /* Error return from un-register */
+#define TX_EL_NAME_NOT_FOUND 2 /* Error return from un-register */
#define TX_EL_EVENT_SIZE 32 /* Number of bytes in each event */
-#define TX_EL_VALID_ENTRY 1 /* Valid log entry */
+#define TX_EL_VALID_ENTRY 1 /* Valid log entry */
#define TX_EL_INVALID_ENTRY 0 /* Invalid log entry */
@@ -295,7 +290,7 @@
/* Define filter macros that are inserted in-line with the other macros below. */
-#ifdef TX_ENABLE_EVENT_FILTERS
+#ifdef TX_ENABLE_EVENT_FILTERS
#define TX_EL_NO_STATUS_EVENTS if (!(_tx_el_event_filter & TX_EL_FILTER_STATUS_CHANGE)) {
#define TX_EL_NO_INTERRUPT_EVENTS if (!(_tx_el_event_filter & TX_EL_FILTER_INTERRUPTS)) {
#define TX_EL_NO_THREAD_EVENTS if (!(_tx_el_event_filter & TX_EL_FILTER_THREAD_CALLS)) {
@@ -430,7 +425,7 @@ extern ULONG _tx_el_time_base_lower;
VOID _tx_el_initialize(VOID);
UINT _tx_el_thread_register(TX_THREAD *thread_ptr);
UINT _tx_el_thread_unregister(TX_THREAD *thread_ptr);
-VOID _tx_el_user_event_insert(UINT sub_type, ULONG info_1, ULONG info_2,
+VOID _tx_el_user_event_insert(UINT sub_type, ULONG info_1, ULONG info_2,
ULONG info_3, ULONG info_4);
VOID _tx_el_thread_running(TX_THREAD *thread_ptr);
VOID _tx_el_thread_preempted(TX_THREAD *thread_ptr);
@@ -747,7 +742,7 @@ VOID _tx_el_event_filter_set(UINT filter);
#define TX_EL_THREAD_UNREGISTER(a) \
_tx_el_thread_unregister(a);
#define TX_EL_INITIALIZE _tx_el_initialize();
-#endif
+#endif
#else
#define TX_EL_KERNEL_CALL_EVENT_INSERT_INFO4(a, b, c, d, e)
#define TX_EL_KERNEL_CALL_EVENT_INSERT_INFO3(a, b, c, d)
diff --git a/ports/cortex_m4/ghs/inc/tx_port.h b/ports/cortex_m4/ghs/inc/tx_port.h
index 88cb4853..4382845a 100644
--- a/ports/cortex_m4/ghs/inc/tx_port.h
+++ b/ports/cortex_m4/ghs/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -61,7 +53,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -112,7 +104,7 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
+#ifndef TX_TIMER_THREAD_PRIORITY
#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
@@ -123,8 +115,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0 /* Enable interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -133,7 +125,7 @@ typedef unsigned short USHORT;
*/
#ifndef TX_TRACE_TIME_SOURCE
-#define TX_TRACE_TIME_SOURCE *((ULONG *) 0xE0001004)
+#define TX_TRACE_TIME_SOURCE *((ULONG *) 0xE0001004)
#endif
#ifndef TX_TRACE_TIME_MASK
#define TX_TRACE_TIME_MASK 0xFFFFFFFFUL
@@ -145,13 +137,13 @@ typedef unsigned short USHORT;
/* Define the number of ticks per second. This informs the EventAnalyzer what the timestamps
represent. By default, this is set to 1,000,000 i.e., one tick every microsecond. */
-#define TX_EL_TICKS_PER_SECOND 1000000
+#define TX_EL_TICKS_PER_SECOND 1000000
/* Define the method of how to get the upper and lower 32-bits of the time stamp. By default, simply
- simulate the time-stamp source with a counter. */
+ simulate the time-stamp source with a counter. */
-#define read_tbu() _tx_el_time_base_upper
-#define read_tbl() ++_tx_el_time_base_lower
+#define read_tbu() _tx_el_time_base_upper
+#define read_tbl() ++_tx_el_time_base_lower
/* Define the port specific options for the _tx_build_options variable. This variable indicates
@@ -167,7 +159,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -179,19 +171,19 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#define TX_THREAD_EXTENSION_2 VOID * tx_thread_eh_globals; \
int Errno; /* errno. */ \
char * strtok_saved_pos; /* strtok() position. */
#ifndef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
#else
#define TX_THREAD_EXTENSION_3 unsigned long long tx_thread_execution_time_total; \
- unsigned long long tx_thread_execution_time_last_start;
+ unsigned long long tx_thread_execution_time_last_start;
#endif
@@ -206,11 +198,11 @@ typedef unsigned short USHORT;
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -240,7 +232,7 @@ typedef unsigned short USHORT;
extern void __tx_cpp_exception_cleanup(TX_THREAD *thread_ptr); \
__tx_cpp_exception_cleanup(thread_ptr); \
}
-#else
+#else
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) \
{ \
#pragma weak __cpp_exception_cleanup \
@@ -279,7 +271,7 @@ typedef unsigned short USHORT;
/* Define the get system state macro. */
-
+
#ifndef TX_THREAD_GET_SYSTEM_STATE
#define TX_THREAD_GET_SYSTEM_STATE() (_tx_thread_system_state | __MRS(__IPSR))
#endif
@@ -291,32 +283,32 @@ typedef unsigned short USHORT;
zero after initialization for Cortex-M ports. */
#ifndef TX_THREAD_SYSTEM_RETURN_CHECK
-#define TX_THREAD_SYSTEM_RETURN_CHECK(c) (c) = ((ULONG) _tx_thread_preempt_disable);
+#define TX_THREAD_SYSTEM_RETURN_CHECK(c) (c) = ((ULONG) _tx_thread_preempt_disable);
#endif
-/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
+/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
prevent early scheduling on Cortex-M parts. */
-
+
#define TX_PORT_SPECIFIC_POST_INITIALIZATION _tx_thread_preempt_disable++;
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef TX_DISABLE_INLINE
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = __CLZ32(m); \
- b = 31 - b;
+ b = 31 - b;
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -386,7 +378,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M4/GHS Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M4/GHS Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_m4/ghs/readme_threadx.txt b/ports/cortex_m4/ghs/readme_threadx.txt
index 86a49522..f57a1679 100644
--- a/ports/cortex_m4/ghs/readme_threadx.txt
+++ b/ports/cortex_m4/ghs/readme_threadx.txt
@@ -4,16 +4,16 @@
1. Open the ThreadX Project Workspace
-In order to build the ThreadX library and the ThreadX demonstration first load
-the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
-"example_build" directory.
+In order to build the ThreadX library and the ThreadX demonstration first load
+the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
+"example_build" directory.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply select the MULTI project file
-tx.gpj and then select the build button. You should now observe the
-compilation and assembly of the ThreadX library. This project build produces
+Building the ThreadX library is easy; simply select the MULTI project file
+tx.gpj and then select the build button. You should now observe the
+compilation and assembly of the ThreadX library. This project build produces
the ThreadX library file tx.a.
@@ -21,52 +21,52 @@ the ThreadX library file tx.a.
The ThreadX demonstration is designed to execute under the MULTI environment
on the Green Hills Cortex-M4 simulator. The instructions that follow describe
-how to get the ThreadX evaluation running under the MULTI Cortex-M4 simulation
+how to get the ThreadX evaluation running under the MULTI Cortex-M4 simulation
environment.
-Building the demonstration is easy; simply select the MULTI project file
-sample_threadx.gpj. At this point, select the "Project Build" button and observe
-the compilation, assembly, and linkage of the ThreadX demonstration application.
+Building the demonstration is easy; simply select the MULTI project file
+sample_threadx.gpj. At this point, select the "Project Build" button and observe
+the compilation, assembly, and linkage of the ThreadX demonstration application.
-After the demonstration is built, invoke the MULTI ARM simulator by selecting
-the simulator connection from within the sample_threadx.con connection file.
-Once connected to the simulator, select the "Debug" button. You should now
-observe the main function of sample_threadx.c.
+After the demonstration is built, invoke the MULTI ARM simulator by selecting
+the simulator connection from within the sample_threadx.con connection file.
+Once connected to the simulator, select the "Debug" button. You should now
+observe the main function of sample_threadx.c.
-You are now ready to execute the ThreadX demonstration system. Select
-breakpoints and data watches to observe the execution of the sample_threadx.c
+You are now ready to execute the ThreadX demonstration system. Select
+breakpoints and data watches to observe the execution of the sample_threadx.c
application.
4. EventAnalyzer Demonstration
-To build a demonstration system that also logs events for the MULTI EventAnalyzer,
-perform the same steps as the regular demo, except build the ThreadX library with
-txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
-The resulting image will log all system events, which can then be displayed by the
+To build a demonstration system that also logs events for the MULTI EventAnalyzer,
+perform the same steps as the regular demo, except build the ThreadX library with
+txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
+The resulting image will log all system events, which can then be displayed by the
MULTI EventAnalyzer.
5. System Initialization
-The system entry point using the Green Hills tools is at the label _start.
-This is defined within the crt0.arm file supplied by Green Hills. In addition,
-this is where all static and global preset C variable initialization
+The system entry point using the Green Hills tools is at the label _start.
+This is defined within the crt0.arm file supplied by Green Hills. In addition,
+this is where all static and global preset C variable initialization
processing is called from.
After the Green Hills startup function returns, ThreadX initialization is
called. The main initialization function is _tx_initialize_low_level and
-is located in the file tx_initialize_low_level.arm. This function is responsible
-for setting up various system data structures, interrupt vectors, and the
+is located in the file tx_initialize_low_level.arm. This function is responsible
+for setting up various system data structures, interrupt vectors, and the
periodic timer interrupt source of ThreadX.
-In addition, _tx_initialize_low_level determines where the first available
+In addition, _tx_initialize_low_level determines where the first available
RAM memory address is located. This address is supplied to tx_application_define.
-By default, the first available RAM memory address is assumed to start at the
-beginning of the ThreadX section .free_mem. If changes are made to the
-sample_threadx.ld file, the .free_mem section should remain the last allocated
-section in the main RAM area. The starting address of this section is passed
+By default, the first available RAM memory address is assumed to start at the
+beginning of the ThreadX section .free_mem. If changes are made to the
+sample_threadx.ld file, the .free_mem section should remain the last allocated
+section in the main RAM area. The starting address of this section is passed
to tx_application_define.
@@ -75,7 +75,7 @@ to tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M4 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
@@ -159,21 +159,21 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
7. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make ThreadX run faster, you can change the tx.gpj project
-to disable debug information and enable the desired optimizations.
+to disable debug information and enable the desired optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined before tx_api.h is included.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined before tx_api.h is included.
8. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M4
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
@@ -185,7 +185,7 @@ the vector area according to its needs.
8.2 Managed Interrupts
-A ThreadX managed interrupt is defined below. By following these conventions, the
+A ThreadX managed interrupt is defined below. By following these conventions, the
application ISR is then allowed access to various ThreadX services from the ISR.
Here is the standard template for managed ISRs in ThreadX:
@@ -194,7 +194,7 @@ Here is the standard template for managed ISRs in ThreadX:
__tx_IntHandler:
PUSH {lr}
BL _tx_thread_context_save
-
+
/* Do interrupt handler work here */
B _tx_thread_context_restore
@@ -204,7 +204,7 @@ __tx_IntHandler:
By default, FPU support is disabled for each thread. If saving the context of the FPU registers
is needed, the ThreadX library should be re-built with TX_ENABLE_FPU_SUPPORT defined. In addition,
-the following API call must be made from the context of the application thread - before
+the following API call must be made from the context of the application thread - before
the FPU usage:
void tx_thread_fpu_enable(void);
@@ -231,7 +231,7 @@ information associated with this specific port of ThreadX:
03-02-2021 The following files were changed/added for version 6.1.5:
tx_thread_schedule.s Added low power feature
-05/19/2020 Initial ThreadX version of Cortex-M4/Green Hills port.
+05/19/2020 Initial ThreadX version of Cortex-M4/Green Hills port.
Copyright(c) 1996-2020 Microsoft Corporation
diff --git a/ports/cortex_m4/ghs/src/tx_el.c b/ports/cortex_m4/ghs/src/tx_el.c
index fd58768f..b5d3b8b7 100644
--- a/ports/cortex_m4/ghs/src/tx_el.c
+++ b/ports/cortex_m4/ghs/src/tx_el.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** ThreadX/GHS Event Log (EL) */
/** */
@@ -49,44 +50,38 @@ extern TX_THREAD *_tx_thread_current_ptr;
UINT _tx_thread_interrupt_control(UINT new_posture);
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_initialize PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_initialize PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function creates the Event Log (in the format dictated by the */
-/* GHS Event Analyzer) and sets up various information for subsequent */
-/* operation. The start and end of the Event Log is determined by the */
-/* .eventlog section in the linker control file. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function creates the Event Log (in the format dictated by the */
+/* GHS Event Analyzer) and sets up various information for subsequent */
+/* operation. The start and end of the Event Log is determined by the */
+/* .eventlog section in the linker control file. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
/* */
/**************************************************************************/
VOID _tx_el_initialize(VOID)
@@ -150,7 +145,7 @@ UINT i;
/* Setup event_ptr (pointer to oldest event) field to the start
of the event pool. */
- *_tx_el_current_event = (UCHAR *) (((ULONG) __ghsbegin_eventlog) + TX_EL_HEADER_SIZE +
+ *_tx_el_current_event = (UCHAR *) (((ULONG) __ghsbegin_eventlog) + TX_EL_HEADER_SIZE +
(TX_EL_TNIS * TX_EL_TNI_ENTRY_SIZE));
work_ptr = work_ptr + sizeof(ULONG);
@@ -166,17 +161,17 @@ UINT i;
/* Clear the entire TNI array, this is the initial setting. */
end_ptr = work_ptr + (TX_EL_TNIS * TX_EL_TNI_ENTRY_SIZE);
memset((void *)work_ptr, 0, (TX_EL_TNIS * TX_EL_TNI_ENTRY_SIZE));
- work_ptr = end_ptr;
+ work_ptr = end_ptr;
/* At this point, we are pointing at the actual Event Entry area. */
-
+
/* Remember the start of the actual event log area. */
_tx_el_event_area_start = work_ptr;
/* Clear the entire Event area. */
end_ptr = work_ptr + event_log_size;
memset((void *)work_ptr, 0, event_log_size);
- work_ptr = end_ptr;
+ work_ptr = end_ptr;
/* Save the end pointer for later use. */
_tx_el_event_area_end = work_ptr;
@@ -201,7 +196,7 @@ UINT i;
{
/* Yes, insert a NULL into the event log string. */
- *work_ptr = (unsigned char) 0;
+ *work_ptr = (unsigned char) 0;
}
/* Setup the thread ID to NULL. */
@@ -216,40 +211,40 @@ UINT i;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_thread_register PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_thread_register PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function registers a thread in the event log for future */
+/* */
+/* This function registers a thread in the event log for future */
/* display purposes. */
-/* */
-/* INPUT */
-/* */
-/* thread_ptr Pointer to thread control block */
-/* */
-/* OUTPUT */
-/* */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread control block */
+/* */
+/* OUTPUT */
+/* */
/* TX_SUCCESS Thread was placed in TNI area */
/* TX_ERROR No more room in the TNI area */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_thread_create ThreadX thread create function */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_thread_create ThreadX thread create function */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -278,7 +273,7 @@ UINT i;
i++;
entry_ptr = entry_ptr + TX_EL_TNI_ENTRY_SIZE;
}
-
+
/* Check to see if there were no more valid entries. */
if (i >= TX_EL_TNIS)
return(TX_EL_NO_MORE_TNI_ROOM);
@@ -304,7 +299,7 @@ UINT i;
{
/* Yes, insert a NULL into the event log string. */
- *work_ptr = (unsigned char) 0;
+ *work_ptr = (unsigned char) 0;
}
/* Setup the thread ID. */
@@ -321,40 +316,40 @@ UINT i;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_thread_unregister PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_thread_unregister PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function unregisters a thread in the event log for future */
+/* */
+/* This function unregisters a thread in the event log for future */
/* display purposes. */
-/* */
-/* INPUT */
-/* */
-/* thread_ptr Pointer to thread control block */
-/* */
-/* OUTPUT */
-/* */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread control block */
+/* */
+/* OUTPUT */
+/* */
/* TX_SUCCESS Thread was placed in TNI area */
/* TX_ERROR No more room in the TNI area */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_thread_create ThreadX thread create function */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_thread_create ThreadX thread create function */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -394,7 +389,7 @@ UINT i, j;
}
else if (*work_ptr == 0)
{
-
+
/* Null terminated, just break the loop. */
break;
}
@@ -426,7 +421,7 @@ UINT i, j;
i++;
entry_ptr = entry_ptr + TX_EL_TNI_ENTRY_SIZE;
}
-
+
/* Determine status to return. */
if (found)
return(TX_SUCCESS);
@@ -435,49 +430,49 @@ UINT i, j;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_user_event_insert PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_user_event_insert PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function inserts a user event into the event log. */
-/* If the event log is full, the oldest event is overwritten. */
-/* */
-/* INPUT */
-/* */
+/* If the event log is full, the oldest event is overwritten. */
+/* */
+/* INPUT */
+/* */
/* sub_type Event subtype for kernel call */
/* info_1 First information field */
/* info_2 Second information field */
/* info_3 Third information field */
/* info_4 Fourth information field */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* ThreadX services */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* ThreadX services */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* */
/**************************************************************************/
-VOID _tx_el_user_event_insert(UINT sub_type, ULONG info_1, ULONG info_2,
+VOID _tx_el_user_event_insert(UINT sub_type, ULONG info_1, ULONG info_2,
ULONG info_3, ULONG info_4)
{
@@ -545,7 +540,7 @@ UCHAR *entry_ptr;
if (entry_ptr >= _tx_el_event_area_end)
{
- /* Yes, we have wrapped around to the end of the event area.
+ /* Yes, we have wrapped around to the end of the event area.
Start back at the top! */
entry_ptr = _tx_el_event_area_start;
}
@@ -558,41 +553,41 @@ UCHAR *entry_ptr;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_thread_running PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_thread_running PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function inserts a thread change event into the event */
/* log, which indicates that a context switch is taking place. */
/* If the event log is full, the oldest event is overwritten. */
-/* */
-/* INPUT */
-/* */
+/* */
+/* INPUT */
+/* */
/* thread_ptr Pointer to thread being */
/* scheduled */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_thread_schedule ThreadX scheduler */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_thread_schedule ThreadX scheduler */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -604,7 +599,7 @@ VOID _tx_el_thread_running(TX_THREAD *thread_ptr)
UINT upper_tb;
UCHAR *entry_ptr;
- TX_EL_NO_STATUS_EVENTS
+ TX_EL_NO_STATUS_EVENTS
/* Increment total event counter. */
_tx_el_total_events++;
@@ -646,7 +641,7 @@ UCHAR *entry_ptr;
if (entry_ptr >= _tx_el_event_area_end)
{
- /* Yes, we have wrapped around to the end of the event area.
+ /* Yes, we have wrapped around to the end of the event area.
Start back at the top! */
entry_ptr = _tx_el_event_area_start;
}
@@ -658,43 +653,43 @@ UCHAR *entry_ptr;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_thread_preempted PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_thread_preempted PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function inserts a thread preempted event into the event */
/* log, which indicates that an interrupt occurred that made a higher */
/* priority thread ready for execution. In this case, the previously */
/* executing thread has an event entered to indicate it is no longer */
/* running. */
-/* */
-/* INPUT */
-/* */
+/* */
+/* INPUT */
+/* */
/* thread_ptr Pointer to thread being */
/* scheduled */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_thread_context_restore ThreadX context restore */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_thread_context_restore ThreadX context restore */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -707,7 +702,7 @@ UINT upper_tb;
UCHAR *entry_ptr;
- TX_EL_NO_STATUS_EVENTS
+ TX_EL_NO_STATUS_EVENTS
/* Increment total event counter. */
_tx_el_total_events++;
@@ -749,7 +744,7 @@ UCHAR *entry_ptr;
if (entry_ptr >= _tx_el_event_area_end)
{
- /* Yes, we have wrapped around to the end of the event area.
+ /* Yes, we have wrapped around to the end of the event area.
Start back at the top! */
entry_ptr = _tx_el_event_area_start;
}
@@ -761,40 +756,40 @@ UCHAR *entry_ptr;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_interrupt PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_interrupt PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function inserts an interrupt event into the log, which */
/* indicates the start of interrupt processing for the specific */
-/* */
-/* INPUT */
-/* */
+/* */
+/* INPUT */
+/* */
/* interrupt_number Interrupt number supplied by */
/* ISR */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* ISR processing */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* ISR processing */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -807,7 +802,7 @@ UINT upper_tb;
UCHAR *entry_ptr;
- TX_EL_NO_INTERRUPT_EVENTS
+ TX_EL_NO_INTERRUPT_EVENTS
/* Increment total event counter. */
_tx_el_total_events++;
@@ -853,7 +848,7 @@ UCHAR *entry_ptr;
if (entry_ptr >= _tx_el_event_area_end)
{
- /* Yes, we have wrapped around to the end of the event area.
+ /* Yes, we have wrapped around to the end of the event area.
Start back at the top! */
entry_ptr = _tx_el_event_area_start;
}
@@ -865,40 +860,40 @@ UCHAR *entry_ptr;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_interrupt_end PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_interrupt_end PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function inserts an interrupt end event into the log, which */
/* indicates the end of interrupt processing for the specific */
-/* */
-/* INPUT */
-/* */
+/* */
+/* INPUT */
+/* */
/* interrupt_number Interrupt number supplied by */
/* ISR */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* ISR processing */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* ISR processing */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -911,7 +906,7 @@ UINT upper_tb;
UCHAR *entry_ptr;
- TX_EL_NO_INTERRUPT_EVENTS
+ TX_EL_NO_INTERRUPT_EVENTS
/* Increment total event counter. */
_tx_el_total_events++;
@@ -957,7 +952,7 @@ UCHAR *entry_ptr;
if (entry_ptr >= _tx_el_event_area_end)
{
- /* Yes, we have wrapped around to the end of the event area.
+ /* Yes, we have wrapped around to the end of the event area.
Start back at the top! */
entry_ptr = _tx_el_event_area_start;
}
@@ -969,39 +964,39 @@ UCHAR *entry_ptr;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_interrupt_control PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_interrupt_control PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function remaps the tx_interrupt_control service call so that */
-/* it can be tracked in the event log. */
-/* */
-/* INPUT */
-/* */
+/* */
+/* This function remaps the tx_interrupt_control service call so that */
+/* it can be tracked in the event log. */
+/* */
+/* INPUT */
+/* */
/* new_posture New interrupt posture */
/* */
-/* OUTPUT */
-/* */
-/* old_posture Old interrupt posture */
-/* */
-/* CALLS */
-/* */
-/* _tx_thread_interrupt_control Interrupt control service */
-/* */
-/* CALLED BY */
-/* */
-/* ThreadX services */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* old_posture Old interrupt posture */
+/* */
+/* CALLS */
+/* */
+/* _tx_thread_interrupt_control Interrupt control service */
+/* */
+/* CALLED BY */
+/* */
+/* ThreadX services */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -1014,7 +1009,7 @@ TX_INTERRUPT_SAVE_AREA
UINT old_posture;
- TX_EL_NO_INTERRUPT_EVENTS
+ TX_EL_NO_INTERRUPT_EVENTS
TX_DISABLE
TX_EL_KERNEL_CALL_EVENT_INSERT_INFO2(TX_EL_INTERRUPT_CONTROL, _tx_thread_current_ptr, new_posture)
@@ -1027,38 +1022,38 @@ UINT old_posture;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_event_log_on PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_event_log_on PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function disables all event filters. */
-/* */
-/* INPUT */
-/* */
-/* None */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application code */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* This function disables all event filters. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application code */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -1072,39 +1067,39 @@ VOID _tx_el_event_log_on(void)
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_event_log_off PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_event_log_off PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function sets all event filters, thereby turning event */
-/* logging off. */
-/* */
-/* INPUT */
-/* */
-/* None */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application code */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* This function sets all event filters, thereby turning event */
+/* logging off. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application code */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -1118,38 +1113,38 @@ VOID _tx_el_event_log_off(void)
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_event_log_set PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_event_log_set PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function sets the events filters specified by the user. */
-/* */
-/* INPUT */
-/* */
-/* filter Events to filter */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application code */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* This function sets the events filters specified by the user. */
+/* */
+/* INPUT */
+/* */
+/* filter Events to filter */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application code */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
diff --git a/ports/cortex_m4/ghs/src/tx_ghs.c b/ports/cortex_m4/ghs/src/tx_ghs.c
index 0be9d715..30b8054e 100644
--- a/ports/cortex_m4/ghs/src/tx_ghs.c
+++ b/ports/cortex_m4/ghs/src/tx_ghs.c
@@ -55,7 +55,7 @@ extern TX_THREAD *_tx_thread_current_ptr;
If you customize the System Library, you should remove ind_thrd.c
from the libsys.gpj subproject.
-
+
*/
/* Provide global __eh_globals value to support C++ exception handling
diff --git a/ports/cortex_m4/ghs/src/tx_thread_context_restore.arm b/ports/cortex_m4/ghs/src/tx_thread_context_restore.arm
index 4a15e661..90064083 100644
--- a/ports/cortex_m4/ghs/src/tx_thread_context_restore.arm
+++ b/ports/cortex_m4/ghs/src/tx_thread_context_restore.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
diff --git a/ports/cortex_m4/ghs/src/tx_thread_context_save.arm b/ports/cortex_m4/ghs/src/tx_thread_context_save.arm
index 4ee07714..284e9ac6 100644
--- a/ports/cortex_m4/ghs/src/tx_thread_context_save.arm
+++ b/ports/cortex_m4/ghs/src/tx_thread_context_save.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
diff --git a/ports/cortex_m4/ghs/src/tx_thread_interrupt_control.arm b/ports/cortex_m4/ghs/src/tx_thread_interrupt_control.arm
index 62d2391f..b7cfe4fc 100644
--- a/ports/cortex_m4/ghs/src/tx_thread_interrupt_control.arm
+++ b/ports/cortex_m4/ghs/src/tx_thread_interrupt_control.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
diff --git a/ports/cortex_m4/ghs/src/tx_thread_interrupt_disable.arm b/ports/cortex_m4/ghs/src/tx_thread_interrupt_disable.arm
index 57292d50..06a571d3 100644
--- a/ports/cortex_m4/ghs/src/tx_thread_interrupt_disable.arm
+++ b/ports/cortex_m4/ghs/src/tx_thread_interrupt_disable.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -81,4 +81,4 @@ _tx_thread_interrupt_disable:
;
;}
.type _tx_thread_interrupt_disable,$function
- .size _tx_thread_interrupt_disable,.-_tx_thread_interrupt_disable
+ .size _tx_thread_interrupt_disable,.-_tx_thread_interrupt_disable
diff --git a/ports/cortex_m4/ghs/src/tx_thread_interrupt_restore.arm b/ports/cortex_m4/ghs/src/tx_thread_interrupt_restore.arm
index 8b38ea80..12a1307a 100644
--- a/ports/cortex_m4/ghs/src/tx_thread_interrupt_restore.arm
+++ b/ports/cortex_m4/ghs/src/tx_thread_interrupt_restore.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -72,4 +72,4 @@ _tx_thread_interrupt_restore:
;
;}
.type _tx_thread_interrupt_restore,$function
- .size _tx_thread_interrupt_restore,.-_tx_thread_interrupt_restore
+ .size _tx_thread_interrupt_restore,.-_tx_thread_interrupt_restore
diff --git a/ports/cortex_m4/ghs/src/tx_thread_schedule.arm b/ports/cortex_m4/ghs/src/tx_thread_schedule.arm
index efc8f667..dc15054a 100644
--- a/ports/cortex_m4/ghs/src/tx_thread_schedule.arm
+++ b/ports/cortex_m4/ghs/src/tx_thread_schedule.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -85,7 +85,7 @@ _tx_thread_schedule:
;
#ifdef __VFP__
MRS r0, CONTROL ; Pickup current CONTROL register
- BIC r0, r0, #4 ; Clear the FPCA bit
+ BIC r0, r0, #4 ; Clear the FPCA bit
MSR CONTROL, r0 ; Setup new CONTROL register
#endif
;
@@ -118,8 +118,8 @@ PendSV_Handler:
__tx_PendSVHandler:
;
; /* Get current thread value and new thread pointer. */
-;
-__tx_ts_handler:
+;
+__tx_ts_handler:
#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
;
@@ -137,7 +137,7 @@ __tx_ts_handler:
LDR r1, [r0] ; Pickup current thread pointer
;
; /* Determine if there is a current thread to finish preserving. */
-;
+;
CBZ r1, __tx_ts_new ; If NULL, skip preservation
;
; /* Recover PSP and preserve current thread context. */
@@ -212,7 +212,7 @@ __tx_ts_restore:
LDR.W LR, [r12], #4 ; Pickup LR
#ifdef __VFP__
TST LR, #0x10 ; Determine if the VFP extended frame is present
- BNE _skip_vfp_restore ; If not, skip VFP restore
+ BNE _skip_vfp_restore ; If not, skip VFP restore
VLDMIA r12!, {s16-s31} ; Yes, restore additional VFP registers
_skip_vfp_restore:
#endif
@@ -224,7 +224,7 @@ _skip_vfp_restore:
BX lr ; Return to thread!
;
; /* The following is the idle wait processing... in this case, no threads are ready for execution and the
-; system will simply be idle until an interrupt occurs that makes a thread ready. Note that interrupts
+; system will simply be idle until an interrupt occurs that makes a thread ready. Note that interrupts
; are disabled to allow use of WFI for waiting for a thread to arrive. */
;
__tx_ts_wait:
@@ -254,13 +254,13 @@ __tx_ts_wait:
CPSIE i ; Enable interrupts
B __tx_ts_wait ; Loop to continue waiting
;
-; /* At this point, we have a new thread ready to go. Clear any newly pended PendSV - since we are
+; /* At this point, we have a new thread ready to go. Clear any newly pended PendSV - since we are
; already in the handler! */
;
__tx_ts_ready:
MOV r7, #0x08000000 ; Build clear PendSV value
MOV r8, #0xE000E000 ; Build base NVIC address
- STR r7, [r8, #0xD04] ; Clear any PendSV
+ STR r7, [r8, #0xD04] ; Clear any PendSV
;
; /* Re-enable interrupts and restore new thread. */
;
@@ -269,14 +269,14 @@ __tx_ts_ready:
;}
;
.type __tx_PendSVHandler,$function
- .size __tx_PendSVHandler,.-__tx_PendSVHandler
+ .size __tx_PendSVHandler,.-__tx_PendSVHandler
#ifdef __VFP__
.globl tx_thread_fpu_enable
tx_thread_fpu_enable:
;
-; /* Automatic VPF logic is supported, this function is present only for
+; /* Automatic VPF logic is supported, this function is present only for
; backward compatibility purposes and therefore simply returns. */
;
BX LR ; Return to caller
@@ -287,12 +287,12 @@ tx_thread_fpu_enable:
.global tx_thread_fpu_disable
tx_thread_fpu_disable:
;
-; /* Automatic VPF logic is supported, this function is present only for
+; /* Automatic VPF logic is supported, this function is present only for
; backward compatibility purposes and therefore simply returns. */
;
BX LR ; Return to caller
.type tx_thread_fpu_disable,$function
- .size tx_thread_fpu_disable,.-tx_thread_fpu_disable
+ .size tx_thread_fpu_disable,.-tx_thread_fpu_disable
#endif
diff --git a/ports/cortex_m4/ghs/src/tx_thread_stack_build.arm b/ports/cortex_m4/ghs/src/tx_thread_stack_build.arm
index 39bdec1f..9b0646ea 100644
--- a/ports/cortex_m4/ghs/src/tx_thread_stack_build.arm
+++ b/ports/cortex_m4/ghs/src/tx_thread_stack_build.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
diff --git a/ports/cortex_m4/ghs/src/tx_thread_system_return.arm b/ports/cortex_m4/ghs/src/tx_thread_system_return.arm
index e579fb4d..8971e409 100644
--- a/ports/cortex_m4/ghs/src/tx_thread_system_return.arm
+++ b/ports/cortex_m4/ghs/src/tx_thread_system_return.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -80,7 +80,7 @@ _tx_thread_system_return:
CPSIE i ; Enable interrupts
MSR PRIMASK, r1 ; Restore original interrupt posture
_isr_context:
- BX lr ; Return to caller
+ BX lr ; Return to caller
;}
.type _tx_thread_system_return,$function
.size _tx_thread_system_return,.-_tx_thread_system_return
diff --git a/ports/cortex_m4/ghs/src/tx_timer_interrupt.arm b/ports/cortex_m4/ghs/src/tx_timer_interrupt.arm
index 8b67b4d7..97613d88 100644
--- a/ports/cortex_m4/ghs/src/tx_timer_interrupt.arm
+++ b/ports/cortex_m4/ghs/src/tx_timer_interrupt.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -83,7 +83,7 @@ _tx_timer_interrupt:
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CBZ r2, __tx_timer_no_time_slice ; Is it non-active?
; Yes, skip time-slice processing
@@ -200,13 +200,13 @@ __tx_timer_dont_activate:
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CBZ r2, __tx_timer_not_ts_expiration ; See if the flag is set
; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
LDR r0, =_tx_thread_preempt_disable ; Build address of preempt disable flag
diff --git a/ports/cortex_m4/gnu/example_build/cortexm4_crt0.S b/ports/cortex_m4/gnu/example_build/cortexm4_crt0.S
index bb530ac5..070871a3 100644
--- a/ports/cortex_m4/gnu/example_build/cortexm4_crt0.S
+++ b/ports/cortex_m4/gnu/example_build/cortexm4_crt0.S
@@ -63,7 +63,7 @@ crt0_ctor_loop:
beq crt0_ctor_end
ldr r2, [r0]
add r0, #4
- push {r0-r1}
+ push {r0-r1}
blx r2
pop {r0-r1}
b crt0_ctor_loop
@@ -83,7 +83,7 @@ start:
/* when main returns, loop forever. */
crt0_exit_loop:
b crt0_exit_loop
-
+
/* Startup helper functions. */
@@ -116,4 +116,3 @@ memory_set_done:
.section .stack, "wa", %nobits
.section .stack_process, "wa", %nobits
.section .heap, "wa", %nobits
-
\ No newline at end of file
diff --git a/ports/cortex_m4/gnu/example_build/cortexm4_vectors.S b/ports/cortex_m4/gnu/example_build/cortexm4_vectors.S
index 6ae558e4..dc8d0aad 100644
--- a/ports/cortex_m4/gnu/example_build/cortexm4_vectors.S
+++ b/ports/cortex_m4/gnu/example_build/cortexm4_vectors.S
@@ -4,8 +4,8 @@
.global __tx_BadHandler
.global __tx_SVCallHandler
.global __tx_DBGHandler
- .global __tx_PendSVHandler
- .global __tx_SysTickHandler
+ .global __tx_PendSVHandler
+ .global __tx_SysTickHandler
.global __tx_BadHandler
.syntax unified
@@ -15,9 +15,9 @@
.global _vectors
_vectors:
- .word __stack_end__
- .word reset_handler
- .word __tx_NMIHandler
+ .word __stack_end__
+ .word reset_handler
+ .word __tx_NMIHandler
.word __tx_HardfaultHandler
.word __tx_BadHandler
.word __tx_BadHandler
@@ -29,7 +29,7 @@ _vectors:
.word __tx_SVCallHandler //_SVC_Handler - used by Threadx scheduler //
.word __tx_DBGHandler
.word 0 // Reserved
- .word __tx_PendSVHandler
+ .word __tx_PendSVHandler
.word __tx_SysTickHandler // Used by Threadx timer functionality
.word __tx_BadHandler // Populate with user Interrupt handler
.word __tx_BadHandler
diff --git a/ports/cortex_m4/gnu/example_build/sample_threadx.c b/ports/cortex_m4/gnu/example_build/sample_threadx.c
index 597f373c..13ffadba 100644
--- a/ports/cortex_m4/gnu/example_build/sample_threadx.c
+++ b/ports/cortex_m4/gnu/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -81,42 +81,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -124,23 +124,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -243,11 +243,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -306,7 +306,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -359,7 +359,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m4/gnu/example_build/sample_threadx.ld b/ports/cortex_m4/gnu/example_build/sample_threadx.ld
index c65a1346..3f19c29e 100644
--- a/ports/cortex_m4/gnu/example_build/sample_threadx.ld
+++ b/ports/cortex_m4/gnu/example_build/sample_threadx.ld
@@ -10,7 +10,7 @@ __HEAPSIZE__ = 128;
SECTIONS
{
- .vectors :
+ .vectors :
{
KEEP(*(.vectors .vectors.*))
} > FLASH
@@ -45,7 +45,7 @@ SECTIONS
KEEP(*(.eh_frame*))
} > FLASH
- .ARM.extab :
+ .ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > FLASH
@@ -59,7 +59,7 @@ SECTIONS
__data_load_start__ = ALIGN (4);
- .data : AT (__data_load_start__)
+ .data : AT (__data_load_start__)
{
__data_start__ = .;
@@ -89,7 +89,7 @@ SECTIONS
KEEP(*(.jcr*))
. = ALIGN(4);
/* All data end */
-
+
__data_end__ = .;
} > RAM
@@ -104,7 +104,7 @@ SECTIONS
__bss_end__ = .;
} > RAM
-
+
.heap (COPY):
{
__heap_start__ = ALIGN(4);
diff --git a/ports/cortex_m4/gnu/example_build/tx_initialize_low_level.S b/ports/cortex_m4/gnu/example_build/tx_initialize_low_level.S
index d7e11c06..4c7a6223 100644
--- a/ports/cortex_m4/gnu/example_build/tx_initialize_low_level.S
+++ b/ports/cortex_m4/gnu/example_build/tx_initialize_low_level.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -77,16 +77,6 @@ SYSTICK_CYCLES = ((SYSTEM_CLOCK / 100) -1)
@/* */
@/* _tx_initialize_kernel_enter ThreadX entry function */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-@/* 09-30-2020 William E. Lamie Modified Comment(s), fixed */
-@/* GNU assembly comment, */
-@/* cleaned up whitespace, */
-@/* resulting in version 6.1 */
-@/* */
@/**************************************************************************/
@VOID _tx_initialize_low_level(VOID)
@{
diff --git a/ports/cortex_m4/gnu/inc/tx_port.h b/ports/cortex_m4/gnu/inc/tx_port.h
index ac2af455..7c2b04c5 100644
--- a/ports/cortex_m4/gnu/inc/tx_port.h
+++ b/ports/cortex_m4/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,23 +46,6 @@
/* This file replaces the previous Cortex-M3/M4/M7 files. It unifies */
/* the ARMv7-M architecture and compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comments, updated */
-/* typedef to fix misra */
-/* violation, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -371,7 +355,7 @@ void _tx_vfp_access(void);
/* A thread can be terminated by another thread, so we first check if it's self-terminating and not in an ISR.
If so, deactivate the FPU via CONTROL.FPCA. Otherwise we are in an interrupt or another thread is terminating
- this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
+ this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
the lazy FPU save, then restore the CONTROL.FPCA state. */
#ifndef TX_MISRA_ENABLE
@@ -530,7 +514,7 @@ ULONG _tx_misra_ipsr_get(VOID);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) (b) = (UINT) __clz(__rbit((m)));
#elif defined(__GNUC__) /* GCC and AC6 Compiler */
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) __asm__ volatile (" RBIT %0,%1 ": "=r" (m) : "r" (m) ); \
- __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
+ __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
#endif
@@ -715,7 +699,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M4/GNU Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M4/GNU Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m4/gnu/readme_threadx.txt b/ports/cortex_m4/gnu/readme_threadx.txt
index d9063d65..58181f85 100644
--- a/ports/cortex_m4/gnu/readme_threadx.txt
+++ b/ports/cortex_m4/gnu/readme_threadx.txt
@@ -5,15 +5,15 @@
1. Building the ThreadX run-time Library
-Navigate to the "example_build" directory. Ensure that
-you have setup your path and other environment variables necessary for the ARM
-GNU compiler. At this point you may run the build_threadx.bat batch file.
-This will build the ThreadX run-time environment in the "example_build"
-directory.
+Navigate to the "example_build" directory. Ensure that
+you have setup your path and other environment variables necessary for the ARM
+GNU compiler. At this point you may run the build_threadx.bat batch file.
+This will build the ThreadX run-time environment in the "example_build"
+directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
@@ -22,25 +22,25 @@ application in order to use ThreadX.
The ThreadX demonstration is designed to execute on Cortex-M evaluation boards
or on a dedicated simulator.
-Building the demonstration is easy, simply execute the build_threadx_sample.bat
+Building the demonstration is easy, simply execute the build_threadx_sample.bat
batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.out is a binary
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.out is a binary
file that can be downloaded and executed on the a simulator, or downloaded to a board.
3. System Initialization
-The entry point in ThreadX for the Cortex-M using gnu tools uses the standard GNU
+The entry point in ThreadX for the Cortex-M using gnu tools uses the standard GNU
Cortex-M reset sequence. From the reset vector the C runtime will be initialized.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.S file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -49,7 +49,7 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -132,34 +132,34 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-The distribution version of ThreadX is built without any compiler optimizations.
-This makes it easy to debug because you can trace or set breakpoints inside of
-ThreadX itself. Of course, this costs some performance. To make it run faster,
-you can change the build_threadx.bat file to remove the -g option and enable
-all compiler optimizations.
+The distribution version of ThreadX is built without any compiler optimizations.
+This makes it easy to debug because you can trace or set breakpoints inside of
+ThreadX itself. Of course, this costs some performance. To make it run faster,
+you can change the build_threadx.bat file to remove the -g option and enable
+all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
6.1 Vector Area
The Cortex-M vectors start at the label __tx_vectors or similar. The application may modify
-the vector area according to its needs. There is code in tx_initialize_low_level() that will
-configure the vector base register.
+the vector area according to its needs. There is code in tx_initialize_low_level() that will
+configure the vector base register.
6.2 Managed Interrupts
-A ThreadX managed interrupt is defined below. By following these conventions, the
+A ThreadX managed interrupt is defined below. By following these conventions, the
application ISR is then allowed access to various ThreadX services from the ISR.
Here is the standard template for managed ISRs in ThreadX:
@@ -181,15 +181,15 @@ __tx_IntHandler:
Note: the Cortex-M requires exception handlers to be thumb labels, this implies bit 0 set.
To accomplish this, the declaration of the label has to be preceded by the assembler directive
-.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
-be inserted in the correct location in the interrupt vector table. This table is typically
+.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
+be inserted in the correct location in the interrupt vector table. This table is typically
located in either your runtime startup file or in the tx_initialize_low_level.S file.
7. FPU Support
-ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context - no additional setup by the application.
diff --git a/ports/cortex_m4/gnu/src/tx_misra.S b/ports/cortex_m4/gnu/src/tx_misra.S
index 8ac0c629..10548671 100644
--- a/ports/cortex_m4/gnu/src/tx_misra.S
+++ b/ports/cortex_m4/gnu/src/tx_misra.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -667,7 +668,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -682,7 +683,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARM_FP
/***********************************************************************************************/
@@ -699,8 +700,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -714,9 +715,9 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
+
.data
.word 0
diff --git a/ports/cortex_m4/gnu/src/tx_thread_context_restore.S b/ports/cortex_m4/gnu/src/tx_thread_context_restore.S
index af374956..85b1ee2a 100644
--- a/ports/cortex_m4/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_m4/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m4/gnu/src/tx_thread_context_save.S b/ports/cortex_m4/gnu/src/tx_thread_context_save.S
index 0728d86e..9c0f547a 100644
--- a/ports/cortex_m4/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_m4/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m4/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_m4/gnu/src/tx_thread_interrupt_control.S
index 38790a85..55791677 100644
--- a/ports/cortex_m4/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_m4/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m4/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_m4/gnu/src/tx_thread_interrupt_disable.S
index e0ae359a..56c4c4bc 100644
--- a/ports/cortex_m4/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_m4/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m4/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_m4/gnu/src/tx_thread_interrupt_restore.S
index 32839c40..9d2ba7b0 100644
--- a/ports/cortex_m4/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_m4/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m4/gnu/src/tx_thread_schedule.S b/ports/cortex_m4/gnu/src/tx_thread_schedule.S
index 8b283009..5b6fb534 100644
--- a/ports/cortex_m4/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_m4/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,18 +69,6 @@
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Fixed predefined macro name, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
diff --git a/ports/cortex_m4/gnu/src/tx_thread_stack_build.S b/ports/cortex_m4/gnu/src/tx_thread_stack_build.S
index c62ccf30..0b26d993 100644
--- a/ports/cortex_m4/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_m4/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m4/gnu/src/tx_thread_system_return.S b/ports/cortex_m4/gnu/src/tx_thread_system_return.S
index 234a2121..8c4a09fd 100644
--- a/ports/cortex_m4/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_m4/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m4/gnu/src/tx_timer_interrupt.S b/ports/cortex_m4/gnu/src/tx_timer_interrupt.S
index 4d0c8003..6a14a673 100644
--- a/ports/cortex_m4/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_m4/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,17 +71,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comment(s), added */
-/* TX_NO_TIMER support, */
-/* resulting in version 6.1.10 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m4/iar/CMakeLists.txt b/ports/cortex_m4/iar/CMakeLists.txt
index a524d79f..57be3aeb 100644
--- a/ports/cortex_m4/iar/CMakeLists.txt
+++ b/ports/cortex_m4/iar/CMakeLists.txt
@@ -7,7 +7,7 @@ target_sources(${PROJECT_NAME}
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_save.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_control.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_disable.S
- ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_restore.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_restore.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_schedule.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_build.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_return.S
diff --git a/ports/cortex_m4/iar/example_build/cstartup_M.s b/ports/cortex_m4/iar/example_build/cstartup_M.s
index 75d9369b..d1c5aa3e 100644
--- a/ports/cortex_m4/iar/example_build/cstartup_M.s
+++ b/ports/cortex_m4/iar/example_build/cstartup_M.s
@@ -2,16 +2,16 @@
PUBLIC __vector_table
SECTION .text:CODE:REORDER(1)
-
+
;; Keep vector table even if it's not referenced
REQUIRE __vector_table
-
+
THUMB
-
+
;; Forward declaration of sections.
SECTION CSTACK:DATA:NOROOT(3)
SECTION .intvec:CODE:NOROOT(2)
-
+
DATA
__vector_table
diff --git a/ports/cortex_m4/iar/example_build/sample_threadx.c b/ports/cortex_m4/iar/example_build/sample_threadx.c
index 60f5a3d3..55b63731 100644
--- a/ports/cortex_m4/iar/example_build/sample_threadx.c
+++ b/ports/cortex_m4/iar/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. Please refer to Chapter 6 of the ThreadX User Guide for a complete
description of this demonstration. */
@@ -69,7 +69,7 @@ void thread_6_and_7_entry(ULONG thread_input);
int main()
{
-
+
/* Please refer to Chapter 6 of the ThreadX User Guide for a complete
description of this demonstration. */
@@ -101,41 +101,41 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -143,23 +143,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -262,11 +262,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -325,7 +325,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -378,7 +378,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m4/iar/example_build/tx_initialize_low_level.s b/ports/cortex_m4/iar/example_build/tx_initialize_low_level.s
index d3e6d9af..a84667c3 100644
--- a/ports/cortex_m4/iar/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_m4/iar/example_build/tx_initialize_low_level.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -73,12 +73,6 @@ __tx_free_memory_start
;/* */
;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
;{
diff --git a/ports/cortex_m4/iar/inc/tx_port.h b/ports/cortex_m4/iar/inc/tx_port.h
index f836d5af..1253befa 100644
--- a/ports/cortex_m4/iar/inc/tx_port.h
+++ b/ports/cortex_m4/iar/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,23 +46,6 @@
/* This file replaces the previous Cortex-M3/M4/M7 files. It unifies */
/* the ARMv7-M architecture and compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comments, updated */
-/* typedef to fix misra */
-/* violation, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -371,7 +355,7 @@ void _tx_vfp_access(void);
/* A thread can be terminated by another thread, so we first check if it's self-terminating and not in an ISR.
If so, deactivate the FPU via CONTROL.FPCA. Otherwise we are in an interrupt or another thread is terminating
- this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
+ this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
the lazy FPU save, then restore the CONTROL.FPCA state. */
#ifndef TX_MISRA_ENABLE
@@ -530,7 +514,7 @@ ULONG _tx_misra_ipsr_get(VOID);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) (b) = (UINT) __clz(__rbit((m)));
#elif defined(__GNUC__) /* GCC and AC6 Compiler */
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) __asm__ volatile (" RBIT %0,%1 ": "=r" (m) : "r" (m) ); \
- __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
+ __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
#endif
@@ -715,7 +699,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M4/IAR Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M4/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m4/iar/readme_threadx.txt b/ports/cortex_m4/iar/readme_threadx.txt
index 28b54e03..388c40e6 100644
--- a/ports/cortex_m4/iar/readme_threadx.txt
+++ b/ports/cortex_m4/iar/readme_threadx.txt
@@ -6,45 +6,45 @@
1. Building the ThreadX run-time Library
Building the ThreadX library is easy. First, open the Azure RTOS workspace
-azure_rtos.eww. Next, make the TX project the "active project" in the
-IAR Embedded Workbench and select the "Make" button. You should observe
-assembly and compilation of a series of ThreadX source files. This
-results in the ThreadX run-time library file tx.a, which is needed by
+azure_rtos.eww. Next, make the TX project the "active project" in the
+IAR Embedded Workbench and select the "Make" button. You should observe
+assembly and compilation of a series of ThreadX source files. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
2. Demonstration System
-The ThreadX demonstration is designed to execute under the IAR debugger under
+The ThreadX demonstration is designed to execute under the IAR debugger under
simulation.
Building the demonstration is easy; simply open the threadx.www workspace file,
-make the sample_threadx.ewp project the "active project" in the IAR Embedded
+make the sample_threadx.ewp project the "active project" in the IAR Embedded
Workbench, and select the "Make" button.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.out is a
-binary ELF file that can be downloaded and executed on the IAR Windows-based
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.out is a
+binary ELF file that can be downloaded and executed on the IAR Windows-based
Cortex-M simulator.
3. System Initialization
-The entry point in ThreadX for the Cortex-M using IAR tools is at label
-__iar_program_start. This is defined within the IAR compiler's startup code.
-In addition, this is where all static and global preset C variable
+The entry point in ThreadX for the Cortex-M using IAR tools is at label
+__iar_program_start. This is defined within the IAR compiler's startup code.
+In addition, this is where all static and global preset C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, and a periodic timer interrupt source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, and a periodic timer interrupt source.
By default, the vector area is defined at the top of cstartup_M.s, which is
-a slightly modified from the base IAR file.
+a slightly modified from the base IAR file.
The _tx_initialize_low_level function inside of tx_initialize_low_level.s
-also determines the first available address for use by the application, which
-is supplied as the sole input parameter to your application definition function,
-tx_application_define. To accomplish this, a section is created in
-tx_initialize_low_level.s called FREE_MEM, which must be located after all
+also determines the first available address for use by the application, which
+is supplied as the sole input parameter to your application definition function,
+tx_application_define. To accomplish this, a section is created in
+tx_initialize_low_level.s called FREE_MEM, which must be located after all
other RAM sections in memory.
@@ -53,7 +53,7 @@ other RAM sections in memory.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -136,20 +136,20 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
-The Cortex-M vectors start at the label __vector_table and is defined in cstartup_M.s.
+The Cortex-M vectors start at the label __vector_table and is defined in cstartup_M.s.
The application may modify the vector area according to its needs.
@@ -188,14 +188,14 @@ should have the following line added (if not already in place):
initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
-The project options "General Options -> Library Configuration" should also have the
+The project options "General Options -> Library Configuration" should also have the
"Enable thread support in library" box selected.
8. VFP Support
-ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context - no additional setup by the application.
diff --git a/ports/cortex_m4/iar/src/tx_iar.c b/ports/cortex_m4/iar/src/tx_iar.c
index c6092de3..238b485e 100644
--- a/ports/cortex_m4/iar/src/tx_iar.c
+++ b/ports/cortex_m4/iar/src/tx_iar.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,24 +423,24 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#include
+#include
void * __aeabi_read_tp();
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports/cortex_m4/iar/src/tx_misra.s b/ports/cortex_m4/iar/src/tx_misra.s
index f86d9a65..642bb89e 100644
--- a/ports/cortex_m4/iar/src/tx_misra.s
+++ b/ports/cortex_m4/iar/src/tx_misra.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -120,7 +121,7 @@
SECTION `.data`:DATA:REORDER:NOROOT(2)
DATA
-// 51 CHAR _tx_version_id[100] = "Copyright (c) 2024 Microsoft Corporation. * ThreadX 6.1 MISRA C Compliant *";
+// 51 CHAR _tx_version_id[100] = "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX 6.1 MISRA C Compliant *";
_tx_version_id:
DC8 43H, 6FH, 70H, 79H, 72H, 69H, 67H, 68H
DC8 74H, 20H, 28H, 63H, 29H, 20H, 31H, 39H
@@ -707,7 +708,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -722,7 +723,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARMVFP__
/***********************************************************************************************/
@@ -739,8 +740,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -754,10 +755,10 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
-
+
+
SECTION `.iar_vfe_header`:DATA:NOALLOC:NOROOT(2)
SECTION_TYPE SHT_PROGBITS, 0
DATA
diff --git a/ports/cortex_m4/iar/src/tx_thread_context_restore.s b/ports/cortex_m4/iar/src/tx_thread_context_restore.s
index ff4f11e0..d0033b5b 100644
--- a/ports/cortex_m4/iar/src/tx_thread_context_restore.s
+++ b/ports/cortex_m4/iar/src/tx_thread_context_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* CALLED BY */
/* */
/* ISRs Interrupt Service Routines */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m4/iar/src/tx_thread_context_save.s b/ports/cortex_m4/iar/src/tx_thread_context_save.s
index c26d32c5..f1291fec 100644
--- a/ports/cortex_m4/iar/src/tx_thread_context_save.s
+++ b/ports/cortex_m4/iar/src/tx_thread_context_save.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m4/iar/src/tx_thread_interrupt_control.s b/ports/cortex_m4/iar/src/tx_thread_interrupt_control.s
index b72bbad3..e0e028c8 100644
--- a/ports/cortex_m4/iar/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_m4/iar/src/tx_thread_interrupt_control.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m4/iar/src/tx_thread_interrupt_disable.s b/ports/cortex_m4/iar/src/tx_thread_interrupt_disable.s
index 4002679f..00dab2e2 100644
--- a/ports/cortex_m4/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_m4/iar/src/tx_thread_interrupt_disable.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m4/iar/src/tx_thread_interrupt_restore.s b/ports/cortex_m4/iar/src/tx_thread_interrupt_restore.s
index b9093f8a..cf834228 100644
--- a/ports/cortex_m4/iar/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_m4/iar/src/tx_thread_interrupt_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m4/iar/src/tx_thread_schedule.s b/ports/cortex_m4/iar/src/tx_thread_schedule.s
index 8feaf239..229fd5df 100644
--- a/ports/cortex_m4/iar/src/tx_thread_schedule.s
+++ b/ports/cortex_m4/iar/src/tx_thread_schedule.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,17 +68,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
diff --git a/ports/cortex_m4/iar/src/tx_thread_stack_build.s b/ports/cortex_m4/iar/src/tx_thread_stack_build.s
index 01213848..a80261c2 100644
--- a/ports/cortex_m4/iar/src/tx_thread_stack_build.s
+++ b/ports/cortex_m4/iar/src/tx_thread_stack_build.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* CALLED BY */
/* */
/* _tx_thread_create Create thread service */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m4/iar/src/tx_thread_system_return.s b/ports/cortex_m4/iar/src/tx_thread_system_return.s
index 3260e917..4f8b9870 100644
--- a/ports/cortex_m4/iar/src/tx_thread_system_return.s
+++ b/ports/cortex_m4/iar/src/tx_thread_system_return.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* CALLED BY */
/* */
/* ThreadX components */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m4/iar/src/tx_timer_interrupt.s b/ports/cortex_m4/iar/src/tx_timer_interrupt.s
index 72cc4f61..fbf9c2ab 100644
--- a/ports/cortex_m4/iar/src/tx_timer_interrupt.s
+++ b/ports/cortex_m4/iar/src/tx_timer_interrupt.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,18 +72,6 @@
/* CALLED BY */
/* */
/* interrupt vector */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comment(s), added */
-/* TX_NO_TIMER support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m4/keil/example_build/demo_threadx.c b/ports/cortex_m4/keil/example_build/demo_threadx.c
index 96c4eb5a..34453f42 100644
--- a/ports/cortex_m4/keil/example_build/demo_threadx.c
+++ b/ports/cortex_m4/keil/example_build/demo_threadx.c
@@ -77,35 +77,35 @@ void tx_application_define(void *first_unused_memory)
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- thread_0_stack, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ thread_0_stack, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- thread_1_stack, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ thread_1_stack, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- thread_2_stack, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ thread_2_stack, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- thread_3_stack, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ thread_3_stack, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- thread_4_stack, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ thread_4_stack, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- thread_5_stack, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ thread_5_stack, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Create the message queue shared by threads 1 and 2. */
@@ -189,11 +189,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -252,7 +252,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
diff --git a/ports/cortex_m4/keil/example_build/tx_initialize_low_level.s b/ports/cortex_m4/keil/example_build/tx_initialize_low_level.s
index e2aec801..58aee89c 100644
--- a/ports/cortex_m4/keil/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_m4/keil/example_build/tx_initialize_low_level.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -141,12 +141,6 @@ Reset_Handler
;/* */
;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
;{
diff --git a/ports/cortex_m4/keil/inc/tx_port.h b/ports/cortex_m4/keil/inc/tx_port.h
index b8c03fa3..f96d819e 100644
--- a/ports/cortex_m4/keil/inc/tx_port.h
+++ b/ports/cortex_m4/keil/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,23 +46,6 @@
/* This file replaces the previous Cortex-M3/M4/M7 files. It unifies */
/* the ARMv7-M architecture and compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comments, updated */
-/* typedef to fix misra */
-/* violation, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -371,7 +355,7 @@ void _tx_vfp_access(void);
/* A thread can be terminated by another thread, so we first check if it's self-terminating and not in an ISR.
If so, deactivate the FPU via CONTROL.FPCA. Otherwise we are in an interrupt or another thread is terminating
- this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
+ this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
the lazy FPU save, then restore the CONTROL.FPCA state. */
#ifndef TX_MISRA_ENABLE
@@ -530,7 +514,7 @@ ULONG _tx_misra_ipsr_get(VOID);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) (b) = (UINT) __clz(__rbit((m)));
#elif defined(__GNUC__) /* GCC and AC6 Compiler */
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) __asm__ volatile (" RBIT %0,%1 ": "=r" (m) : "r" (m) ); \
- __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
+ __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
#endif
@@ -715,7 +699,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M4/Keil Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M4/Keil Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m4/keil/readme_threadx.txt b/ports/cortex_m4/keil/readme_threadx.txt
index 12848341..e84f29c9 100644
--- a/ports/cortex_m4/keil/readme_threadx.txt
+++ b/ports/cortex_m4/keil/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M4
+ Microsoft's Azure RTOS ThreadX for Cortex-M4
Thumb & 32-bit Mode
@@ -6,44 +6,44 @@
1. Building the ThreadX run-time Library
-Building the ThreadX library is easy, simply load the project file
-ThreadX_Library.Uv2, which is located inside the "example_build" directory.
+Building the ThreadX library is easy, simply load the project file
+ThreadX_Library.Uv2, which is located inside the "example_build" directory.
Once the ThreadX library files are displayed in the project window,
select the "Build Target" operation and observe the compilation and assembly
-of the ThreadX library. This project build produces the ThreadX library
+of the ThreadX library. This project build produces the ThreadX library
file ThreadX_Library.lib.
2. Demonstration System
The ThreadX demonstration is designed to execute under the Keil debugger or
-Cortex-M4 hardware. This demonstration is slightly smaller than typical ThreadX
+Cortex-M4 hardware. This demonstration is slightly smaller than typical ThreadX
demonstrations, and thus requires less than 7KB of Flash and less than 4KB of RAM.
-Building the demonstration is easy; simply open the ThreadX demonstration
-project file ThreadX_Demo.Uv2, which is located inside the "example_build"
-directory.
+Building the demonstration is easy; simply open the ThreadX demonstration
+project file ThreadX_Demo.Uv2, which is located inside the "example_build"
+directory.
-Once open, select the "Build Target" operation and observe the compilation of
-sample_threadx.c (which is the demonstration application) and linking with
-ThreadX_Library.lib. The resulting file sample_threadx.axf is a binary file that
-can be downloaded and executed on Cortex-M4 hardware.
+Once open, select the "Build Target" operation and observe the compilation of
+sample_threadx.c (which is the demonstration application) and linking with
+ThreadX_Library.lib. The resulting file sample_threadx.axf is a binary file that
+can be downloaded and executed on Cortex-M4 hardware.
3. System Initialization
-The entry point in ThreadX for the Cortex-M4 using Keil tools is at label
-__main. This is defined within the Keil compiler's startup code. In
-addition, this is where all static and global pre-set C variable
+The entry point in ThreadX for the Cortex-M4 using Keil tools is at label
+__main. This is defined within the Keil compiler's startup code. In
+addition, this is where all static and global pre-set C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -52,7 +52,7 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M4 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -135,21 +135,21 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
-performance. To make it run faster, you can change the ThreadX_Library.Uv2
-project to debugging and enable all compiler optimizations.
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
+performance. To make it run faster, you can change the ThreadX_Library.Uv2
+project to debugging and enable all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M4
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
@@ -188,8 +188,8 @@ your_assembly_isr
7. FPU Support
-ThreadX for Cortex-M4 supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M4 supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context - no additional setup by the application.
diff --git a/ports/cortex_m4/keil/src/tx_thread_context_restore.s b/ports/cortex_m4/keil/src/tx_thread_context_restore.s
index dddaca7b..32a10e61 100644
--- a/ports/cortex_m4/keil/src/tx_thread_context_restore.s
+++ b/ports/cortex_m4/keil/src/tx_thread_context_restore.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -62,12 +62,6 @@
;/* */
;/* ISRs Interrupt Service Routines */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
;{
diff --git a/ports/cortex_m4/keil/src/tx_thread_context_save.s b/ports/cortex_m4/keil/src/tx_thread_context_save.s
index 207ab4b1..fd6dfcf6 100644
--- a/ports/cortex_m4/keil/src/tx_thread_context_save.s
+++ b/ports/cortex_m4/keil/src/tx_thread_context_save.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -61,12 +61,6 @@
;/* */
;/* ISRs */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
;{
diff --git a/ports/cortex_m4/keil/src/tx_thread_interrupt_control.s b/ports/cortex_m4/keil/src/tx_thread_interrupt_control.s
index 35367af7..e83f9abb 100644
--- a/ports/cortex_m4/keil/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_m4/keil/src/tx_thread_interrupt_control.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -52,12 +52,6 @@
;/* */
;/* Application Code */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
;{
diff --git a/ports/cortex_m4/keil/src/tx_thread_interrupt_disable.s b/ports/cortex_m4/keil/src/tx_thread_interrupt_disable.s
index 825eaf12..c64ce546 100644
--- a/ports/cortex_m4/keil/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_m4/keil/src/tx_thread_interrupt_disable.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -52,12 +52,6 @@
;/* */
;/* Application Code */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(UINT new_posture)
;{
diff --git a/ports/cortex_m4/keil/src/tx_thread_interrupt_restore.s b/ports/cortex_m4/keil/src/tx_thread_interrupt_restore.s
index 4cc24369..53d7ecb7 100644
--- a/ports/cortex_m4/keil/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_m4/keil/src/tx_thread_interrupt_restore.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -52,12 +52,6 @@
;/* */
;/* Application Code */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_interrupt_restore(UINT new_posture)
;{
diff --git a/ports/cortex_m4/keil/src/tx_thread_schedule.s b/ports/cortex_m4/keil/src/tx_thread_schedule.s
index d97cf136..eba721e7 100644
--- a/ports/cortex_m4/keil/src/tx_thread_schedule.s
+++ b/ports/cortex_m4/keil/src/tx_thread_schedule.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -71,15 +71,6 @@
;/* _tx_thread_system_return Return to system from thread */
;/* _tx_thread_context_restore Restore thread's context */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* 03-02-2021 Scott Larson Modified comment(s), add */
-;/* low power code, */
-;/* resulting in version 6.1.5 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
;{
diff --git a/ports/cortex_m4/keil/src/tx_thread_stack_build.s b/ports/cortex_m4/keil/src/tx_thread_stack_build.s
index f73651ce..1f72e52a 100644
--- a/ports/cortex_m4/keil/src/tx_thread_stack_build.s
+++ b/ports/cortex_m4/keil/src/tx_thread_stack_build.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -54,12 +54,6 @@
;/* */
;/* _tx_thread_create Create thread service */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
;{
diff --git a/ports/cortex_m4/keil/src/tx_thread_system_return.s b/ports/cortex_m4/keil/src/tx_thread_system_return.s
index 5ee774d9..dd666162 100644
--- a/ports/cortex_m4/keil/src/tx_thread_system_return.s
+++ b/ports/cortex_m4/keil/src/tx_thread_system_return.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -54,12 +54,6 @@
;/* */
;/* ThreadX components */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
;{
diff --git a/ports/cortex_m4/keil/src/tx_timer_interrupt.s b/ports/cortex_m4/keil/src/tx_timer_interrupt.s
index 240db972..7a7b0041 100644
--- a/ports/cortex_m4/keil/src/tx_timer_interrupt.s
+++ b/ports/cortex_m4/keil/src/tx_timer_interrupt.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -71,12 +71,6 @@
;/* */
;/* interrupt vector */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
;{
diff --git a/ports/cortex_m55/ac6/example_build/RTE/_ThreadX_Library_Project/RTE_Components.h b/ports/cortex_m55/ac6/example_build/RTE/_ThreadX_Library_Project/RTE_Components.h
index 2ec1c863..a5cd11d9 100644
--- a/ports/cortex_m55/ac6/example_build/RTE/_ThreadX_Library_Project/RTE_Components.h
+++ b/ports/cortex_m55/ac6/example_build/RTE/_ThreadX_Library_Project/RTE_Components.h
@@ -3,8 +3,8 @@
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
- * Project: 'ThreadX_Library'
- * Target: 'ThreadX_Library_Project'
+ * Project: 'ThreadX_Library'
+ * Target: 'ThreadX_Library_Project'
*/
#ifndef RTE_COMPONENTS_H
@@ -12,7 +12,7 @@
/*
- * Define the Device Header File:
+ * Define the Device Header File:
*/
#define CMSIS_device_header "ARMCM55.h"
diff --git a/ports/cortex_m55/ac6/example_build/demo_secure_zone/RTE/Device/SSE-300-MPS3/system_SSE300MPS3.c b/ports/cortex_m55/ac6/example_build/demo_secure_zone/RTE/Device/SSE-300-MPS3/system_SSE300MPS3.c
index ce3ad161..e54aa490 100644
--- a/ports/cortex_m55/ac6/example_build/demo_secure_zone/RTE/Device/SSE-300-MPS3/system_SSE300MPS3.c
+++ b/ports/cortex_m55/ac6/example_build/demo_secure_zone/RTE/Device/SSE-300-MPS3/system_SSE300MPS3.c
@@ -88,8 +88,8 @@ typedef struct /* see "Arm Cortex-Mxx Technical Reference Manual r0p1"
#define ITGU_BASE (0xE001E500UL) /* ITCM Gating Unit */
#define DTGU_BASE (0xE001E600UL) /* DTCM Gating Unit */
-#define ITGU ((TGU_TypeDef *) ITGU_BASE)
-#define DTGU ((TGU_TypeDef *) DTGU_BASE)
+#define ITGU ((TGU_TypeDef *) ITGU_BASE)
+#define DTGU ((TGU_TypeDef *) DTGU_BASE)
/*****************************************************************/
@@ -160,7 +160,7 @@ void SystemInit (void)
/* configure unsecure code area: ITCM 512K 0x00080000 - 0x00100000 */
// blk_cfg = ITGU->CFG & 0xF; /* = 0x7 */
- // blk_size = 1UL << (blk_cfg + 5U); /* = 0x1000 (4K) */
+ // blk_size = 1UL << (blk_cfg + 5U); /* = 0x1000 (4K) */
ITGU->LUT[4] = 0xFFFFFFFF;
ITGU->LUT[5] = 0xFFFFFFFF;
ITGU->LUT[6] = 0xFFFFFFFF;
@@ -168,7 +168,7 @@ void SystemInit (void)
/* configure unsecure data area: DTCM 512K 0x20080000 - 0x20100000 */
// blk_cfg = DTGU->CFG & 0xF; /* = 0x7 */
- // blk_size = 1UL << (blk_cfg + 5U); /* = 0x1000 (4K) */
+ // blk_size = 1UL << (blk_cfg + 5U); /* = 0x1000 (4K) */
DTGU->LUT[4] = 0xFFFFFFFF;
DTGU->LUT[5] = 0xFFFFFFFF;
DTGU->LUT[6] = 0xFFFFFFFF;
diff --git a/ports/cortex_m55/ac6/example_build/demo_secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h b/ports/cortex_m55/ac6/example_build/demo_secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
index c7f94da9..e2a867f3 100644
--- a/ports/cortex_m55/ac6/example_build/demo_secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
+++ b/ports/cortex_m55/ac6/example_build/demo_secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
@@ -3,8 +3,8 @@
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
- * Project: 'demo_secure_zone'
- * Target: 'FVP Simulation Model'
+ * Project: 'demo_secure_zone'
+ * Target: 'FVP Simulation Model'
*/
#ifndef RTE_COMPONENTS_H
@@ -12,7 +12,7 @@
/*
- * Define the Device Header File:
+ * Define the Device Header File:
*/
#define CMSIS_device_header "SSE300MPS3.h"
diff --git a/ports/cortex_m55/ac6/example_build/demo_secure_zone/interface.c b/ports/cortex_m55/ac6/example_build/demo_secure_zone/interface.c
index 4e6e8eee..af6533c3 100644
--- a/ports/cortex_m55/ac6/example_build/demo_secure_zone/interface.c
+++ b/ports/cortex_m55/ac6/example_build/demo_secure_zone/interface.c
@@ -31,19 +31,19 @@
typedef funcptr funcptr_NS __attribute__((cmse_nonsecure_call));
/* Non-secure callable (entry) function */
-int func1(int x) __attribute__((cmse_nonsecure_entry)) {
- return x+3;
+int func1(int x) __attribute__((cmse_nonsecure_entry)) {
+ return x+3;
}
/* Non-secure callable (entry) function, calling a non-secure callback function */
int func2(funcptr callback, int x) __attribute__((cmse_nonsecure_entry)) {
funcptr_NS callback_NS; // non-secure callback function pointer
int y;
-
+
/* return function pointer with cleared LSB */
callback_NS = (funcptr_NS)cmse_nsfptr_create(callback);
-
+
y = callback_NS (x+1);
-
+
return (y+2);
}
diff --git a/ports/cortex_m55/ac6/example_build/demo_secure_zone/main_s.c b/ports/cortex_m55/ac6/example_build/demo_secure_zone/main_s.c
index 422969de..92730392 100644
--- a/ports/cortex_m55/ac6/example_build/demo_secure_zone/main_s.c
+++ b/ports/cortex_m55/ac6/example_build/demo_secure_zone/main_s.c
@@ -24,35 +24,35 @@
* Title: Code template for secure main function
*
*---------------------------------------------------------------------------*/
-
+
#include "region_limits.h"
#include "RTE_Components.h"
#include CMSIS_device_header
-
+
/* TZ_START_NS: Start address of non-secure application */
#ifndef TZ_START_NS
#define TZ_START_NS 0x00080000U
#endif
-
+
/* typedef for non-secure callback functions */
typedef void (*funcptr_void) (void) __attribute__((cmse_nonsecure_call));
-
+
/* Secure main() */
int main(void) {
funcptr_void NonSecure_ResetHandler;
-
+
/* Add user setup code for secure part here*/
-
+
/* Set non-secure main stack (MSP_NS) */
__TZ_set_MSP_NS(*((uint32_t *)(TZ_START_NS)));
-
+
/* Get non-secure reset handler */
NonSecure_ResetHandler = (funcptr_void)(*((uint32_t *)((TZ_START_NS) + 4U)));
-
+
/* Start non-secure state software application */
NonSecure_ResetHandler();
-
+
/* Non-secure software does not return, this code is not executed */
while (1) {
__NOP();
diff --git a/ports/cortex_m55/ac6/example_build/demo_secure_zone/tz_context.c b/ports/cortex_m55/ac6/example_build/demo_secure_zone/tz_context.c
index f3152890..ca7f0c56 100644
--- a/ports/cortex_m55/ac6/example_build/demo_secure_zone/tz_context.c
+++ b/ports/cortex_m55/ac6/example_build/demo_secure_zone/tz_context.c
@@ -24,7 +24,7 @@
* Title: Context Management for ARMv8-M TrustZone - Sample implementation
*
*---------------------------------------------------------------------------*/
-
+
#include "RTE_Components.h"
#include CMSIS_device_header
#include "tz_context.h"
diff --git a/ports/cortex_m55/ac6/example_build/demo_threadx_non-secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h b/ports/cortex_m55/ac6/example_build/demo_threadx_non-secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
index 3b0b521d..f6dfdef3 100644
--- a/ports/cortex_m55/ac6/example_build/demo_threadx_non-secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
+++ b/ports/cortex_m55/ac6/example_build/demo_threadx_non-secure_zone/RTE/_FVP_Simulation_Model/RTE_Components.h
@@ -3,8 +3,8 @@
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
- * Project: 'demo_threadx_non-secure_zone'
- * Target: 'FVP Simulation Model'
+ * Project: 'demo_threadx_non-secure_zone'
+ * Target: 'FVP Simulation Model'
*/
#ifndef RTE_COMPONENTS_H
@@ -12,7 +12,7 @@
/*
- * Define the Device Header File:
+ * Define the Device Header File:
*/
#define CMSIS_device_header "SSE300MPS3.h"
diff --git a/ports/cortex_m55/ac6/example_build/demo_threadx_non-secure_zone/demo_threadx.c b/ports/cortex_m55/ac6/example_build/demo_threadx_non-secure_zone/demo_threadx.c
index 7257ac6d..cea22889 100644
--- a/ports/cortex_m55/ac6/example_build/demo_threadx_non-secure_zone/demo_threadx.c
+++ b/ports/cortex_m55/ac6/example_build/demo_threadx_non-secure_zone/demo_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. Please refer to Chapter 6 of the ThreadX User Guide for a complete
description of this demonstration. */
@@ -68,7 +68,7 @@ void thread_6_and_7_entry(ULONG thread_input);
int main()
{
-
+
/* Please refer to Chapter 6 of the ThreadX User Guide for a complete
description of this demonstration. */
@@ -86,7 +86,7 @@ void tx_application_define(void *first_unused_memory)
CHAR *pointer;
(VOID)first_unused_memory; /* unused parameter. */
-
+
#ifdef TX_ENABLE_EVENT_TRACE
tx_trace_enable(trace_buffer, sizeof(trace_buffer), 32);
#endif
@@ -101,41 +101,41 @@ CHAR *pointer;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -143,23 +143,23 @@ CHAR *pointer;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -188,7 +188,7 @@ CHAR *pointer;
/* Release the block back to the pool. */
tx_block_release(pointer);
-
+
tx_thread_secure_stack_allocate(&thread_0,256);
tx_thread_secure_stack_allocate(&thread_1,256);
tx_thread_secure_stack_allocate(&thread_2,256);
@@ -206,13 +206,13 @@ CHAR *pointer;
void thread_0_entry(ULONG thread_input)
{
UINT status;
-
+
(VOID)thread_input; /* unused parameter. */
-
+
/* This thread simply sits in while-forever-sleep loop. */
while(1)
{
-
+
/* Increment the thread counter. */
thread_0_counter++;
@@ -235,11 +235,11 @@ void thread_1_entry(ULONG thread_input)
UINT status;
(VOID)thread_input; /* unused parameter. */
-
+
/* This thread simply sends messages to a queue shared by thread 2. */
while(1)
{
-
+
/* Increment the thread counter. */
thread_1_counter++;
@@ -263,7 +263,7 @@ ULONG received_message;
UINT status;
(VOID)thread_input; /* unused parameter. */
-
+
/* This thread retrieves messages placed on the queue by thread 1. */
while(1)
{
@@ -274,11 +274,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -289,7 +289,7 @@ void thread_3_and_4_entry(ULONG thread_input)
{
UINT status;
-
+
/* This function is executed from thread 3 and thread 4. As the loop
below shows, these function compete for ownership of semaphore_0. */
while(1)
@@ -328,7 +328,7 @@ UINT status;
ULONG actual_flags;
(VOID)thread_input; /* unused parameter. */
-
+
/* This thread simply waits for an event in a forever loop. */
while(1)
{
@@ -337,7 +337,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -390,7 +390,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m55/ac6/example_build/tx_initialize_low_level.S b/ports/cortex_m55/ac6/example_build/tx_initialize_low_level.S
index 60c5d476..fdd8aaed 100644
--- a/ports/cortex_m55/ac6/example_build/tx_initialize_low_level.S
+++ b/ports/cortex_m55/ac6/example_build/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -62,12 +63,6 @@ HEAP_SIZE = 0x00000000
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_m55/ac6/inc/tx_port.h b/ports/cortex_m55/ac6/inc/tx_port.h
index 99453a82..9d11a04b 100644
--- a/ports/cortex_m55/ac6/inc/tx_port.h
+++ b/ports/cortex_m55/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,39 +46,6 @@
/* This file replaces the previous Cortex-M55 files. It unifies */
/* the Cortex-M55 compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-02-2021 Scott Larson Modified comment(s), added */
-/* ULONG64_DEFINED, */
-/* resulting in version 6.1.5 */
-/* 06-02-2021 Scott Larson Modified comment(s), removed */
-/* unneeded header file, funcs */
-/* set_control and get_control */
-/* changed to inline, */
-/* added symbol to enable */
-/* stack error handler, */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Scott Larson Modified comment(s), improved */
-/* stack check error handling, */
-/* resulting in version 6.1.9 */
-/* 01-31-2022 Scott Larson Modified comment(s), unified */
-/* this file across compilers, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* 03-08-2023 Scott Larson Removed unneeded #include, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -645,7 +613,7 @@ VOID _tx_thread_interrupt_restore(UIN
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M55/AC6 Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M55/AC6 Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m55/ac6/inc/tx_secure_interface.h b/ports/cortex_m55/ac6/inc/tx_secure_interface.h
index 39b5d5fd..5ac37fbf 100644
--- a/ports/cortex_m55/ac6/inc/tx_secure_interface.h
+++ b/ports/cortex_m55/ac6/inc/tx_secure_interface.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,12 +38,6 @@
/* It is assumed that tx_api.h and tx_port.h have already been */
/* included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_SECURE_INTERFACE_H
diff --git a/ports/cortex_m55/ac6/readme_threadx.txt b/ports/cortex_m55/ac6/readme_threadx.txt
index fc0aa404..63e8196e 100644
--- a/ports/cortex_m55/ac6/readme_threadx.txt
+++ b/ports/cortex_m55/ac6/readme_threadx.txt
@@ -1,46 +1,46 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M55
+ Microsoft's Azure RTOS ThreadX for Cortex-M55
Using the AC6 Tools in Keil uVision
1. Import the ThreadX Projects
-In order to build the ThreadX library and the ThreadX demonstration, first open
-the AzureRTOS.uvmpw workspace (located in the "example_build" directory)
+In order to build the ThreadX library and the ThreadX demonstration, first open
+the AzureRTOS.uvmpw workspace (located in the "example_build" directory)
into Keil.
2. Building the ThreadX run-time Library
Building the ThreadX library is easy; simply set the ThreadX_Library project
-as active, then then build the library. You should now observe the compilation
+as active, then then build the library. You should now observe the compilation
and assembly of the ThreadX library. This project build produces the ThreadX
library file ThreadX_Library.lib.
-Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
-replace the common files of the same name.
+Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
+replace the common files of the same name.
3. Demonstration System
The ThreadX demonstration is designed to execute under the Keil debugger on the
FVP_MPS2_Cortex-M55_MDK simulator.
-Building the demonstration is easy; simply select the "Batch Build" button.
-You should now observe the compilation and assembly of the ThreadX demonstration of
-both the demo_secure_zone and demo_threadx_non-secure_zone projects.
+Building the demonstration is easy; simply select the "Batch Build" button.
+You should now observe the compilation and assembly of the ThreadX demonstration of
+both the demo_secure_zone and demo_threadx_non-secure_zone projects.
Then click the Start/Stop Debug Session button to start the simulator and begin debugging.
You are now ready to execute the ThreadX demonstration.
4. System Initialization
-The entry point in ThreadX for the Cortex-M55 using AC6 tools uses the standard AC6
+The entry point in ThreadX for the Cortex-M55 using AC6 tools uses the standard AC6
Cortex-M55 reset sequence. From the reset vector the C runtime will be initialized.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -49,7 +49,7 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M55 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -132,26 +132,26 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
6. Improving Performance
-To make ThreadX and the application(s) run faster, you can enable
-all compiler optimizations.
+To make ThreadX and the application(s) run faster, you can enable
+all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M55
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-M55 vectors start at the label __Vectors or similar. The application may modify
-the vector area according to its needs. There is code in tx_initialize_low_level() that will
-configure the vector base register.
+the vector area according to its needs. There is code in tx_initialize_low_level() that will
+configure the vector base register.
7.2 Managed Interrupts
@@ -177,7 +177,7 @@ your_assembly_isr:
; VOID your_assembly_isr(VOID)
; {
PUSH {r0, lr}
-;
+;
; /* Do interrupt handler work here */
; /* BL */
@@ -187,15 +187,15 @@ your_assembly_isr:
Note: the Cortex-M55 requires exception handlers to be thumb labels, this implies bit 0 set.
To accomplish this, the declaration of the label has to be preceded by the assembler directive
-.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
-be inserted in the correct location in the interrupt vector table. This table is typically
+.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
+be inserted in the correct location in the interrupt vector table. This table is typically
located in either your runtime startup file or in the tx_initialize_low_level.s file.
8. FPU Support
-ThreadX for Cortex-M55 supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M55 supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context.
diff --git a/ports/cortex_m55/ac6/src/tx_initialize_low_level.S b/ports/cortex_m55/ac6/src/tx_initialize_low_level.S
index 55e56af0..d6e39792 100644
--- a/ports/cortex_m55/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_m55/ac6/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@ HEAP_SIZE = 0x00000000
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_m55/ac6/src/tx_misra.S b/ports/cortex_m55/ac6/src/tx_misra.S
index 8ac0c629..10548671 100644
--- a/ports/cortex_m55/ac6/src/tx_misra.S
+++ b/ports/cortex_m55/ac6/src/tx_misra.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -667,7 +668,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -682,7 +683,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARM_FP
/***********************************************************************************************/
@@ -699,8 +700,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -714,9 +715,9 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
+
.data
.word 0
diff --git a/ports/cortex_m55/ac6/src/tx_thread_context_restore.S b/ports/cortex_m55/ac6/src/tx_thread_context_restore.S
index 57f8654a..5743e7d1 100644
--- a/ports/cortex_m55/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_m55/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m55/ac6/src/tx_thread_context_save.S b/ports/cortex_m55/ac6/src/tx_thread_context_save.S
index 90cdbace..4b696f21 100644
--- a/ports/cortex_m55/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_m55/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m55/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_m55/ac6/src/tx_thread_interrupt_control.S
index 964cb460..6f34fbfd 100644
--- a/ports/cortex_m55/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_m55/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m55/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_m55/ac6/src/tx_thread_interrupt_disable.S
index 04aeb300..530e18e4 100644
--- a/ports/cortex_m55/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_m55/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m55/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_m55/ac6/src/tx_thread_interrupt_restore.S
index 4a85216c..58ebf0d6 100644
--- a/ports/cortex_m55/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_m55/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m55/ac6/src/tx_thread_schedule.S b/ports/cortex_m55/ac6/src/tx_thread_schedule.S
index 76867723..a1f38fbc 100644
--- a/ports/cortex_m55/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_m55/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,23 +61,6 @@
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 04-02-2021 Scott Larson Modified comment(s), added */
-/* low power code, */
-/* resulting in version 6.1.6 */
-/* 06-02-2021 Scott Larson Added secure stack initialize */
-/* in SVC handler, */
-/* resulting in version 6.1.7 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 03-08-2023 Scott Larson Added preproc FPU option, */
-/* included tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -354,7 +338,7 @@ SVC_Handler:
CMP r1, #2 // Is it a secure stack free request?
BEQ _tx_svc_secure_free // Yes, go there
-
+
CMP r1, #3 // Is it a secure stack init request?
BEQ _tx_svc_secure_init // Yes, go there
diff --git a/ports/cortex_m55/ac6/src/tx_thread_secure_stack.c b/ports/cortex_m55/ac6/src/tx_thread_secure_stack.c
index 2395e44b..c01e9fcc 100644
--- a/ports/cortex_m55/ac6/src/tx_thread_secure_stack.c
+++ b/ports/cortex_m55/ac6/src/tx_thread_secure_stack.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -102,21 +103,6 @@ static INT tx_head_free_index = 0U;
/* */
/* _tx_initialize_kernel_enter */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 10-16-2020 Scott Larson Modified comment(s), */
-/* resulting in version 6.1.1 */
-/* 06-02-2021 Scott Larson Modified comment(s), and */
-/* changed name, execute in */
-/* handler mode, */
-/* resulting in version 6.1.7 */
-/* 01-31-2022 Himanshu Gupta Modified comments(s), updated */
-/* secure stack allocation, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
__attribute__((cmse_nonsecure_entry))
UINT _tx_thread_secure_mode_stack_initialize(void)
diff --git a/ports/cortex_m55/ac6/src/tx_thread_secure_stack_allocate.S b/ports/cortex_m55/ac6/src/tx_thread_secure_stack_allocate.S
index e6459612..bc6a2f5d 100644
--- a/ports/cortex_m55/ac6/src/tx_thread_secure_stack_allocate.S
+++ b/ports/cortex_m55/ac6/src/tx_thread_secure_stack_allocate.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,14 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
// {
diff --git a/ports/cortex_m55/ac6/src/tx_thread_secure_stack_free.S b/ports/cortex_m55/ac6/src/tx_thread_secure_stack_free.S
index 961f2047..5de780d6 100644
--- a/ports/cortex_m55/ac6/src/tx_thread_secure_stack_free.S
+++ b/ports/cortex_m55/ac6/src/tx_thread_secure_stack_free.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,14 +54,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_free(TX_THREAD *thread_ptr)
// {
diff --git a/ports/cortex_m55/ac6/src/tx_thread_secure_stack_initialize.S b/ports/cortex_m55/ac6/src/tx_thread_secure_stack_initialize.S
index db354865..951ca86f 100644
--- a/ports/cortex_m55/ac6/src/tx_thread_secure_stack_initialize.S
+++ b/ports/cortex_m55/ac6/src/tx_thread_secure_stack_initialize.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,18 +54,6 @@
/* */
/* TX_PORT_SPECIFIC_PRE_INITIALIZATION */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* resulting in version 6.1.12 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_secure_stack_initialize(VOID)
// {
diff --git a/ports/cortex_m55/ac6/src/tx_thread_stack_build.S b/ports/cortex_m55/ac6/src/tx_thread_stack_build.S
index 8938d429..3d67bdf0 100644
--- a/ports/cortex_m55/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_m55/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m55/ac6/src/tx_thread_system_return.S b/ports/cortex_m55/ac6/src/tx_thread_system_return.S
index 297dc5a1..a27c2756 100644
--- a/ports/cortex_m55/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_m55/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m55/ac6/src/tx_timer_interrupt.S b/ports/cortex_m55/ac6/src/tx_timer_interrupt.S
index 017c784b..0f0922b3 100644
--- a/ports/cortex_m55/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_m55/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m55/ac6/src/txe_thread_secure_stack_allocate.c b/ports/cortex_m55/ac6/src/txe_thread_secure_stack_allocate.c
index e7d234f6..7a5560ec 100644
--- a/ports/cortex_m55/ac6/src/txe_thread_secure_stack_allocate.c
+++ b/ports/cortex_m55/ac6/src/txe_thread_secure_stack_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
{
@@ -76,10 +71,10 @@ UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_siz
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m55/ac6/src/txe_thread_secure_stack_free.c b/ports/cortex_m55/ac6/src/txe_thread_secure_stack_free.c
index 88fa6b47..9572bad8 100644
--- a/ports/cortex_m55/ac6/src/txe_thread_secure_stack_free.c
+++ b/ports/cortex_m55/ac6/src/txe_thread_secure_stack_free.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,12 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
{
@@ -74,10 +69,10 @@ UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m55/gnu/inc/tx_port.h b/ports/cortex_m55/gnu/inc/tx_port.h
index 721b538d..a70426fa 100644
--- a/ports/cortex_m55/gnu/inc/tx_port.h
+++ b/ports/cortex_m55/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,39 +46,6 @@
/* This file replaces the previous Cortex-M55 files. It unifies */
/* the Cortex-M55 compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-02-2021 Scott Larson Modified comment(s), added */
-/* ULONG64_DEFINED, */
-/* resulting in version 6.1.5 */
-/* 06-02-2021 Scott Larson Modified comment(s), removed */
-/* unneeded header file, funcs */
-/* set_control and get_control */
-/* changed to inline, */
-/* added symbol to enable */
-/* stack error handler, */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Scott Larson Modified comment(s), improved */
-/* stack check error handling, */
-/* resulting in version 6.1.9 */
-/* 01-31-2022 Scott Larson Modified comment(s), unified */
-/* this file across compilers, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* 03-08-2023 Scott Larson Removed unneeded #include, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -645,7 +613,7 @@ VOID _tx_thread_interrupt_restore(UIN
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M55/GNU Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M55/GNU Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m55/gnu/inc/tx_secure_interface.h b/ports/cortex_m55/gnu/inc/tx_secure_interface.h
index 39b5d5fd..5ac37fbf 100644
--- a/ports/cortex_m55/gnu/inc/tx_secure_interface.h
+++ b/ports/cortex_m55/gnu/inc/tx_secure_interface.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,12 +38,6 @@
/* It is assumed that tx_api.h and tx_port.h have already been */
/* included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_SECURE_INTERFACE_H
diff --git a/ports/cortex_m55/gnu/readme_threadx.txt b/ports/cortex_m55/gnu/readme_threadx.txt
index 78d64041..3358694d 100644
--- a/ports/cortex_m55/gnu/readme_threadx.txt
+++ b/ports/cortex_m55/gnu/readme_threadx.txt
@@ -1,32 +1,32 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M55
+ Microsoft's Azure RTOS ThreadX for Cortex-M55
Using the GNU Tools
1. Building the ThreadX run-time Library
Import all ThreadX common and port-specific source files into a GNU project.
-Configure the project to build a library rather than an executable. This
-results in the ThreadX run-time library file tx.a, which is needed by
+Configure the project to build a library rather than an executable. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
-Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
-replace the common files of the same name.
+Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
+replace the common files of the same name.
2. Demonstration System
-No demonstration project is provided.
+No demonstration project is provided.
3. System Initialization
-The entry point in ThreadX for the Cortex-M55 using gnu tools uses the standard GNU
+The entry point in ThreadX for the Cortex-M55 using gnu tools uses the standard GNU
Cortex-M55 reset sequence. From the reset vector the C runtime will be initialized.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.S file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -35,7 +35,7 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M55 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -118,26 +118,26 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-To make ThreadX and the application(s) run faster, you can enable
-all compiler optimizations.
+To make ThreadX and the application(s) run faster, you can enable
+all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M55
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
6.1 Vector Area
The Cortex-M55 vectors start at the label __tx_vectors or similar. The application may modify
-the vector area according to its needs. There is code in tx_initialize_low_level() that will
-configure the vector base register.
+the vector area according to its needs. There is code in tx_initialize_low_level() that will
+configure the vector base register.
6.2 Managed Interrupts
@@ -170,15 +170,15 @@ your_assembly_isr:
Note: the Cortex-M55 requires exception handlers to be thumb labels, this implies bit 0 set.
To accomplish this, the declaration of the label has to be preceded by the assembler directive
-.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
-be inserted in the correct location in the interrupt vector table. This table is typically
+.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
+be inserted in the correct location in the interrupt vector table. This table is typically
located in either your runtime startup file or in the tx_initialize_low_level.S file.
7. FPU Support
-ThreadX for Cortex-M55 supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M55 supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context.
diff --git a/ports/cortex_m55/gnu/src/tx_initialize_low_level.S b/ports/cortex_m55/gnu/src/tx_initialize_low_level.S
index a782cce5..ee23d9cb 100644
--- a/ports/cortex_m55/gnu/src/tx_initialize_low_level.S
+++ b/ports/cortex_m55/gnu/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,16 +66,6 @@ HEAP_SIZE = 0x00000000
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Fixed predefined macro name, */
-/* resulting in version 6.1.10 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_m55/gnu/src/tx_misra.S b/ports/cortex_m55/gnu/src/tx_misra.S
index 8ac0c629..10548671 100644
--- a/ports/cortex_m55/gnu/src/tx_misra.S
+++ b/ports/cortex_m55/gnu/src/tx_misra.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -667,7 +668,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -682,7 +683,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARM_FP
/***********************************************************************************************/
@@ -699,8 +700,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -714,9 +715,9 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
+
.data
.word 0
diff --git a/ports/cortex_m55/gnu/src/tx_thread_context_restore.S b/ports/cortex_m55/gnu/src/tx_thread_context_restore.S
index 4a065cbf..1805d105 100644
--- a/ports/cortex_m55/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_m55/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m55/gnu/src/tx_thread_context_save.S b/ports/cortex_m55/gnu/src/tx_thread_context_save.S
index d8af04bd..634440b6 100644
--- a/ports/cortex_m55/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_m55/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m55/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_m55/gnu/src/tx_thread_interrupt_control.S
index 30aa8120..a2db9028 100644
--- a/ports/cortex_m55/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_m55/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m55/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_m55/gnu/src/tx_thread_interrupt_disable.S
index d6ba1636..65bb5781 100644
--- a/ports/cortex_m55/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_m55/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m55/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_m55/gnu/src/tx_thread_interrupt_restore.S
index 95dbff40..37b02ef3 100644
--- a/ports/cortex_m55/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_m55/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m55/gnu/src/tx_thread_schedule.S b/ports/cortex_m55/gnu/src/tx_thread_schedule.S
index 2c9b0608..2bcc96f6 100644
--- a/ports/cortex_m55/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_m55/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,24 +57,6 @@
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 04-02-2021 Scott Larson Modified comment(s), added */
-/* low power code, */
-/* resulting in version 6.1.6 */
-/* 06-02-2021 Scott Larson Added secure stack initialize */
-/* in SVC handler, */
-/* resulting in version 6.1.7 */
-/* 01-31-2022 Scott Larson Fixed predefined macro name, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -351,7 +334,7 @@ SVC_Handler:
CMP r1, #2 // Is it a secure stack free request?
BEQ _tx_svc_secure_free // Yes, go there
-
+
CMP r1, #3 // Is it a secure stack init request?
BEQ _tx_svc_secure_init // Yes, go there
diff --git a/ports/cortex_m55/gnu/src/tx_thread_secure_stack.c b/ports/cortex_m55/gnu/src/tx_thread_secure_stack.c
index bbc953d7..6abfe7c7 100644
--- a/ports/cortex_m55/gnu/src/tx_thread_secure_stack.c
+++ b/ports/cortex_m55/gnu/src/tx_thread_secure_stack.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -98,21 +99,6 @@ static INT tx_head_free_index = 0U;
/* */
/* _tx_initialize_kernel_enter */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 10-16-2020 Scott Larson Modified comment(s), */
-/* resulting in version 6.1.1 */
-/* 06-02-2021 Scott Larson Change name, execute in */
-/* handler mode, */
-/* disable optimizations, */
-/* resulting in version 6.1.7 */
-/* 01-31-2022 Himanshu Gupta Modified comments(s), updated */
-/* secure stack allocation, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
__attribute__((cmse_nonsecure_entry, optimize(0)))
UINT _tx_thread_secure_mode_stack_initialize(void)
diff --git a/ports/cortex_m55/gnu/src/tx_thread_secure_stack_allocate.S b/ports/cortex_m55/gnu/src/tx_thread_secure_stack_allocate.S
index 8db2c058..e8b290cf 100644
--- a/ports/cortex_m55/gnu/src/tx_thread_secure_stack_allocate.S
+++ b/ports/cortex_m55/gnu/src/tx_thread_secure_stack_allocate.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,14 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
// {
diff --git a/ports/cortex_m55/gnu/src/tx_thread_secure_stack_free.S b/ports/cortex_m55/gnu/src/tx_thread_secure_stack_free.S
index 7a9e9af5..63bf3960 100644
--- a/ports/cortex_m55/gnu/src/tx_thread_secure_stack_free.S
+++ b/ports/cortex_m55/gnu/src/tx_thread_secure_stack_free.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,14 +54,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_free(TX_THREAD *thread_ptr)
// {
diff --git a/ports/cortex_m55/gnu/src/tx_thread_secure_stack_initialize.S b/ports/cortex_m55/gnu/src/tx_thread_secure_stack_initialize.S
index 57d8fb95..3d38f451 100644
--- a/ports/cortex_m55/gnu/src/tx_thread_secure_stack_initialize.S
+++ b/ports/cortex_m55/gnu/src/tx_thread_secure_stack_initialize.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,18 +54,6 @@
/* */
/* TX_PORT_SPECIFIC_PRE_INITIALIZATION */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* resulting in version 6.1.12 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_secure_stack_initialize(VOID)
// {
diff --git a/ports/cortex_m55/gnu/src/tx_thread_stack_build.S b/ports/cortex_m55/gnu/src/tx_thread_stack_build.S
index 3ac38296..4cc67002 100644
--- a/ports/cortex_m55/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_m55/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m55/gnu/src/tx_thread_system_return.S b/ports/cortex_m55/gnu/src/tx_thread_system_return.S
index a06a3109..0fc717b9 100644
--- a/ports/cortex_m55/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_m55/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m55/gnu/src/tx_timer_interrupt.S b/ports/cortex_m55/gnu/src/tx_timer_interrupt.S
index c2a389aa..c2cd185a 100644
--- a/ports/cortex_m55/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_m55/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m55/gnu/src/txe_thread_secure_stack_allocate.c b/ports/cortex_m55/gnu/src/txe_thread_secure_stack_allocate.c
index e7d234f6..7a5560ec 100644
--- a/ports/cortex_m55/gnu/src/txe_thread_secure_stack_allocate.c
+++ b/ports/cortex_m55/gnu/src/txe_thread_secure_stack_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
{
@@ -76,10 +71,10 @@ UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_siz
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m55/gnu/src/txe_thread_secure_stack_free.c b/ports/cortex_m55/gnu/src/txe_thread_secure_stack_free.c
index 88fa6b47..9572bad8 100644
--- a/ports/cortex_m55/gnu/src/txe_thread_secure_stack_free.c
+++ b/ports/cortex_m55/gnu/src/txe_thread_secure_stack_free.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,12 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
{
@@ -74,10 +69,10 @@ UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m55/iar/inc/tx_port.h b/ports/cortex_m55/iar/inc/tx_port.h
index 8d1086b9..b8a389f5 100644
--- a/ports/cortex_m55/iar/inc/tx_port.h
+++ b/ports/cortex_m55/iar/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,39 +46,6 @@
/* This file replaces the previous Cortex-M55 files. It unifies */
/* the Cortex-M55 compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-02-2021 Scott Larson Modified comment(s), added */
-/* ULONG64_DEFINED, */
-/* resulting in version 6.1.5 */
-/* 06-02-2021 Scott Larson Modified comment(s), removed */
-/* unneeded header file, funcs */
-/* set_control and get_control */
-/* changed to inline, */
-/* added symbol to enable */
-/* stack error handler, */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Scott Larson Modified comment(s), improved */
-/* stack check error handling, */
-/* resulting in version 6.1.9 */
-/* 01-31-2022 Scott Larson Modified comment(s), unified */
-/* this file across compilers, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* 03-08-2023 Scott Larson Removed unneeded #include, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -645,7 +613,7 @@ VOID _tx_thread_interrupt_restore(UIN
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M55/IAR Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M55/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m55/iar/inc/tx_secure_interface.h b/ports/cortex_m55/iar/inc/tx_secure_interface.h
index 39b5d5fd..5ac37fbf 100644
--- a/ports/cortex_m55/iar/inc/tx_secure_interface.h
+++ b/ports/cortex_m55/iar/inc/tx_secure_interface.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,12 +38,6 @@
/* It is assumed that tx_api.h and tx_port.h have already been */
/* included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_SECURE_INTERFACE_H
diff --git a/ports/cortex_m55/iar/readme_threadx.txt b/ports/cortex_m55/iar/readme_threadx.txt
index 1d89e2cb..dcbee39e 100644
--- a/ports/cortex_m55/iar/readme_threadx.txt
+++ b/ports/cortex_m55/iar/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M55
+ Microsoft's Azure RTOS ThreadX for Cortex-M55
Using the IAR Tools
@@ -6,33 +6,33 @@
1. Building the ThreadX run-time Library
Import all ThreadX common and port-specific source files into an IAR project.
-Configure the project to build a library rather than an executable. This
-results in the ThreadX run-time library file tx.a, which is needed by
+Configure the project to build a library rather than an executable. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
-Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
-replace the common files of the same name.
+Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
+replace the common files of the same name.
2. Demonstration System
No demonstration is provided because the IAR EWARM 8.50 simulator does
-not simulate the Cortex-M55 correctly.
+not simulate the Cortex-M55 correctly.
3. System Initialization
-The entry point in ThreadX for the Cortex-M55 using IAR tools is at label
-__iar_program_start. This is defined within the IAR compiler's startup code.
-In addition, this is where all static and global preset C variable
+The entry point in ThreadX for the Cortex-M55 using IAR tools is at label
+__iar_program_start. This is defined within the IAR compiler's startup code.
+In addition, this is where all static and global preset C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, and a periodic timer interrupt source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, and a periodic timer interrupt source.
The _tx_initialize_low_level function inside of tx_initialize_low_level.s
-also determines the first available address for use by the application, which
-is supplied as the sole input parameter to your application definition function,
-tx_application_define. To accomplish this, a section is created in
-tx_initialize_low_level.s called FREE_MEM, which must be located after all
+also determines the first available address for use by the application, which
+is supplied as the sole input parameter to your application definition function,
+tx_application_define. To accomplish this, a section is created in
+tx_initialize_low_level.s called FREE_MEM, which must be located after all
other RAM sections in memory.
@@ -41,7 +41,7 @@ other RAM sections in memory.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M55 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -124,17 +124,17 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-To make ThreadX and the application(s) run faster, you can enable
-all compiler optimizations.
+To make ThreadX and the application(s) run faster, you can enable
+all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
-The Cortex-M55 vectors start at the label __vector_table and is typically defined in a
+The Cortex-M55 vectors start at the label __vector_table and is typically defined in a
startup.s file (or similar). The application may modify the vector area according to its needs.
@@ -182,14 +182,14 @@ should have the following line added (if not already in place):
initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
-The project options "General Options -> Library Configuration" should also have the
+The project options "General Options -> Library Configuration" should also have the
"Enable thread support in library" box selected.
8. VFP Support
-ThreadX for Cortex-M55 supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M55 supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context.
diff --git a/ports/cortex_m55/iar/src/tx_iar.c b/ports/cortex_m55/iar/src/tx_iar.c
index c6092de3..238b485e 100644
--- a/ports/cortex_m55/iar/src/tx_iar.c
+++ b/ports/cortex_m55/iar/src/tx_iar.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,24 +423,24 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#include
+#include
void * __aeabi_read_tp();
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports/cortex_m55/iar/src/tx_initialize_low_level.s b/ports/cortex_m55/iar/src/tx_initialize_low_level.s
index 3bb984aa..312e8267 100644
--- a/ports/cortex_m55/iar/src/tx_initialize_low_level.s
+++ b/ports/cortex_m55/iar/src/tx_initialize_low_level.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,13 +75,6 @@ __tx_free_memory_start
/* CALLED BY */
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_m55/iar/src/tx_misra.s b/ports/cortex_m55/iar/src/tx_misra.s
index f86d9a65..642bb89e 100644
--- a/ports/cortex_m55/iar/src/tx_misra.s
+++ b/ports/cortex_m55/iar/src/tx_misra.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -120,7 +121,7 @@
SECTION `.data`:DATA:REORDER:NOROOT(2)
DATA
-// 51 CHAR _tx_version_id[100] = "Copyright (c) 2024 Microsoft Corporation. * ThreadX 6.1 MISRA C Compliant *";
+// 51 CHAR _tx_version_id[100] = "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX 6.1 MISRA C Compliant *";
_tx_version_id:
DC8 43H, 6FH, 70H, 79H, 72H, 69H, 67H, 68H
DC8 74H, 20H, 28H, 63H, 29H, 20H, 31H, 39H
@@ -707,7 +708,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -722,7 +723,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARMVFP__
/***********************************************************************************************/
@@ -739,8 +740,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -754,10 +755,10 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
-
+
+
SECTION `.iar_vfe_header`:DATA:NOALLOC:NOROOT(2)
SECTION_TYPE SHT_PROGBITS, 0
DATA
diff --git a/ports/cortex_m55/iar/src/tx_thread_context_restore.s b/ports/cortex_m55/iar/src/tx_thread_context_restore.s
index 3be0669a..623329ae 100644
--- a/ports/cortex_m55/iar/src/tx_thread_context_restore.s
+++ b/ports/cortex_m55/iar/src/tx_thread_context_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,13 +56,6 @@
/* CALLED BY */
/* */
/* ISRs Interrupt Service Routines */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m55/iar/src/tx_thread_context_save.s b/ports/cortex_m55/iar/src/tx_thread_context_save.s
index fc1acfa4..5c8d88de 100644
--- a/ports/cortex_m55/iar/src/tx_thread_context_save.s
+++ b/ports/cortex_m55/iar/src/tx_thread_context_save.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,13 +56,6 @@
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m55/iar/src/tx_thread_interrupt_control.s b/ports/cortex_m55/iar/src/tx_thread_interrupt_control.s
index c4bae75f..ccfd7289 100644
--- a/ports/cortex_m55/iar/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_m55/iar/src/tx_thread_interrupt_control.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,13 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m55/iar/src/tx_thread_interrupt_disable.s b/ports/cortex_m55/iar/src/tx_thread_interrupt_disable.s
index 59546c0e..fce50a21 100644
--- a/ports/cortex_m55/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_m55/iar/src/tx_thread_interrupt_disable.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,13 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m55/iar/src/tx_thread_interrupt_restore.s b/ports/cortex_m55/iar/src/tx_thread_interrupt_restore.s
index 2efba029..9ba67719 100644
--- a/ports/cortex_m55/iar/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_m55/iar/src/tx_thread_interrupt_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,13 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m55/iar/src/tx_thread_schedule.s b/ports/cortex_m55/iar/src/tx_thread_schedule.s
index d0441084..822fa83a 100644
--- a/ports/cortex_m55/iar/src/tx_thread_schedule.s
+++ b/ports/cortex_m55/iar/src/tx_thread_schedule.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -73,23 +74,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 04-02-2021 Scott Larson Modified comment(s), added */
-/* low power code, */
-/* resulting in version 6.1.6 */
-/* 06-02-2021 Scott Larson Added secure stack initialize */
-/* in SVC handler, */
-/* resulting in version 6.1.7 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 03-08-2023 Scott Larson Added preproc FPU option, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -348,7 +332,7 @@ SVC_Handler:
CMP r1, #2 // Is it a secure stack free request?
BEQ _tx_svc_secure_free // Yes, go there
-
+
CMP r1, #3 // Is it a secure stack init request?
BEQ _tx_svc_secure_init // Yes, go there
diff --git a/ports/cortex_m55/iar/src/tx_thread_secure_stack.c b/ports/cortex_m55/iar/src/tx_thread_secure_stack.c
index d7ec07cb..fd6388f2 100644
--- a/ports/cortex_m55/iar/src/tx_thread_secure_stack.c
+++ b/ports/cortex_m55/iar/src/tx_thread_secure_stack.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -102,20 +103,6 @@ static INT tx_head_free_index = 0U;
/* */
/* _tx_initialize_kernel_enter */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 10-16-2020 Scott Larson Modified comment(s), */
-/* resulting in version 6.1.1 */
-/* 06-02-2021 Scott Larson Change name, execute in */
-/* handler mode, */
-/* resulting in version 6.1.7 */
-/* 01-31-2022 Himanshu Gupta Modified comments(s), updated */
-/* secure stack allocation, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
__attribute__((cmse_nonsecure_entry))
UINT _tx_thread_secure_mode_stack_initialize(void)
diff --git a/ports/cortex_m55/iar/src/tx_thread_secure_stack_allocate.s b/ports/cortex_m55/iar/src/tx_thread_secure_stack_allocate.s
index 0183e0f8..c3cbf71d 100644
--- a/ports/cortex_m55/iar/src/tx_thread_secure_stack_allocate.s
+++ b/ports/cortex_m55/iar/src/tx_thread_secure_stack_allocate.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,13 +57,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
// {
diff --git a/ports/cortex_m55/iar/src/tx_thread_secure_stack_free.s b/ports/cortex_m55/iar/src/tx_thread_secure_stack_free.s
index 54c56e7d..46af894b 100644
--- a/ports/cortex_m55/iar/src/tx_thread_secure_stack_free.s
+++ b/ports/cortex_m55/iar/src/tx_thread_secure_stack_free.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,13 +55,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_free(TX_THREAD *thread_ptr)
// {
diff --git a/ports/cortex_m55/iar/src/tx_thread_secure_stack_initialize.s b/ports/cortex_m55/iar/src/tx_thread_secure_stack_initialize.s
index b9683f7a..7e1a4fb1 100644
--- a/ports/cortex_m55/iar/src/tx_thread_secure_stack_initialize.s
+++ b/ports/cortex_m55/iar/src/tx_thread_secure_stack_initialize.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* CALLED BY */
/* */
/* TX_PORT_SPECIFIC_PRE_INITIALIZATION */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
// VOID _tx_thread_secure_stack_initialize(VOID)
// {
diff --git a/ports/cortex_m55/iar/src/tx_thread_stack_build.s b/ports/cortex_m55/iar/src/tx_thread_stack_build.s
index dde61ace..31dc6469 100644
--- a/ports/cortex_m55/iar/src/tx_thread_stack_build.s
+++ b/ports/cortex_m55/iar/src/tx_thread_stack_build.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,13 +58,6 @@
/* CALLED BY */
/* */
/* _tx_thread_create Create thread service */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m55/iar/src/tx_thread_system_return.s b/ports/cortex_m55/iar/src/tx_thread_system_return.s
index a5e158ab..2762f49e 100644
--- a/ports/cortex_m55/iar/src/tx_thread_system_return.s
+++ b/ports/cortex_m55/iar/src/tx_thread_system_return.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,13 +58,6 @@
/* CALLED BY */
/* */
/* ThreadX components */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m55/iar/src/tx_timer_interrupt.s b/ports/cortex_m55/iar/src/tx_timer_interrupt.s
index c8cb6eea..9a25fb24 100644
--- a/ports/cortex_m55/iar/src/tx_timer_interrupt.s
+++ b/ports/cortex_m55/iar/src/tx_timer_interrupt.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,13 +72,6 @@
/* CALLED BY */
/* */
/* interrupt vector */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m55/iar/src/txe_thread_secure_stack_allocate.c b/ports/cortex_m55/iar/src/txe_thread_secure_stack_allocate.c
index e7d234f6..7a5560ec 100644
--- a/ports/cortex_m55/iar/src/txe_thread_secure_stack_allocate.c
+++ b/ports/cortex_m55/iar/src/txe_thread_secure_stack_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
{
@@ -76,10 +71,10 @@ UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_siz
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m55/iar/src/txe_thread_secure_stack_free.c b/ports/cortex_m55/iar/src/txe_thread_secure_stack_free.c
index 88fa6b47..9572bad8 100644
--- a/ports/cortex_m55/iar/src/txe_thread_secure_stack_free.c
+++ b/ports/cortex_m55/iar/src/txe_thread_secure_stack_free.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,12 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
{
@@ -74,10 +69,10 @@ UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m7/ac5/example_build/sample_threadx.c b/ports/cortex_m7/ac5/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/cortex_m7/ac5/example_build/sample_threadx.c
+++ b/ports/cortex_m7/ac5/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m7/ac5/example_build/tx_initialize_low_level.s b/ports/cortex_m7/ac5/example_build/tx_initialize_low_level.s
index bd6aa150..07c27743 100644
--- a/ports/cortex_m7/ac5/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_m7/ac5/example_build/tx_initialize_low_level.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -131,12 +131,6 @@ Reset_Handler
;/* */
;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
;{
diff --git a/ports/cortex_m7/ac5/inc/tx_port.h b/ports/cortex_m7/ac5/inc/tx_port.h
index 2f78faee..717bd127 100644
--- a/ports/cortex_m7/ac5/inc/tx_port.h
+++ b/ports/cortex_m7/ac5/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,23 +46,6 @@
/* This file replaces the previous Cortex-M3/M4/M7 files. It unifies */
/* the ARMv7-M architecture and compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comments, updated */
-/* typedef to fix misra */
-/* violation, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -371,7 +355,7 @@ void _tx_vfp_access(void);
/* A thread can be terminated by another thread, so we first check if it's self-terminating and not in an ISR.
If so, deactivate the FPU via CONTROL.FPCA. Otherwise we are in an interrupt or another thread is terminating
- this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
+ this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
the lazy FPU save, then restore the CONTROL.FPCA state. */
#ifndef TX_MISRA_ENABLE
@@ -530,7 +514,7 @@ ULONG _tx_misra_ipsr_get(VOID);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) (b) = (UINT) __clz(__rbit((m)));
#elif defined(__GNUC__) /* GCC and AC6 Compiler */
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) __asm__ volatile (" RBIT %0,%1 ": "=r" (m) : "r" (m) ); \
- __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
+ __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
#endif
@@ -715,7 +699,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M7/AC5 Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M7/AC5 Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m7/ac5/readme_threadx.txt b/ports/cortex_m7/ac5/readme_threadx.txt
index b7b7cee9..e261213e 100644
--- a/ports/cortex_m7/ac5/readme_threadx.txt
+++ b/ports/cortex_m7/ac5/readme_threadx.txt
@@ -5,14 +5,14 @@
1. Building the ThreadX run-time Library
-Navigate to the "example_build" directory. Ensure that
-you have setup your path and other environment variables necessary for the AC5
-compiler. At this point you may run the build_threadx.bat batch file. This will
-build the ThreadX run-time environment in the "example_build" directory.
+Navigate to the "example_build" directory. Ensure that
+you have setup your path and other environment variables necessary for the AC5
+compiler. At this point you may run the build_threadx.bat batch file. This will
+build the ThreadX run-time environment in the "example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
@@ -21,28 +21,28 @@ application in order to use ThreadX.
The ThreadX demonstration is designed to execute under the ARM DS Cortex-M
simulator.
-Building the demonstration is easy; simply execute the build_threadx_sample.bat
+Building the demonstration is easy; simply execute the build_threadx_sample.bat
batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.axf
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.axf
is a binary file that can be downloaded and executed on the ARM DS Cortex-M
simulator.
3. System Initialization
-The entry point in ThreadX for the Cortex-M using AC5 tools is at label
-__main. This is defined within the AC5 compiler's startup code. In
-addition, this is where all static and global pre-set C variable
+The entry point in ThreadX for the Cortex-M using AC5 tools is at label
+__main. This is defined within the AC5 compiler's startup code. In
+addition, this is where all static and global pre-set C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -51,7 +51,7 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -134,21 +134,21 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
@@ -187,8 +187,8 @@ your_assembly_isr
7. FPU Support
-ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context - no additional setup by the application.
diff --git a/ports/cortex_m7/ac5/src/tx_thread_context_restore.s b/ports/cortex_m7/ac5/src/tx_thread_context_restore.s
index 5e826e21..0fb0e6c9 100644
--- a/ports/cortex_m7/ac5/src/tx_thread_context_restore.s
+++ b/ports/cortex_m7/ac5/src/tx_thread_context_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* CALLED BY */
/* */
/* ISRs Interrupt Service Routines */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m7/ac5/src/tx_thread_context_save.s b/ports/cortex_m7/ac5/src/tx_thread_context_save.s
index 0445f04c..12b27e73 100644
--- a/ports/cortex_m7/ac5/src/tx_thread_context_save.s
+++ b/ports/cortex_m7/ac5/src/tx_thread_context_save.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,15 +60,6 @@
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m7/ac5/src/tx_thread_interrupt_control.s b/ports/cortex_m7/ac5/src/tx_thread_interrupt_control.s
index 13ad3b6f..760396b3 100644
--- a/ports/cortex_m7/ac5/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_m7/ac5/src/tx_thread_interrupt_control.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,15 +55,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m7/ac5/src/tx_thread_interrupt_disable.s b/ports/cortex_m7/ac5/src/tx_thread_interrupt_disable.s
index f3268762..02506666 100644
--- a/ports/cortex_m7/ac5/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_m7/ac5/src/tx_thread_interrupt_disable.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,15 +55,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m7/ac5/src/tx_thread_interrupt_restore.s b/ports/cortex_m7/ac5/src/tx_thread_interrupt_restore.s
index b51e9997..1b099aa2 100644
--- a/ports/cortex_m7/ac5/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_m7/ac5/src/tx_thread_interrupt_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,15 +55,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m7/ac5/src/tx_thread_schedule.s b/ports/cortex_m7/ac5/src/tx_thread_schedule.s
index 1f7d6e13..4ff53e17 100644
--- a/ports/cortex_m7/ac5/src/tx_thread_schedule.s
+++ b/ports/cortex_m7/ac5/src/tx_thread_schedule.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,17 +68,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
diff --git a/ports/cortex_m7/ac5/src/tx_thread_stack_build.s b/ports/cortex_m7/ac5/src/tx_thread_stack_build.s
index 6f0a830f..d54a8486 100644
--- a/ports/cortex_m7/ac5/src/tx_thread_stack_build.s
+++ b/ports/cortex_m7/ac5/src/tx_thread_stack_build.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* CALLED BY */
/* */
/* _tx_thread_create Create thread service */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m7/ac5/src/tx_thread_system_return.s b/ports/cortex_m7/ac5/src/tx_thread_system_return.s
index 98ac59de..ed7165df 100644
--- a/ports/cortex_m7/ac5/src/tx_thread_system_return.s
+++ b/ports/cortex_m7/ac5/src/tx_thread_system_return.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* CALLED BY */
/* */
/* ThreadX components */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m7/ac5/src/tx_timer_interrupt.s b/ports/cortex_m7/ac5/src/tx_timer_interrupt.s
index ea6286b8..f2393840 100644
--- a/ports/cortex_m7/ac5/src/tx_timer_interrupt.s
+++ b/ports/cortex_m7/ac5/src/tx_timer_interrupt.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,18 +72,6 @@
/* CALLED BY */
/* */
/* interrupt vector */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comment(s), added */
-/* TX_NO_TIMER support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m7/ac6/example_build/sample_threadx/.cproject b/ports/cortex_m7/ac6/example_build/sample_threadx/.cproject
index c131df5e..f3357354 100644
--- a/ports/cortex_m7/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_m7/ac6/example_build/sample_threadx/.cproject
@@ -1,170 +1,170 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_m7/ac6/example_build/sample_threadx/exceptions.c b/ports/cortex_m7/ac6/example_build/sample_threadx/exceptions.c
index 94c87d7a..f0dd8600 100644
--- a/ports/cortex_m7/ac6/example_build/sample_threadx/exceptions.c
+++ b/ports/cortex_m7/ac6/example_build/sample_threadx/exceptions.c
@@ -1,7 +1,7 @@
/*
** Copyright (c) 2006-2017 Arm Limited (or its affiliates). All rights reserved.
** Use, modification and redistribution of this file is subject to your possession of a
-** valid End User License Agreement for the Arm Product of which these examples are part of
+** valid End User License Agreement for the Arm Product of which these examples are part of
** and your compliance with all applicable terms and conditions of such licence agreement.
*/
diff --git a/ports/cortex_m7/ac6/example_build/sample_threadx/sample_threadx.c b/ports/cortex_m7/ac6/example_build/sample_threadx/sample_threadx.c
index 597f373c..13ffadba 100644
--- a/ports/cortex_m7/ac6/example_build/sample_threadx/sample_threadx.c
+++ b/ports/cortex_m7/ac6/example_build/sample_threadx/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -81,42 +81,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -124,23 +124,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -243,11 +243,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -306,7 +306,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -359,7 +359,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m7/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_m7/ac6/example_build/sample_threadx/sample_threadx.scat
index 8b4bb5bd..8be90bfd 100644
--- a/ports/cortex_m7/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_m7/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -1,7 +1,7 @@
;*******************************************************
; Copyright (c) 2006-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;*******************************************************
diff --git a/ports/cortex_m7/ac6/example_build/sample_threadx/tx_initialize_low_level.S b/ports/cortex_m7/ac6/example_build/sample_threadx/tx_initialize_low_level.S
index ae298a34..11525a95 100644
--- a/ports/cortex_m7/ac6/example_build/sample_threadx/tx_initialize_low_level.S
+++ b/ports/cortex_m7/ac6/example_build/sample_threadx/tx_initialize_low_level.S
@@ -1,10 +1,10 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@@ -75,12 +75,6 @@ SYSTICK_CYCLES = ((SYSTEM_CLOCK / 100) -1)
@/* */
@/* _tx_initialize_kernel_enter ThreadX entry function */
@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
-@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-@/* */
@/**************************************************************************/
@VOID _tx_initialize_low_level(VOID)
@{
diff --git a/ports/cortex_m7/ac6/example_build/tx/.cproject b/ports/cortex_m7/ac6/example_build/tx/.cproject
index 7593891a..5cd65b69 100644
--- a/ports/cortex_m7/ac6/example_build/tx/.cproject
+++ b/ports/cortex_m7/ac6/example_build/tx/.cproject
@@ -1,146 +1,146 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_m7/ac6/inc/tx_port.h b/ports/cortex_m7/ac6/inc/tx_port.h
index 0963380f..d3b3bb01 100644
--- a/ports/cortex_m7/ac6/inc/tx_port.h
+++ b/ports/cortex_m7/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,23 +46,6 @@
/* This file replaces the previous Cortex-M3/M4/M7 files. It unifies */
/* the ARMv7-M architecture and compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comments, updated */
-/* typedef to fix misra */
-/* violation, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -371,7 +355,7 @@ void _tx_vfp_access(void);
/* A thread can be terminated by another thread, so we first check if it's self-terminating and not in an ISR.
If so, deactivate the FPU via CONTROL.FPCA. Otherwise we are in an interrupt or another thread is terminating
- this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
+ this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
the lazy FPU save, then restore the CONTROL.FPCA state. */
#ifndef TX_MISRA_ENABLE
@@ -530,7 +514,7 @@ ULONG _tx_misra_ipsr_get(VOID);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) (b) = (UINT) __clz(__rbit((m)));
#elif defined(__GNUC__) /* GCC and AC6 Compiler */
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) __asm__ volatile (" RBIT %0,%1 ": "=r" (m) : "r" (m) ); \
- __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
+ __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
#endif
@@ -715,7 +699,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M7/AC6 Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M7/AC6 Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m7/ac6/readme_threadx.txt b/ports/cortex_m7/ac6/readme_threadx.txt
index d98c90cb..6447c517 100644
--- a/ports/cortex_m7/ac6/readme_threadx.txt
+++ b/ports/cortex_m7/ac6/readme_threadx.txt
@@ -5,12 +5,12 @@
1. Building the ThreadX run-time Library
-In order to build the ThreadX library and the ThreadX demonstration, first import
-the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
+In order to build the ThreadX library and the ThreadX demonstration, first import
+the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
into your DS workspace.
-Building the ThreadX library is easy; simply right-click the Eclipse project
-"tx" and then select the "Build Project" button. You should now observe the compilation
+Building the ThreadX library is easy; simply right-click the Eclipse project
+"tx" and then select the "Build Project" button. You should now observe the compilation
and assembly of the ThreadX library. This project build produces the ThreadX
library file tx.a.
@@ -20,27 +20,27 @@ library file tx.a.
The ThreadX demonstration is designed to execute under the DS debugger on the
MPS2_Cortex_Mx Bare Metal simulator.
-Building the demonstration is easy; simply right-click the Eclipse project
-"sample_threadx" and then select the "Build Project" button. You should now observe
-the compilation and assembly of the ThreadX demonstration. This project build produces
-the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
+Building the demonstration is easy; simply right-click the Eclipse project
+"sample_threadx" and then select the "Build Project" button. You should now observe
+the compilation and assembly of the ThreadX demonstration. This project build produces
+the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
in the Project Explorer window, right-click on the 'cortex-mx_tx.launch' file, click
'Debug As', and then click 'cortex-mx_tx' from the submenu. This will cause the
-debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
+debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
to execute the ThreadX demonstration.
3. System Initialization
-The entry point in ThreadX for the Cortex-M using AC6 tools uses the standard GNU
+The entry point in ThreadX for the Cortex-M using AC6 tools uses the standard GNU
Cortex-M reset sequence. From the reset vector the C runtime will be initialized.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.S file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -49,7 +49,7 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -132,34 +132,34 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
6.1 Vector Area
The Cortex-M vectors start at the label __tx_vectors or similar. The application may modify
-the vector area according to its needs. There is code in tx_initialize_low_level() that will
-configure the vector base register.
+the vector area according to its needs. There is code in tx_initialize_low_level() that will
+configure the vector base register.
6.2 Managed Interrupts
-A ThreadX managed interrupt is defined below. By following these conventions, the
+A ThreadX managed interrupt is defined below. By following these conventions, the
application ISR is then allowed access to various ThreadX services from the ISR.
Here is the standard template for managed ISRs in ThreadX:
@@ -181,15 +181,15 @@ __tx_IntHandler:
Note: the Cortex-M requires exception handlers to be thumb labels, this implies bit 0 set.
To accomplish this, the declaration of the label has to be preceded by the assembler directive
-.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
-be inserted in the correct location in the interrupt vector table. This table is typically
+.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
+be inserted in the correct location in the interrupt vector table. This table is typically
located in either your runtime startup file or in the tx_initialize_low_level.S file.
7. FPU Support
-ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context - no additional setup by the application.
diff --git a/ports/cortex_m7/ac6/src/tx_misra.S b/ports/cortex_m7/ac6/src/tx_misra.S
index 8ac0c629..10548671 100644
--- a/ports/cortex_m7/ac6/src/tx_misra.S
+++ b/ports/cortex_m7/ac6/src/tx_misra.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -667,7 +668,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -682,7 +683,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARM_FP
/***********************************************************************************************/
@@ -699,8 +700,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -714,9 +715,9 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
+
.data
.word 0
diff --git a/ports/cortex_m7/ac6/src/tx_thread_context_restore.S b/ports/cortex_m7/ac6/src/tx_thread_context_restore.S
index 003bf20d..9ecbaa0c 100644
--- a/ports/cortex_m7/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_m7/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m7/ac6/src/tx_thread_context_save.S b/ports/cortex_m7/ac6/src/tx_thread_context_save.S
index a88957cc..1fab2a9b 100644
--- a/ports/cortex_m7/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_m7/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,14 +61,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m7/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_m7/ac6/src/tx_thread_interrupt_control.S
index ddd46eb5..a10c760a 100644
--- a/ports/cortex_m7/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_m7/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m7/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_m7/ac6/src/tx_thread_interrupt_disable.S
index f58e63d0..ea8bfd4d 100644
--- a/ports/cortex_m7/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_m7/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m7/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_m7/ac6/src/tx_thread_interrupt_restore.S
index d195b3ff..7ea62177 100644
--- a/ports/cortex_m7/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_m7/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m7/ac6/src/tx_thread_schedule.S b/ports/cortex_m7/ac6/src/tx_thread_schedule.S
index d9d202ae..e411198e 100644
--- a/ports/cortex_m7/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_m7/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,16 +71,6 @@
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
diff --git a/ports/cortex_m7/ac6/src/tx_thread_stack_build.S b/ports/cortex_m7/ac6/src/tx_thread_stack_build.S
index fd1aa689..0fd0dc46 100644
--- a/ports/cortex_m7/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_m7/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m7/ac6/src/tx_thread_system_return.S b/ports/cortex_m7/ac6/src/tx_thread_system_return.S
index 57262ceb..831c00e4 100644
--- a/ports/cortex_m7/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_m7/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m7/ac6/src/tx_timer_interrupt.S b/ports/cortex_m7/ac6/src/tx_timer_interrupt.S
index 86f2a7f3..a2f1a438 100644
--- a/ports/cortex_m7/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_m7/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,17 +71,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comment(s), added */
-/* TX_NO_TIMER support, */
-/* resulting in version 6.1.10 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m7/ghs/example_build/sample_threadx.c b/ports/cortex_m7/ghs/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/cortex_m7/ghs/example_build/sample_threadx.c
+++ b/ports/cortex_m7/ghs/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m7/ghs/example_build/tx_initialize_low_level.arm b/ports/cortex_m7/ghs/example_build/tx_initialize_low_level.arm
index d71a73db..57c964b3 100644
--- a/ports/cortex_m7/ghs/example_build/tx_initialize_low_level.arm
+++ b/ports/cortex_m7/ghs/example_build/tx_initialize_low_level.arm
@@ -1,18 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Initialize */
/** */
@@ -24,42 +24,42 @@
.text
.align 4
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_initialize_low_level Cortex-M7/GHS */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_initialize_low_level Cortex-M7/GHS */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function is responsible for any low-level processor */
-/* initialization, including setting up interrupt vectors, setting */
-/* up a periodic timer interrupt source, saving the system stack */
-/* pointer for use in ISR processing later, and finding the first */
-/* available RAM memory address for tx_application_define. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_initialize_kernel_enter ThreadX entry function */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* */
+/* This function is responsible for any low-level processor */
+/* initialization, including setting up interrupt vectors, setting */
+/* up a periodic timer interrupt source, saving the system stack */
+/* pointer for use in ISR processing later, and finding the first */
+/* available RAM memory address for tx_application_define. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_initialize_kernel_enter ThreadX entry function */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -71,7 +71,7 @@
_tx_initialize_low_level:
/* Disable interrupts. */
-
+
CPSID i ; Disable interrupts
@@ -79,7 +79,7 @@ _tx_initialize_low_level:
/* _tx_thread_system_stack_ptr = (VOID_PTR) (sp); */
LDR r1,=_tx_thread_system_stack_ptr ; Pickup address of system stack ptr
- STR sp, [r1] ; Save system stack
+ STR sp, [r1] ; Save system stack
/* Save the first available memory address. */
@@ -95,14 +95,14 @@ _tx_initialize_low_level:
LDR r0, =0xE0001000 ; Build address of DWT register
LDR r1, [r0] ; Pickup the current value
ORR r1, r1, 1 ; Set the CYCCNTENA bit
- STR r1, [r0] ; Enable the cycle count register
+ STR r1, [r0] ; Enable the cycle count register
/* Setup Vector Table Offset Register. */
-
+
MOV r0, 0xE000E000 ; Build address of NVIC registers
LDR r1, =__vectors ; Pickup address of vector table
- STR r1, [r0, 0xD08] ; Set vector table address
+ STR r1, [r0, 0xD08] ; Set vector table address
/* Configure SysTick for 100Hz clock, or 16384 cycles if no reference. */
@@ -134,7 +134,7 @@ _tx_initialize_low_level:
#endif
/* Return to caller. */
-
+
BX lr ; Return to caller
.type _tx_initialize_low_level,$function
@@ -145,7 +145,7 @@ _tx_initialize_low_level:
/* Define shells for each of the interrupt vectors. */
.globl __tx_BadHandler
-__tx_BadHandler:
+__tx_BadHandler:
B __tx_BadHandler
.type __tx_BadHandler,$function
@@ -161,7 +161,7 @@ __tx_IntHandler:
MOV r0, 0 ; Build interrupt code
BL _tx_el_interrupt ; Call interrupt event logging
#endif
-
+
; /* Do interrupt handler work here */
; /* .... */
@@ -199,7 +199,7 @@ __tx_SysTickHandler:
.size __tx_SysTickHandler,.-__tx_SysTickHandler
- .globl __tx_NMIHandler
+ .globl __tx_NMIHandler
__tx_NMIHandler:
B __tx_NMIHandler
@@ -220,7 +220,7 @@ __tx_SVCallHandler:
B __tx_SVCallHandler
.type __tx_SVCallHandler,$function
- .size __tx_SVCallHandler,.-__tx_SVCallHandler
+ .size __tx_SVCallHandler,.-__tx_SVCallHandler
/* Reference build options and version ID to ensure they come in. */
diff --git a/ports/cortex_m7/ghs/inc/tx_el.h b/ports/cortex_m7/ghs/inc/tx_el.h
index 4662f241..72e5bbe3 100644
--- a/ports/cortex_m7/ghs/inc/tx_el.h
+++ b/ports/cortex_m7/ghs/inc/tx_el.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** ThreadX/GHS Event Log (EL) */
@@ -20,27 +21,21 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* COMPONENT DEFINITION RELEASE */
-/* */
-/* tx_el.h PORTABLE C/GHS */
+/**************************************************************************/
+/* */
+/* COMPONENT DEFINITION RELEASE */
+/* */
+/* tx_el.h PORTABLE C/GHS */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file defines the ThreadX event log functions for the GHS MULTI */
-/* EventAnalyzer. It is assumed that tx_api.h and tx_port.h have */
-/* already been included. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This file defines the ThreadX event log functions for the GHS MULTI */
+/* EventAnalyzer. It is assumed that tx_api.h and tx_port.h have */
+/* already been included. */
/* */
/**************************************************************************/
@@ -53,16 +48,16 @@
#define TX_EL_VERSION_ID 2 /* Event log version ID */
#define TX_EL_HEADER_SIZE 24 /* Event log header size */
#define TX_EL_TNIS 16 /* Number of thread names supported */
- /* If the application needs to */
- /* track more thread names, just */
- /* increase this number and re- */
- /* build the ThreadX library. */
+ /* If the application needs to */
+ /* track more thread names, just */
+ /* increase this number and re- */
+ /* build the ThreadX library. */
#define TX_EL_TNI_ENTRY_SIZE 44 /* Thread name entries are 44 bytes */
#define TX_EL_TNI_NAME_SIZE 34 /* Thread name size in TNI */
#define TX_EL_NO_MORE_TNI_ROOM 1 /* Error return from thread register*/
-#define TX_EL_NAME_NOT_FOUND 2 /* Error return from un-register */
+#define TX_EL_NAME_NOT_FOUND 2 /* Error return from un-register */
#define TX_EL_EVENT_SIZE 32 /* Number of bytes in each event */
-#define TX_EL_VALID_ENTRY 1 /* Valid log entry */
+#define TX_EL_VALID_ENTRY 1 /* Valid log entry */
#define TX_EL_INVALID_ENTRY 0 /* Invalid log entry */
@@ -295,7 +290,7 @@
/* Define filter macros that are inserted in-line with the other macros below. */
-#ifdef TX_ENABLE_EVENT_FILTERS
+#ifdef TX_ENABLE_EVENT_FILTERS
#define TX_EL_NO_STATUS_EVENTS if (!(_tx_el_event_filter & TX_EL_FILTER_STATUS_CHANGE)) {
#define TX_EL_NO_INTERRUPT_EVENTS if (!(_tx_el_event_filter & TX_EL_FILTER_INTERRUPTS)) {
#define TX_EL_NO_THREAD_EVENTS if (!(_tx_el_event_filter & TX_EL_FILTER_THREAD_CALLS)) {
@@ -430,7 +425,7 @@ extern ULONG _tx_el_time_base_lower;
VOID _tx_el_initialize(VOID);
UINT _tx_el_thread_register(TX_THREAD *thread_ptr);
UINT _tx_el_thread_unregister(TX_THREAD *thread_ptr);
-VOID _tx_el_user_event_insert(UINT sub_type, ULONG info_1, ULONG info_2,
+VOID _tx_el_user_event_insert(UINT sub_type, ULONG info_1, ULONG info_2,
ULONG info_3, ULONG info_4);
VOID _tx_el_thread_running(TX_THREAD *thread_ptr);
VOID _tx_el_thread_preempted(TX_THREAD *thread_ptr);
@@ -747,7 +742,7 @@ VOID _tx_el_event_filter_set(UINT filter);
#define TX_EL_THREAD_UNREGISTER(a) \
_tx_el_thread_unregister(a);
#define TX_EL_INITIALIZE _tx_el_initialize();
-#endif
+#endif
#else
#define TX_EL_KERNEL_CALL_EVENT_INSERT_INFO4(a, b, c, d, e)
#define TX_EL_KERNEL_CALL_EVENT_INSERT_INFO3(a, b, c, d)
diff --git a/ports/cortex_m7/ghs/inc/tx_port.h b/ports/cortex_m7/ghs/inc/tx_port.h
index c1a8d1f7..aabf714e 100644
--- a/ports/cortex_m7/ghs/inc/tx_port.h
+++ b/ports/cortex_m7/ghs/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -61,7 +53,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -112,7 +104,7 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
+#ifndef TX_TIMER_THREAD_PRIORITY
#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
@@ -123,8 +115,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0 /* Enable interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -133,7 +125,7 @@ typedef unsigned short USHORT;
*/
#ifndef TX_TRACE_TIME_SOURCE
-#define TX_TRACE_TIME_SOURCE *((ULONG *) 0xE0001004)
+#define TX_TRACE_TIME_SOURCE *((ULONG *) 0xE0001004)
#endif
#ifndef TX_TRACE_TIME_MASK
#define TX_TRACE_TIME_MASK 0xFFFFFFFFUL
@@ -145,13 +137,13 @@ typedef unsigned short USHORT;
/* Define the number of ticks per second. This informs the EventAnalyzer what the timestamps
represent. By default, this is set to 1,000,000 i.e., one tick every microsecond. */
-#define TX_EL_TICKS_PER_SECOND 1000000
+#define TX_EL_TICKS_PER_SECOND 1000000
/* Define the method of how to get the upper and lower 32-bits of the time stamp. By default, simply
- simulate the time-stamp source with a counter. */
+ simulate the time-stamp source with a counter. */
-#define read_tbu() _tx_el_time_base_upper
-#define read_tbl() ++_tx_el_time_base_lower
+#define read_tbu() _tx_el_time_base_upper
+#define read_tbl() ++_tx_el_time_base_lower
/* Define the port specific options for the _tx_build_options variable. This variable indicates
@@ -167,7 +159,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -179,19 +171,19 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#define TX_THREAD_EXTENSION_2 VOID * tx_thread_eh_globals; \
int Errno; /* errno. */ \
char * strtok_saved_pos; /* strtok() position. */
#ifndef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
#else
#define TX_THREAD_EXTENSION_3 unsigned long long tx_thread_execution_time_total; \
- unsigned long long tx_thread_execution_time_last_start;
+ unsigned long long tx_thread_execution_time_last_start;
#endif
@@ -206,11 +198,11 @@ typedef unsigned short USHORT;
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -240,7 +232,7 @@ typedef unsigned short USHORT;
extern void __tx_cpp_exception_cleanup(TX_THREAD *thread_ptr); \
__tx_cpp_exception_cleanup(thread_ptr); \
}
-#else
+#else
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) \
{ \
#pragma weak __cpp_exception_cleanup \
@@ -279,7 +271,7 @@ typedef unsigned short USHORT;
/* Define the get system state macro. */
-
+
#ifndef TX_THREAD_GET_SYSTEM_STATE
#define TX_THREAD_GET_SYSTEM_STATE() (_tx_thread_system_state | __MRS(__IPSR))
#endif
@@ -291,32 +283,32 @@ typedef unsigned short USHORT;
zero after initialization for Cortex-M ports. */
#ifndef TX_THREAD_SYSTEM_RETURN_CHECK
-#define TX_THREAD_SYSTEM_RETURN_CHECK(c) (c) = ((ULONG) _tx_thread_preempt_disable);
+#define TX_THREAD_SYSTEM_RETURN_CHECK(c) (c) = ((ULONG) _tx_thread_preempt_disable);
#endif
-/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
+/* Define the macro to ensure _tx_thread_preempt_disable is set early in initialization in order to
prevent early scheduling on Cortex-M parts. */
-
+
#define TX_PORT_SPECIFIC_POST_INITIALIZATION _tx_thread_preempt_disable++;
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef TX_DISABLE_INLINE
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = __CLZ32(m); \
- b = 31 - b;
+ b = 31 - b;
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -386,7 +378,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M7/GHS Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M7/GHS Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_m7/ghs/readme_threadx.txt b/ports/cortex_m7/ghs/readme_threadx.txt
index 22466c4e..f494875f 100644
--- a/ports/cortex_m7/ghs/readme_threadx.txt
+++ b/ports/cortex_m7/ghs/readme_threadx.txt
@@ -4,16 +4,16 @@
1. Open the ThreadX Project Workspace
-In order to build the ThreadX library and the ThreadX demonstration first load
-the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
-"example_build" directory.
+In order to build the ThreadX library and the ThreadX demonstration first load
+the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
+"example_build" directory.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply select the MULTI project file
-tx.gpj and then select the build button. You should now observe the
-compilation and assembly of the ThreadX library. This project build produces
+Building the ThreadX library is easy; simply select the MULTI project file
+tx.gpj and then select the build button. You should now observe the
+compilation and assembly of the ThreadX library. This project build produces
the ThreadX library file tx.a.
@@ -21,52 +21,52 @@ the ThreadX library file tx.a.
The ThreadX demonstration is designed to execute under the MULTI environment
on the Green Hills Cortex-M7 simulator. The instructions that follow describe
-how to get the ThreadX evaluation running under the MULTI Cortex-M7 simulation
+how to get the ThreadX evaluation running under the MULTI Cortex-M7 simulation
environment.
-Building the demonstration is easy; simply select the MULTI project file
-sample_threadx.gpj. At this point, select the "Project Build" button and observe
-the compilation, assembly, and linkage of the ThreadX demonstration application.
+Building the demonstration is easy; simply select the MULTI project file
+sample_threadx.gpj. At this point, select the "Project Build" button and observe
+the compilation, assembly, and linkage of the ThreadX demonstration application.
-After the demonstration is built, invoke the MULTI ARM simulator by selecting
-the simulator connection from within the sample_threadx.con connection file.
-Once connected to the simulator, select the "Debug" button. You should now
-observe the main function of sample_threadx.c.
+After the demonstration is built, invoke the MULTI ARM simulator by selecting
+the simulator connection from within the sample_threadx.con connection file.
+Once connected to the simulator, select the "Debug" button. You should now
+observe the main function of sample_threadx.c.
-You are now ready to execute the ThreadX demonstration system. Select
-breakpoints and data watches to observe the execution of the sample_threadx.c
+You are now ready to execute the ThreadX demonstration system. Select
+breakpoints and data watches to observe the execution of the sample_threadx.c
application.
4. EventAnalyzer Demonstration
-To build a demonstration system that also logs events for the MULTI EventAnalyzer,
-perform the same steps as the regular demo, except build the ThreadX library with
-txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
-The resulting image will log all system events, which can then be displayed by the
+To build a demonstration system that also logs events for the MULTI EventAnalyzer,
+perform the same steps as the regular demo, except build the ThreadX library with
+txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
+The resulting image will log all system events, which can then be displayed by the
MULTI EventAnalyzer.
5. System Initialization
-The system entry point using the Green Hills tools is at the label _start.
-This is defined within the crt0.arm file supplied by Green Hills. In addition,
-this is where all static and global preset C variable initialization
+The system entry point using the Green Hills tools is at the label _start.
+This is defined within the crt0.arm file supplied by Green Hills. In addition,
+this is where all static and global preset C variable initialization
processing is called from.
After the Green Hills startup function returns, ThreadX initialization is
called. The main initialization function is _tx_initialize_low_level and
-is located in the file tx_initialize_low_level.arm. This function is responsible
-for setting up various system data structures, interrupt vectors, and the
+is located in the file tx_initialize_low_level.arm. This function is responsible
+for setting up various system data structures, interrupt vectors, and the
periodic timer interrupt source of ThreadX.
-In addition, _tx_initialize_low_level determines where the first available
+In addition, _tx_initialize_low_level determines where the first available
RAM memory address is located. This address is supplied to tx_application_define.
-By default, the first available RAM memory address is assumed to start at the
-beginning of the ThreadX section .free_mem. If changes are made to the
-sample_threadx.ld file, the .free_mem section should remain the last allocated
-section in the main RAM area. The starting address of this section is passed
+By default, the first available RAM memory address is assumed to start at the
+beginning of the ThreadX section .free_mem. If changes are made to the
+sample_threadx.ld file, the .free_mem section should remain the last allocated
+section in the main RAM area. The starting address of this section is passed
to tx_application_define.
@@ -75,7 +75,7 @@ to tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M7 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
@@ -159,21 +159,21 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
7. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make ThreadX run faster, you can change the tx.gpj project
-to disable debug information and enable the desired optimizations.
+to disable debug information and enable the desired optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined before tx_api.h is included.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined before tx_api.h is included.
8. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M7
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
@@ -185,7 +185,7 @@ the vector area according to its needs.
8.2 Managed Interrupts
-A ThreadX managed interrupt is defined below. By following these conventions, the
+A ThreadX managed interrupt is defined below. By following these conventions, the
application ISR is then allowed access to various ThreadX services from the ISR.
Here is the standard template for managed ISRs in ThreadX:
@@ -194,7 +194,7 @@ Here is the standard template for managed ISRs in ThreadX:
__tx_IntHandler:
PUSH {lr}
BL _tx_thread_context_save
-
+
/* Do interrupt handler work here */
B _tx_thread_context_restore
@@ -204,7 +204,7 @@ __tx_IntHandler:
By default, FPU support is disabled for each thread. If saving the context of the FPU registers
is needed, the ThreadX library should be re-built with TX_ENABLE_FPU_SUPPORT defined. In addition,
-the following API call must be made from the context of the application thread - before
+the following API call must be made from the context of the application thread - before
the FPU usage:
void tx_thread_fpu_enable(void);
@@ -231,7 +231,7 @@ information associated with this specific port of ThreadX:
03-02-2021 The following files were changed/added for version 6.1.5:
tx_thread_schedule.s Added low power feature
-05/19/2020 Initial ThreadX version of Cortex-M7/Green Hills port.
+05/19/2020 Initial ThreadX version of Cortex-M7/Green Hills port.
Copyright(c) 1996-2020 Microsoft Corporation
diff --git a/ports/cortex_m7/ghs/src/tx_el.c b/ports/cortex_m7/ghs/src/tx_el.c
index fd58768f..b5d3b8b7 100644
--- a/ports/cortex_m7/ghs/src/tx_el.c
+++ b/ports/cortex_m7/ghs/src/tx_el.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** ThreadX/GHS Event Log (EL) */
/** */
@@ -49,44 +50,38 @@ extern TX_THREAD *_tx_thread_current_ptr;
UINT _tx_thread_interrupt_control(UINT new_posture);
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_initialize PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_initialize PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function creates the Event Log (in the format dictated by the */
-/* GHS Event Analyzer) and sets up various information for subsequent */
-/* operation. The start and end of the Event Log is determined by the */
-/* .eventlog section in the linker control file. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function creates the Event Log (in the format dictated by the */
+/* GHS Event Analyzer) and sets up various information for subsequent */
+/* operation. The start and end of the Event Log is determined by the */
+/* .eventlog section in the linker control file. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
/* */
/**************************************************************************/
VOID _tx_el_initialize(VOID)
@@ -150,7 +145,7 @@ UINT i;
/* Setup event_ptr (pointer to oldest event) field to the start
of the event pool. */
- *_tx_el_current_event = (UCHAR *) (((ULONG) __ghsbegin_eventlog) + TX_EL_HEADER_SIZE +
+ *_tx_el_current_event = (UCHAR *) (((ULONG) __ghsbegin_eventlog) + TX_EL_HEADER_SIZE +
(TX_EL_TNIS * TX_EL_TNI_ENTRY_SIZE));
work_ptr = work_ptr + sizeof(ULONG);
@@ -166,17 +161,17 @@ UINT i;
/* Clear the entire TNI array, this is the initial setting. */
end_ptr = work_ptr + (TX_EL_TNIS * TX_EL_TNI_ENTRY_SIZE);
memset((void *)work_ptr, 0, (TX_EL_TNIS * TX_EL_TNI_ENTRY_SIZE));
- work_ptr = end_ptr;
+ work_ptr = end_ptr;
/* At this point, we are pointing at the actual Event Entry area. */
-
+
/* Remember the start of the actual event log area. */
_tx_el_event_area_start = work_ptr;
/* Clear the entire Event area. */
end_ptr = work_ptr + event_log_size;
memset((void *)work_ptr, 0, event_log_size);
- work_ptr = end_ptr;
+ work_ptr = end_ptr;
/* Save the end pointer for later use. */
_tx_el_event_area_end = work_ptr;
@@ -201,7 +196,7 @@ UINT i;
{
/* Yes, insert a NULL into the event log string. */
- *work_ptr = (unsigned char) 0;
+ *work_ptr = (unsigned char) 0;
}
/* Setup the thread ID to NULL. */
@@ -216,40 +211,40 @@ UINT i;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_thread_register PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_thread_register PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function registers a thread in the event log for future */
+/* */
+/* This function registers a thread in the event log for future */
/* display purposes. */
-/* */
-/* INPUT */
-/* */
-/* thread_ptr Pointer to thread control block */
-/* */
-/* OUTPUT */
-/* */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread control block */
+/* */
+/* OUTPUT */
+/* */
/* TX_SUCCESS Thread was placed in TNI area */
/* TX_ERROR No more room in the TNI area */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_thread_create ThreadX thread create function */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_thread_create ThreadX thread create function */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -278,7 +273,7 @@ UINT i;
i++;
entry_ptr = entry_ptr + TX_EL_TNI_ENTRY_SIZE;
}
-
+
/* Check to see if there were no more valid entries. */
if (i >= TX_EL_TNIS)
return(TX_EL_NO_MORE_TNI_ROOM);
@@ -304,7 +299,7 @@ UINT i;
{
/* Yes, insert a NULL into the event log string. */
- *work_ptr = (unsigned char) 0;
+ *work_ptr = (unsigned char) 0;
}
/* Setup the thread ID. */
@@ -321,40 +316,40 @@ UINT i;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_thread_unregister PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_thread_unregister PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function unregisters a thread in the event log for future */
+/* */
+/* This function unregisters a thread in the event log for future */
/* display purposes. */
-/* */
-/* INPUT */
-/* */
-/* thread_ptr Pointer to thread control block */
-/* */
-/* OUTPUT */
-/* */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread control block */
+/* */
+/* OUTPUT */
+/* */
/* TX_SUCCESS Thread was placed in TNI area */
/* TX_ERROR No more room in the TNI area */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_thread_create ThreadX thread create function */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_thread_create ThreadX thread create function */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -394,7 +389,7 @@ UINT i, j;
}
else if (*work_ptr == 0)
{
-
+
/* Null terminated, just break the loop. */
break;
}
@@ -426,7 +421,7 @@ UINT i, j;
i++;
entry_ptr = entry_ptr + TX_EL_TNI_ENTRY_SIZE;
}
-
+
/* Determine status to return. */
if (found)
return(TX_SUCCESS);
@@ -435,49 +430,49 @@ UINT i, j;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_user_event_insert PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_user_event_insert PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function inserts a user event into the event log. */
-/* If the event log is full, the oldest event is overwritten. */
-/* */
-/* INPUT */
-/* */
+/* If the event log is full, the oldest event is overwritten. */
+/* */
+/* INPUT */
+/* */
/* sub_type Event subtype for kernel call */
/* info_1 First information field */
/* info_2 Second information field */
/* info_3 Third information field */
/* info_4 Fourth information field */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* ThreadX services */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* ThreadX services */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* */
/**************************************************************************/
-VOID _tx_el_user_event_insert(UINT sub_type, ULONG info_1, ULONG info_2,
+VOID _tx_el_user_event_insert(UINT sub_type, ULONG info_1, ULONG info_2,
ULONG info_3, ULONG info_4)
{
@@ -545,7 +540,7 @@ UCHAR *entry_ptr;
if (entry_ptr >= _tx_el_event_area_end)
{
- /* Yes, we have wrapped around to the end of the event area.
+ /* Yes, we have wrapped around to the end of the event area.
Start back at the top! */
entry_ptr = _tx_el_event_area_start;
}
@@ -558,41 +553,41 @@ UCHAR *entry_ptr;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_thread_running PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_thread_running PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function inserts a thread change event into the event */
/* log, which indicates that a context switch is taking place. */
/* If the event log is full, the oldest event is overwritten. */
-/* */
-/* INPUT */
-/* */
+/* */
+/* INPUT */
+/* */
/* thread_ptr Pointer to thread being */
/* scheduled */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_thread_schedule ThreadX scheduler */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_thread_schedule ThreadX scheduler */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -604,7 +599,7 @@ VOID _tx_el_thread_running(TX_THREAD *thread_ptr)
UINT upper_tb;
UCHAR *entry_ptr;
- TX_EL_NO_STATUS_EVENTS
+ TX_EL_NO_STATUS_EVENTS
/* Increment total event counter. */
_tx_el_total_events++;
@@ -646,7 +641,7 @@ UCHAR *entry_ptr;
if (entry_ptr >= _tx_el_event_area_end)
{
- /* Yes, we have wrapped around to the end of the event area.
+ /* Yes, we have wrapped around to the end of the event area.
Start back at the top! */
entry_ptr = _tx_el_event_area_start;
}
@@ -658,43 +653,43 @@ UCHAR *entry_ptr;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_thread_preempted PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_thread_preempted PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function inserts a thread preempted event into the event */
/* log, which indicates that an interrupt occurred that made a higher */
/* priority thread ready for execution. In this case, the previously */
/* executing thread has an event entered to indicate it is no longer */
/* running. */
-/* */
-/* INPUT */
-/* */
+/* */
+/* INPUT */
+/* */
/* thread_ptr Pointer to thread being */
/* scheduled */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_thread_context_restore ThreadX context restore */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_thread_context_restore ThreadX context restore */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -707,7 +702,7 @@ UINT upper_tb;
UCHAR *entry_ptr;
- TX_EL_NO_STATUS_EVENTS
+ TX_EL_NO_STATUS_EVENTS
/* Increment total event counter. */
_tx_el_total_events++;
@@ -749,7 +744,7 @@ UCHAR *entry_ptr;
if (entry_ptr >= _tx_el_event_area_end)
{
- /* Yes, we have wrapped around to the end of the event area.
+ /* Yes, we have wrapped around to the end of the event area.
Start back at the top! */
entry_ptr = _tx_el_event_area_start;
}
@@ -761,40 +756,40 @@ UCHAR *entry_ptr;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_interrupt PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_interrupt PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function inserts an interrupt event into the log, which */
/* indicates the start of interrupt processing for the specific */
-/* */
-/* INPUT */
-/* */
+/* */
+/* INPUT */
+/* */
/* interrupt_number Interrupt number supplied by */
/* ISR */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* ISR processing */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* ISR processing */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -807,7 +802,7 @@ UINT upper_tb;
UCHAR *entry_ptr;
- TX_EL_NO_INTERRUPT_EVENTS
+ TX_EL_NO_INTERRUPT_EVENTS
/* Increment total event counter. */
_tx_el_total_events++;
@@ -853,7 +848,7 @@ UCHAR *entry_ptr;
if (entry_ptr >= _tx_el_event_area_end)
{
- /* Yes, we have wrapped around to the end of the event area.
+ /* Yes, we have wrapped around to the end of the event area.
Start back at the top! */
entry_ptr = _tx_el_event_area_start;
}
@@ -865,40 +860,40 @@ UCHAR *entry_ptr;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_interrupt_end PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_interrupt_end PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function inserts an interrupt end event into the log, which */
/* indicates the end of interrupt processing for the specific */
-/* */
-/* INPUT */
-/* */
+/* */
+/* INPUT */
+/* */
/* interrupt_number Interrupt number supplied by */
/* ISR */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* ISR processing */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* ISR processing */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -911,7 +906,7 @@ UINT upper_tb;
UCHAR *entry_ptr;
- TX_EL_NO_INTERRUPT_EVENTS
+ TX_EL_NO_INTERRUPT_EVENTS
/* Increment total event counter. */
_tx_el_total_events++;
@@ -957,7 +952,7 @@ UCHAR *entry_ptr;
if (entry_ptr >= _tx_el_event_area_end)
{
- /* Yes, we have wrapped around to the end of the event area.
+ /* Yes, we have wrapped around to the end of the event area.
Start back at the top! */
entry_ptr = _tx_el_event_area_start;
}
@@ -969,39 +964,39 @@ UCHAR *entry_ptr;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_interrupt_control PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_interrupt_control PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function remaps the tx_interrupt_control service call so that */
-/* it can be tracked in the event log. */
-/* */
-/* INPUT */
-/* */
+/* */
+/* This function remaps the tx_interrupt_control service call so that */
+/* it can be tracked in the event log. */
+/* */
+/* INPUT */
+/* */
/* new_posture New interrupt posture */
/* */
-/* OUTPUT */
-/* */
-/* old_posture Old interrupt posture */
-/* */
-/* CALLS */
-/* */
-/* _tx_thread_interrupt_control Interrupt control service */
-/* */
-/* CALLED BY */
-/* */
-/* ThreadX services */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* OUTPUT */
+/* */
+/* old_posture Old interrupt posture */
+/* */
+/* CALLS */
+/* */
+/* _tx_thread_interrupt_control Interrupt control service */
+/* */
+/* CALLED BY */
+/* */
+/* ThreadX services */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -1014,7 +1009,7 @@ TX_INTERRUPT_SAVE_AREA
UINT old_posture;
- TX_EL_NO_INTERRUPT_EVENTS
+ TX_EL_NO_INTERRUPT_EVENTS
TX_DISABLE
TX_EL_KERNEL_CALL_EVENT_INSERT_INFO2(TX_EL_INTERRUPT_CONTROL, _tx_thread_current_ptr, new_posture)
@@ -1027,38 +1022,38 @@ UINT old_posture;
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_event_log_on PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_event_log_on PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function disables all event filters. */
-/* */
-/* INPUT */
-/* */
-/* None */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application code */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* This function disables all event filters. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application code */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -1072,39 +1067,39 @@ VOID _tx_el_event_log_on(void)
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_event_log_off PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_event_log_off PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function sets all event filters, thereby turning event */
-/* logging off. */
-/* */
-/* INPUT */
-/* */
-/* None */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application code */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* This function sets all event filters, thereby turning event */
+/* logging off. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application code */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
@@ -1118,38 +1113,38 @@ VOID _tx_el_event_log_off(void)
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_el_event_log_set PORTABLE C */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_el_event_log_set PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function sets the events filters specified by the user. */
-/* */
-/* INPUT */
-/* */
-/* filter Events to filter */
/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* None */
-/* */
-/* CALLED BY */
-/* */
-/* Application code */
-/* */
-/* RELEASE HISTORY */
-/* */
+/* This function sets the events filters specified by the user. */
+/* */
+/* INPUT */
+/* */
+/* filter Events to filter */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application code */
+/* */
+/* RELEASE HISTORY */
+/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
diff --git a/ports/cortex_m7/ghs/src/tx_ghs.c b/ports/cortex_m7/ghs/src/tx_ghs.c
index 0be9d715..30b8054e 100644
--- a/ports/cortex_m7/ghs/src/tx_ghs.c
+++ b/ports/cortex_m7/ghs/src/tx_ghs.c
@@ -55,7 +55,7 @@ extern TX_THREAD *_tx_thread_current_ptr;
If you customize the System Library, you should remove ind_thrd.c
from the libsys.gpj subproject.
-
+
*/
/* Provide global __eh_globals value to support C++ exception handling
diff --git a/ports/cortex_m7/ghs/src/tx_thread_context_restore.arm b/ports/cortex_m7/ghs/src/tx_thread_context_restore.arm
index 556e4940..136d2666 100644
--- a/ports/cortex_m7/ghs/src/tx_thread_context_restore.arm
+++ b/ports/cortex_m7/ghs/src/tx_thread_context_restore.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
diff --git a/ports/cortex_m7/ghs/src/tx_thread_context_save.arm b/ports/cortex_m7/ghs/src/tx_thread_context_save.arm
index edf1ab03..275059e2 100644
--- a/ports/cortex_m7/ghs/src/tx_thread_context_save.arm
+++ b/ports/cortex_m7/ghs/src/tx_thread_context_save.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
diff --git a/ports/cortex_m7/ghs/src/tx_thread_interrupt_control.arm b/ports/cortex_m7/ghs/src/tx_thread_interrupt_control.arm
index 3d514ab4..2775e088 100644
--- a/ports/cortex_m7/ghs/src/tx_thread_interrupt_control.arm
+++ b/ports/cortex_m7/ghs/src/tx_thread_interrupt_control.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
diff --git a/ports/cortex_m7/ghs/src/tx_thread_interrupt_disable.arm b/ports/cortex_m7/ghs/src/tx_thread_interrupt_disable.arm
index 1d014f8a..fef336a3 100644
--- a/ports/cortex_m7/ghs/src/tx_thread_interrupt_disable.arm
+++ b/ports/cortex_m7/ghs/src/tx_thread_interrupt_disable.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -81,4 +81,4 @@ _tx_thread_interrupt_disable:
;
;}
.type _tx_thread_interrupt_disable,$function
- .size _tx_thread_interrupt_disable,.-_tx_thread_interrupt_disable
+ .size _tx_thread_interrupt_disable,.-_tx_thread_interrupt_disable
diff --git a/ports/cortex_m7/ghs/src/tx_thread_interrupt_restore.arm b/ports/cortex_m7/ghs/src/tx_thread_interrupt_restore.arm
index 55a5289a..1541dd37 100644
--- a/ports/cortex_m7/ghs/src/tx_thread_interrupt_restore.arm
+++ b/ports/cortex_m7/ghs/src/tx_thread_interrupt_restore.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -72,4 +72,4 @@ _tx_thread_interrupt_restore:
;
;}
.type _tx_thread_interrupt_restore,$function
- .size _tx_thread_interrupt_restore,.-_tx_thread_interrupt_restore
+ .size _tx_thread_interrupt_restore,.-_tx_thread_interrupt_restore
diff --git a/ports/cortex_m7/ghs/src/tx_thread_schedule.arm b/ports/cortex_m7/ghs/src/tx_thread_schedule.arm
index 3b8aa405..6796f7b4 100644
--- a/ports/cortex_m7/ghs/src/tx_thread_schedule.arm
+++ b/ports/cortex_m7/ghs/src/tx_thread_schedule.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -85,7 +85,7 @@ _tx_thread_schedule:
;
#ifdef __VFP__
MRS r0, CONTROL ; Pickup current CONTROL register
- BIC r0, r0, #4 ; Clear the FPCA bit
+ BIC r0, r0, #4 ; Clear the FPCA bit
MSR CONTROL, r0 ; Setup new CONTROL register
#endif
;
@@ -118,8 +118,8 @@ PendSV_Handler:
__tx_PendSVHandler:
;
; /* Get current thread value and new thread pointer. */
-;
-__tx_ts_handler:
+;
+__tx_ts_handler:
#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
;
@@ -137,7 +137,7 @@ __tx_ts_handler:
LDR r1, [r0] ; Pickup current thread pointer
;
; /* Determine if there is a current thread to finish preserving. */
-;
+;
CBZ r1, __tx_ts_new ; If NULL, skip preservation
;
; /* Recover PSP and preserve current thread context. */
@@ -212,7 +212,7 @@ __tx_ts_restore:
LDR.W LR, [r12], #4 ; Pickup LR
#ifdef __VFP__
TST LR, #0x10 ; Determine if the VFP extended frame is present
- BNE _skip_vfp_restore ; If not, skip VFP restore
+ BNE _skip_vfp_restore ; If not, skip VFP restore
VLDMIA r12!, {s16-s31} ; Yes, restore additional VFP registers
_skip_vfp_restore:
#endif
@@ -224,7 +224,7 @@ _skip_vfp_restore:
BX lr ; Return to thread!
;
; /* The following is the idle wait processing... in this case, no threads are ready for execution and the
-; system will simply be idle until an interrupt occurs that makes a thread ready. Note that interrupts
+; system will simply be idle until an interrupt occurs that makes a thread ready. Note that interrupts
; are disabled to allow use of WFI for waiting for a thread to arrive. */
;
__tx_ts_wait:
@@ -254,13 +254,13 @@ __tx_ts_wait:
CPSIE i ; Enable interrupts
B __tx_ts_wait ; Loop to continue waiting
;
-; /* At this point, we have a new thread ready to go. Clear any newly pended PendSV - since we are
+; /* At this point, we have a new thread ready to go. Clear any newly pended PendSV - since we are
; already in the handler! */
;
__tx_ts_ready:
MOV r7, #0x08000000 ; Build clear PendSV value
MOV r8, #0xE000E000 ; Build base NVIC address
- STR r7, [r8, #0xD04] ; Clear any PendSV
+ STR r7, [r8, #0xD04] ; Clear any PendSV
;
; /* Re-enable interrupts and restore new thread. */
;
@@ -269,14 +269,14 @@ __tx_ts_ready:
;}
;
.type __tx_PendSVHandler,$function
- .size __tx_PendSVHandler,.-__tx_PendSVHandler
+ .size __tx_PendSVHandler,.-__tx_PendSVHandler
#ifdef __VFP__
.globl tx_thread_fpu_enable
tx_thread_fpu_enable:
;
-; /* Automatic VPF logic is supported, this function is present only for
+; /* Automatic VPF logic is supported, this function is present only for
; backward compatibility purposes and therefore simply returns. */
;
BX LR ; Return to caller
@@ -287,12 +287,12 @@ tx_thread_fpu_enable:
.global tx_thread_fpu_disable
tx_thread_fpu_disable:
;
-; /* Automatic VPF logic is supported, this function is present only for
+; /* Automatic VPF logic is supported, this function is present only for
; backward compatibility purposes and therefore simply returns. */
;
BX LR ; Return to caller
.type tx_thread_fpu_disable,$function
- .size tx_thread_fpu_disable,.-tx_thread_fpu_disable
+ .size tx_thread_fpu_disable,.-tx_thread_fpu_disable
#endif
diff --git a/ports/cortex_m7/ghs/src/tx_thread_stack_build.arm b/ports/cortex_m7/ghs/src/tx_thread_stack_build.arm
index e2f0182e..45c950c8 100644
--- a/ports/cortex_m7/ghs/src/tx_thread_stack_build.arm
+++ b/ports/cortex_m7/ghs/src/tx_thread_stack_build.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
diff --git a/ports/cortex_m7/ghs/src/tx_thread_system_return.arm b/ports/cortex_m7/ghs/src/tx_thread_system_return.arm
index da4ae3cb..b2c3dd25 100644
--- a/ports/cortex_m7/ghs/src/tx_thread_system_return.arm
+++ b/ports/cortex_m7/ghs/src/tx_thread_system_return.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -80,7 +80,7 @@ _tx_thread_system_return:
CPSIE i ; Enable interrupts
MSR PRIMASK, r1 ; Restore original interrupt posture
_isr_context:
- BX lr ; Return to caller
+ BX lr ; Return to caller
;}
.type _tx_thread_system_return,$function
.size _tx_thread_system_return,.-_tx_thread_system_return
diff --git a/ports/cortex_m7/ghs/src/tx_timer_interrupt.arm b/ports/cortex_m7/ghs/src/tx_timer_interrupt.arm
index 6a9531fd..451e13dd 100644
--- a/ports/cortex_m7/ghs/src/tx_timer_interrupt.arm
+++ b/ports/cortex_m7/ghs/src/tx_timer_interrupt.arm
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -83,7 +83,7 @@ _tx_timer_interrupt:
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CBZ r2, __tx_timer_no_time_slice ; Is it non-active?
; Yes, skip time-slice processing
@@ -200,13 +200,13 @@ __tx_timer_dont_activate:
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CBZ r2, __tx_timer_not_ts_expiration ; See if the flag is set
; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
LDR r0, =_tx_thread_preempt_disable ; Build address of preempt disable flag
diff --git a/ports/cortex_m7/gnu/example_build/cortexm7_crt0.S b/ports/cortex_m7/gnu/example_build/cortexm7_crt0.S
index 4228fc11..e06430d7 100644
--- a/ports/cortex_m7/gnu/example_build/cortexm7_crt0.S
+++ b/ports/cortex_m7/gnu/example_build/cortexm7_crt0.S
@@ -39,7 +39,7 @@ crt0_ctor_loop:
beq crt0_ctor_end
ldr r2, [r0]
add r0, #4
- push {r0-r1}
+ push {r0-r1}
blx r2
pop {r0-r1}
b crt0_ctor_loop
@@ -88,4 +88,3 @@ memory_set_done:
.section .stack, "wa", %nobits
.section .stack_process, "wa", %nobits
.section .heap, "wa", %nobits
-
\ No newline at end of file
diff --git a/ports/cortex_m7/gnu/example_build/cortexm7_vectors.S b/ports/cortex_m7/gnu/example_build/cortexm7_vectors.S
index 6ae558e4..dc8d0aad 100644
--- a/ports/cortex_m7/gnu/example_build/cortexm7_vectors.S
+++ b/ports/cortex_m7/gnu/example_build/cortexm7_vectors.S
@@ -4,8 +4,8 @@
.global __tx_BadHandler
.global __tx_SVCallHandler
.global __tx_DBGHandler
- .global __tx_PendSVHandler
- .global __tx_SysTickHandler
+ .global __tx_PendSVHandler
+ .global __tx_SysTickHandler
.global __tx_BadHandler
.syntax unified
@@ -15,9 +15,9 @@
.global _vectors
_vectors:
- .word __stack_end__
- .word reset_handler
- .word __tx_NMIHandler
+ .word __stack_end__
+ .word reset_handler
+ .word __tx_NMIHandler
.word __tx_HardfaultHandler
.word __tx_BadHandler
.word __tx_BadHandler
@@ -29,7 +29,7 @@ _vectors:
.word __tx_SVCallHandler //_SVC_Handler - used by Threadx scheduler //
.word __tx_DBGHandler
.word 0 // Reserved
- .word __tx_PendSVHandler
+ .word __tx_PendSVHandler
.word __tx_SysTickHandler // Used by Threadx timer functionality
.word __tx_BadHandler // Populate with user Interrupt handler
.word __tx_BadHandler
diff --git a/ports/cortex_m7/gnu/example_build/sample_threadx.c b/ports/cortex_m7/gnu/example_build/sample_threadx.c
index 597f373c..13ffadba 100644
--- a/ports/cortex_m7/gnu/example_build/sample_threadx.c
+++ b/ports/cortex_m7/gnu/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -81,42 +81,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -124,23 +124,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -243,11 +243,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -306,7 +306,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -359,7 +359,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m7/gnu/example_build/sample_threadx.ld b/ports/cortex_m7/gnu/example_build/sample_threadx.ld
index c65a1346..3f19c29e 100644
--- a/ports/cortex_m7/gnu/example_build/sample_threadx.ld
+++ b/ports/cortex_m7/gnu/example_build/sample_threadx.ld
@@ -10,7 +10,7 @@ __HEAPSIZE__ = 128;
SECTIONS
{
- .vectors :
+ .vectors :
{
KEEP(*(.vectors .vectors.*))
} > FLASH
@@ -45,7 +45,7 @@ SECTIONS
KEEP(*(.eh_frame*))
} > FLASH
- .ARM.extab :
+ .ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > FLASH
@@ -59,7 +59,7 @@ SECTIONS
__data_load_start__ = ALIGN (4);
- .data : AT (__data_load_start__)
+ .data : AT (__data_load_start__)
{
__data_start__ = .;
@@ -89,7 +89,7 @@ SECTIONS
KEEP(*(.jcr*))
. = ALIGN(4);
/* All data end */
-
+
__data_end__ = .;
} > RAM
@@ -104,7 +104,7 @@ SECTIONS
__bss_end__ = .;
} > RAM
-
+
.heap (COPY):
{
__heap_start__ = ALIGN(4);
diff --git a/ports/cortex_m7/gnu/example_build/tx_initialize_low_level.S b/ports/cortex_m7/gnu/example_build/tx_initialize_low_level.S
index 5aaaaad3..e146e47f 100644
--- a/ports/cortex_m7/gnu/example_build/tx_initialize_low_level.S
+++ b/ports/cortex_m7/gnu/example_build/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -72,16 +73,6 @@ SYSTICK_CYCLES = ((SYSTEM_CLOCK / 100) -1)
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 05-19-2020 William E. Lamie Initial Version 6.0 */
-/* 09-30-2020 William E. Lamie Modified Comment(s), fixed */
-/* GNU assembly comment, clean */
-/* up whitespace, resulting */
-/* in version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_m7/gnu/inc/tx_port.h b/ports/cortex_m7/gnu/inc/tx_port.h
index dbdbbcd0..48a34cfa 100644
--- a/ports/cortex_m7/gnu/inc/tx_port.h
+++ b/ports/cortex_m7/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,23 +46,6 @@
/* This file replaces the previous Cortex-M3/M4/M7 files. It unifies */
/* the ARMv7-M architecture and compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comments, updated */
-/* typedef to fix misra */
-/* violation, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -371,7 +355,7 @@ void _tx_vfp_access(void);
/* A thread can be terminated by another thread, so we first check if it's self-terminating and not in an ISR.
If so, deactivate the FPU via CONTROL.FPCA. Otherwise we are in an interrupt or another thread is terminating
- this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
+ this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
the lazy FPU save, then restore the CONTROL.FPCA state. */
#ifndef TX_MISRA_ENABLE
@@ -530,7 +514,7 @@ ULONG _tx_misra_ipsr_get(VOID);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) (b) = (UINT) __clz(__rbit((m)));
#elif defined(__GNUC__) /* GCC and AC6 Compiler */
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) __asm__ volatile (" RBIT %0,%1 ": "=r" (m) : "r" (m) ); \
- __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
+ __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
#endif
@@ -715,7 +699,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M7/GNU Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M7/GNU Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m7/gnu/readme_threadx.txt b/ports/cortex_m7/gnu/readme_threadx.txt
index d9063d65..58181f85 100644
--- a/ports/cortex_m7/gnu/readme_threadx.txt
+++ b/ports/cortex_m7/gnu/readme_threadx.txt
@@ -5,15 +5,15 @@
1. Building the ThreadX run-time Library
-Navigate to the "example_build" directory. Ensure that
-you have setup your path and other environment variables necessary for the ARM
-GNU compiler. At this point you may run the build_threadx.bat batch file.
-This will build the ThreadX run-time environment in the "example_build"
-directory.
+Navigate to the "example_build" directory. Ensure that
+you have setup your path and other environment variables necessary for the ARM
+GNU compiler. At this point you may run the build_threadx.bat batch file.
+This will build the ThreadX run-time environment in the "example_build"
+directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
@@ -22,25 +22,25 @@ application in order to use ThreadX.
The ThreadX demonstration is designed to execute on Cortex-M evaluation boards
or on a dedicated simulator.
-Building the demonstration is easy, simply execute the build_threadx_sample.bat
+Building the demonstration is easy, simply execute the build_threadx_sample.bat
batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.out is a binary
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.out is a binary
file that can be downloaded and executed on the a simulator, or downloaded to a board.
3. System Initialization
-The entry point in ThreadX for the Cortex-M using gnu tools uses the standard GNU
+The entry point in ThreadX for the Cortex-M using gnu tools uses the standard GNU
Cortex-M reset sequence. From the reset vector the C runtime will be initialized.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.S file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -49,7 +49,7 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -132,34 +132,34 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-The distribution version of ThreadX is built without any compiler optimizations.
-This makes it easy to debug because you can trace or set breakpoints inside of
-ThreadX itself. Of course, this costs some performance. To make it run faster,
-you can change the build_threadx.bat file to remove the -g option and enable
-all compiler optimizations.
+The distribution version of ThreadX is built without any compiler optimizations.
+This makes it easy to debug because you can trace or set breakpoints inside of
+ThreadX itself. Of course, this costs some performance. To make it run faster,
+you can change the build_threadx.bat file to remove the -g option and enable
+all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
6.1 Vector Area
The Cortex-M vectors start at the label __tx_vectors or similar. The application may modify
-the vector area according to its needs. There is code in tx_initialize_low_level() that will
-configure the vector base register.
+the vector area according to its needs. There is code in tx_initialize_low_level() that will
+configure the vector base register.
6.2 Managed Interrupts
-A ThreadX managed interrupt is defined below. By following these conventions, the
+A ThreadX managed interrupt is defined below. By following these conventions, the
application ISR is then allowed access to various ThreadX services from the ISR.
Here is the standard template for managed ISRs in ThreadX:
@@ -181,15 +181,15 @@ __tx_IntHandler:
Note: the Cortex-M requires exception handlers to be thumb labels, this implies bit 0 set.
To accomplish this, the declaration of the label has to be preceded by the assembler directive
-.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
-be inserted in the correct location in the interrupt vector table. This table is typically
+.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
+be inserted in the correct location in the interrupt vector table. This table is typically
located in either your runtime startup file or in the tx_initialize_low_level.S file.
7. FPU Support
-ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context - no additional setup by the application.
diff --git a/ports/cortex_m7/gnu/src/tx_misra.S b/ports/cortex_m7/gnu/src/tx_misra.S
index 8ac0c629..10548671 100644
--- a/ports/cortex_m7/gnu/src/tx_misra.S
+++ b/ports/cortex_m7/gnu/src/tx_misra.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -667,7 +668,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -682,7 +683,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARM_FP
/***********************************************************************************************/
@@ -699,8 +700,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -714,9 +715,9 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
+
.data
.word 0
diff --git a/ports/cortex_m7/gnu/src/tx_thread_context_restore.S b/ports/cortex_m7/gnu/src/tx_thread_context_restore.S
index 57b18cf6..63895928 100644
--- a/ports/cortex_m7/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_m7/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,14 +62,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m7/gnu/src/tx_thread_context_save.S b/ports/cortex_m7/gnu/src/tx_thread_context_save.S
index d118c5bd..96df9ac5 100644
--- a/ports/cortex_m7/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_m7/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m7/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_m7/gnu/src/tx_thread_interrupt_control.S
index 62301c14..5778d8d4 100644
--- a/ports/cortex_m7/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_m7/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m7/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_m7/gnu/src/tx_thread_interrupt_disable.S
index f74a3748..19f6f854 100644
--- a/ports/cortex_m7/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_m7/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m7/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_m7/gnu/src/tx_thread_interrupt_restore.S
index f4be7eba..25f1aac3 100644
--- a/ports/cortex_m7/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_m7/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m7/gnu/src/tx_thread_schedule.S b/ports/cortex_m7/gnu/src/tx_thread_schedule.S
index e2743401..6700fd97 100644
--- a/ports/cortex_m7/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_m7/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -68,18 +69,6 @@
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Fixed predefined macro name, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
diff --git a/ports/cortex_m7/gnu/src/tx_thread_stack_build.S b/ports/cortex_m7/gnu/src/tx_thread_stack_build.S
index 0c72a44f..d0e2eaf3 100644
--- a/ports/cortex_m7/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_m7/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m7/gnu/src/tx_thread_system_return.S b/ports/cortex_m7/gnu/src/tx_thread_system_return.S
index 4987b047..ce5a3f46 100644
--- a/ports/cortex_m7/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_m7/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -59,14 +60,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m7/gnu/src/tx_timer_interrupt.S b/ports/cortex_m7/gnu/src/tx_timer_interrupt.S
index d9477dea..6cc18b25 100644
--- a/ports/cortex_m7/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_m7/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -70,17 +71,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comment(s), added */
-/* TX_NO_TIMER support, */
-/* resulting in version 6.1.10 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m7/iar/CMakeLists.txt b/ports/cortex_m7/iar/CMakeLists.txt
index a524d79f..57be3aeb 100644
--- a/ports/cortex_m7/iar/CMakeLists.txt
+++ b/ports/cortex_m7/iar/CMakeLists.txt
@@ -7,7 +7,7 @@ target_sources(${PROJECT_NAME}
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_save.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_control.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_disable.S
- ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_restore.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_restore.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_schedule.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_build.S
${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_return.S
diff --git a/ports/cortex_m7/iar/example_build/cstartup_M.s b/ports/cortex_m7/iar/example_build/cstartup_M.s
index 75d9369b..d1c5aa3e 100644
--- a/ports/cortex_m7/iar/example_build/cstartup_M.s
+++ b/ports/cortex_m7/iar/example_build/cstartup_M.s
@@ -2,16 +2,16 @@
PUBLIC __vector_table
SECTION .text:CODE:REORDER(1)
-
+
;; Keep vector table even if it's not referenced
REQUIRE __vector_table
-
+
THUMB
-
+
;; Forward declaration of sections.
SECTION CSTACK:DATA:NOROOT(3)
SECTION .intvec:CODE:NOROOT(2)
-
+
DATA
__vector_table
diff --git a/ports/cortex_m7/iar/example_build/sample_threadx.c b/ports/cortex_m7/iar/example_build/sample_threadx.c
index 9a626828..f1f4cb87 100644
--- a/ports/cortex_m7/iar/example_build/sample_threadx.c
+++ b/ports/cortex_m7/iar/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. Please refer to Chapter 6 of the ThreadX User Guide for a complete
description of this demonstration. */
@@ -65,7 +65,7 @@ void thread_6_and_7_entry(ULONG thread_input);
int main()
{
-
+
/* Please refer to Chapter 6 of the ThreadX User Guide for a complete
description of this demonstration. */
@@ -93,41 +93,41 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -135,23 +135,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -254,11 +254,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -317,7 +317,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -370,7 +370,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_m7/iar/example_build/tx_initialize_low_level.s b/ports/cortex_m7/iar/example_build/tx_initialize_low_level.s
index b725ef99..76d065cf 100644
--- a/ports/cortex_m7/iar/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_m7/iar/example_build/tx_initialize_low_level.s
@@ -1,10 +1,10 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
@@ -73,12 +73,6 @@ __tx_free_memory_start
;/* */
;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
-;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
;{
diff --git a/ports/cortex_m7/iar/inc/tx_port.h b/ports/cortex_m7/iar/inc/tx_port.h
index 04126681..63d821bf 100644
--- a/ports/cortex_m7/iar/inc/tx_port.h
+++ b/ports/cortex_m7/iar/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,23 +46,6 @@
/* This file replaces the previous Cortex-M3/M4/M7 files. It unifies */
/* the ARMv7-M architecture and compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comments, updated */
-/* typedef to fix misra */
-/* violation, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -371,7 +355,7 @@ void _tx_vfp_access(void);
/* A thread can be terminated by another thread, so we first check if it's self-terminating and not in an ISR.
If so, deactivate the FPU via CONTROL.FPCA. Otherwise we are in an interrupt or another thread is terminating
- this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
+ this one, so if the FPCCR.LSPACT bit is set, we need to save the CONTROL.FPCA state, touch the FPU to flush
the lazy FPU save, then restore the CONTROL.FPCA state. */
#ifndef TX_MISRA_ENABLE
@@ -530,7 +514,7 @@ ULONG _tx_misra_ipsr_get(VOID);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) (b) = (UINT) __clz(__rbit((m)));
#elif defined(__GNUC__) /* GCC and AC6 Compiler */
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) __asm__ volatile (" RBIT %0,%1 ": "=r" (m) : "r" (m) ); \
- __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
+ __asm__ volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) );
#endif
@@ -715,7 +699,7 @@ void tx_thread_fpu_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M7/IAR Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M7/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m7/iar/readme_threadx.txt b/ports/cortex_m7/iar/readme_threadx.txt
index 28b54e03..388c40e6 100644
--- a/ports/cortex_m7/iar/readme_threadx.txt
+++ b/ports/cortex_m7/iar/readme_threadx.txt
@@ -6,45 +6,45 @@
1. Building the ThreadX run-time Library
Building the ThreadX library is easy. First, open the Azure RTOS workspace
-azure_rtos.eww. Next, make the TX project the "active project" in the
-IAR Embedded Workbench and select the "Make" button. You should observe
-assembly and compilation of a series of ThreadX source files. This
-results in the ThreadX run-time library file tx.a, which is needed by
+azure_rtos.eww. Next, make the TX project the "active project" in the
+IAR Embedded Workbench and select the "Make" button. You should observe
+assembly and compilation of a series of ThreadX source files. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
2. Demonstration System
-The ThreadX demonstration is designed to execute under the IAR debugger under
+The ThreadX demonstration is designed to execute under the IAR debugger under
simulation.
Building the demonstration is easy; simply open the threadx.www workspace file,
-make the sample_threadx.ewp project the "active project" in the IAR Embedded
+make the sample_threadx.ewp project the "active project" in the IAR Embedded
Workbench, and select the "Make" button.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.out is a
-binary ELF file that can be downloaded and executed on the IAR Windows-based
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.out is a
+binary ELF file that can be downloaded and executed on the IAR Windows-based
Cortex-M simulator.
3. System Initialization
-The entry point in ThreadX for the Cortex-M using IAR tools is at label
-__iar_program_start. This is defined within the IAR compiler's startup code.
-In addition, this is where all static and global preset C variable
+The entry point in ThreadX for the Cortex-M using IAR tools is at label
+__iar_program_start. This is defined within the IAR compiler's startup code.
+In addition, this is where all static and global preset C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, and a periodic timer interrupt source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, and a periodic timer interrupt source.
By default, the vector area is defined at the top of cstartup_M.s, which is
-a slightly modified from the base IAR file.
+a slightly modified from the base IAR file.
The _tx_initialize_low_level function inside of tx_initialize_low_level.s
-also determines the first available address for use by the application, which
-is supplied as the sole input parameter to your application definition function,
-tx_application_define. To accomplish this, a section is created in
-tx_initialize_low_level.s called FREE_MEM, which must be located after all
+also determines the first available address for use by the application, which
+is supplied as the sole input parameter to your application definition function,
+tx_application_define. To accomplish this, a section is created in
+tx_initialize_low_level.s called FREE_MEM, which must be located after all
other RAM sections in memory.
@@ -53,7 +53,7 @@ other RAM sections in memory.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -136,20 +136,20 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
-The Cortex-M vectors start at the label __vector_table and is defined in cstartup_M.s.
+The Cortex-M vectors start at the label __vector_table and is defined in cstartup_M.s.
The application may modify the vector area according to its needs.
@@ -188,14 +188,14 @@ should have the following line added (if not already in place):
initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
-The project options "General Options -> Library Configuration" should also have the
+The project options "General Options -> Library Configuration" should also have the
"Enable thread support in library" box selected.
8. VFP Support
-ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context - no additional setup by the application.
diff --git a/ports/cortex_m7/iar/src/tx_iar.c b/ports/cortex_m7/iar/src/tx_iar.c
index c6092de3..238b485e 100644
--- a/ports/cortex_m7/iar/src/tx_iar.c
+++ b/ports/cortex_m7/iar/src/tx_iar.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,24 +423,24 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#include
+#include
void * __aeabi_read_tp();
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports/cortex_m7/iar/src/tx_misra.s b/ports/cortex_m7/iar/src/tx_misra.s
index f86d9a65..642bb89e 100644
--- a/ports/cortex_m7/iar/src/tx_misra.s
+++ b/ports/cortex_m7/iar/src/tx_misra.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -120,7 +121,7 @@
SECTION `.data`:DATA:REORDER:NOROOT(2)
DATA
-// 51 CHAR _tx_version_id[100] = "Copyright (c) 2024 Microsoft Corporation. * ThreadX 6.1 MISRA C Compliant *";
+// 51 CHAR _tx_version_id[100] = "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX 6.1 MISRA C Compliant *";
_tx_version_id:
DC8 43H, 6FH, 70H, 79H, 72H, 69H, 67H, 68H
DC8 74H, 20H, 28H, 63H, 29H, 20H, 31H, 39H
@@ -707,7 +708,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -722,7 +723,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARMVFP__
/***********************************************************************************************/
@@ -739,8 +740,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -754,10 +755,10 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
-
+
+
SECTION `.iar_vfe_header`:DATA:NOALLOC:NOROOT(2)
SECTION_TYPE SHT_PROGBITS, 0
DATA
diff --git a/ports/cortex_m7/iar/src/tx_thread_context_restore.s b/ports/cortex_m7/iar/src/tx_thread_context_restore.s
index 52c33328..ccc96ede 100644
--- a/ports/cortex_m7/iar/src/tx_thread_context_restore.s
+++ b/ports/cortex_m7/iar/src/tx_thread_context_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* CALLED BY */
/* */
/* ISRs Interrupt Service Routines */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m7/iar/src/tx_thread_context_save.s b/ports/cortex_m7/iar/src/tx_thread_context_save.s
index f3bca66a..dcf510a6 100644
--- a/ports/cortex_m7/iar/src/tx_thread_context_save.s
+++ b/ports/cortex_m7/iar/src/tx_thread_context_save.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,15 +57,6 @@
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m7/iar/src/tx_thread_interrupt_control.s b/ports/cortex_m7/iar/src/tx_thread_interrupt_control.s
index 8950acd5..f28d5bde 100644
--- a/ports/cortex_m7/iar/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_m7/iar/src/tx_thread_interrupt_control.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m7/iar/src/tx_thread_interrupt_disable.s b/ports/cortex_m7/iar/src/tx_thread_interrupt_disable.s
index 76e09a1c..36aaaf0a 100644
--- a/ports/cortex_m7/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_m7/iar/src/tx_thread_interrupt_disable.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m7/iar/src/tx_thread_interrupt_restore.s b/ports/cortex_m7/iar/src/tx_thread_interrupt_restore.s
index 57102c6d..55aa1d62 100644
--- a/ports/cortex_m7/iar/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_m7/iar/src/tx_thread_interrupt_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,15 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m7/iar/src/tx_thread_schedule.s b/ports/cortex_m7/iar/src/tx_thread_schedule.s
index 7125056b..58279c1a 100644
--- a/ports/cortex_m7/iar/src/tx_thread_schedule.s
+++ b/ports/cortex_m7/iar/src/tx_thread_schedule.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -67,17 +68,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
diff --git a/ports/cortex_m7/iar/src/tx_thread_stack_build.s b/ports/cortex_m7/iar/src/tx_thread_stack_build.s
index 04b1479c..2f7ac3ab 100644
--- a/ports/cortex_m7/iar/src/tx_thread_stack_build.s
+++ b/ports/cortex_m7/iar/src/tx_thread_stack_build.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* CALLED BY */
/* */
/* _tx_thread_create Create thread service */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m7/iar/src/tx_thread_system_return.s b/ports/cortex_m7/iar/src/tx_thread_system_return.s
index 51c85491..0cef80c6 100644
--- a/ports/cortex_m7/iar/src/tx_thread_system_return.s
+++ b/ports/cortex_m7/iar/src/tx_thread_system_return.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,15 +58,6 @@
/* CALLED BY */
/* */
/* ThreadX components */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m7/iar/src/tx_timer_interrupt.s b/ports/cortex_m7/iar/src/tx_timer_interrupt.s
index 1da9431e..775c0a45 100644
--- a/ports/cortex_m7/iar/src/tx_timer_interrupt.s
+++ b/ports/cortex_m7/iar/src/tx_timer_interrupt.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,18 +72,6 @@
/* CALLED BY */
/* */
/* interrupt vector */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 01-31-2022 Scott Larson Modified comment(s), added */
-/* TX_NO_TIMER support, */
-/* resulting in version 6.1.10 */
-/* 10-31-2023 Tiejun Zhou Included tx_user.h, */
-/* resulting in version 6.3.0 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m85/ac6/inc/tx_port.h b/ports/cortex_m85/ac6/inc/tx_port.h
index bedb8e92..7e119fee 100644
--- a/ports/cortex_m85/ac6/inc/tx_port.h
+++ b/ports/cortex_m85/ac6/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,39 +46,6 @@
/* This file replaces the previous Cortex-M85 files. It unifies */
/* the Cortex-M85 compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-02-2021 Scott Larson Modified comment(s), added */
-/* ULONG64_DEFINED, */
-/* resulting in version 6.1.5 */
-/* 06-02-2021 Scott Larson Modified comment(s), removed */
-/* unneeded header file, funcs */
-/* set_control and get_control */
-/* changed to inline, */
-/* added symbol to enable */
-/* stack error handler, */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Scott Larson Modified comment(s), improved */
-/* stack check error handling, */
-/* resulting in version 6.1.9 */
-/* 01-31-2022 Scott Larson Modified comment(s), unified */
-/* this file across compilers, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* 03-08-2023 Scott Larson Removed unneeded #include, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -645,7 +613,7 @@ VOID _tx_thread_interrupt_restore(UIN
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M85/AC6 Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M85/AC6 Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m85/ac6/inc/tx_secure_interface.h b/ports/cortex_m85/ac6/inc/tx_secure_interface.h
index 39b5d5fd..5ac37fbf 100644
--- a/ports/cortex_m85/ac6/inc/tx_secure_interface.h
+++ b/ports/cortex_m85/ac6/inc/tx_secure_interface.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,12 +38,6 @@
/* It is assumed that tx_api.h and tx_port.h have already been */
/* included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_SECURE_INTERFACE_H
diff --git a/ports/cortex_m85/ac6/readme_threadx.txt b/ports/cortex_m85/ac6/readme_threadx.txt
index dda0c1c4..abe80bf8 100644
--- a/ports/cortex_m85/ac6/readme_threadx.txt
+++ b/ports/cortex_m85/ac6/readme_threadx.txt
@@ -1,46 +1,46 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M85
+ Microsoft's Azure RTOS ThreadX for Cortex-M85
Using the AC6 Tools in Keil uVision
1. Import the ThreadX Projects
-In order to build the ThreadX library and the ThreadX demonstration, first open
-the AzureRTOS.uvmpw workspace (located in the "example_build" directory)
+In order to build the ThreadX library and the ThreadX demonstration, first open
+the AzureRTOS.uvmpw workspace (located in the "example_build" directory)
into Keil.
2. Building the ThreadX run-time Library
Building the ThreadX library is easy; simply set the ThreadX_Library project
-as active, then then build the library. You should now observe the compilation
+as active, then then build the library. You should now observe the compilation
and assembly of the ThreadX library. This project build produces the ThreadX
library file ThreadX_Library.lib.
-Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
-replace the common files of the same name.
+Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
+replace the common files of the same name.
3. Demonstration System
The ThreadX demonstration is designed to execute under the Keil debugger on the
FVP_MPS2_Cortex-M85_MDK simulator.
-Building the demonstration is easy; simply select the "Batch Build" button.
-You should now observe the compilation and assembly of the ThreadX demonstration of
-both the demo_secure_zone and demo_threadx_non-secure_zone projects.
+Building the demonstration is easy; simply select the "Batch Build" button.
+You should now observe the compilation and assembly of the ThreadX demonstration of
+both the demo_secure_zone and demo_threadx_non-secure_zone projects.
Then click the Start/Stop Debug Session button to start the simulator and begin debugging.
You are now ready to execute the ThreadX demonstration.
4. System Initialization
-The entry point in ThreadX for the Cortex-M85 using AC6 tools uses the standard AC6
+The entry point in ThreadX for the Cortex-M85 using AC6 tools uses the standard AC6
Cortex-M85 reset sequence. From the reset vector the C runtime will be initialized.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -49,7 +49,7 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M85 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -132,26 +132,26 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
6. Improving Performance
-To make ThreadX and the application(s) run faster, you can enable
-all compiler optimizations.
+To make ThreadX and the application(s) run faster, you can enable
+all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M85
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-M85 vectors start at the label __Vectors or similar. The application may modify
-the vector area according to its needs. There is code in tx_initialize_low_level() that will
-configure the vector base register.
+the vector area according to its needs. There is code in tx_initialize_low_level() that will
+configure the vector base register.
7.2 Managed Interrupts
@@ -177,7 +177,7 @@ your_assembly_isr:
; VOID your_assembly_isr(VOID)
; {
PUSH {r0, lr}
-;
+;
; /* Do interrupt handler work here */
; /* BL */
@@ -187,15 +187,15 @@ your_assembly_isr:
Note: the Cortex-M85 requires exception handlers to be thumb labels, this implies bit 0 set.
To accomplish this, the declaration of the label has to be preceded by the assembler directive
-.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
-be inserted in the correct location in the interrupt vector table. This table is typically
+.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
+be inserted in the correct location in the interrupt vector table. This table is typically
located in either your runtime startup file or in the tx_initialize_low_level.s file.
8. FPU Support
-ThreadX for Cortex-M85 supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M85 supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context.
diff --git a/ports/cortex_m85/ac6/src/tx_initialize_low_level.S b/ports/cortex_m85/ac6/src/tx_initialize_low_level.S
index fca21594..a3daea70 100644
--- a/ports/cortex_m85/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_m85/ac6/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,14 +66,6 @@ HEAP_SIZE = 0x00000000
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_m85/ac6/src/tx_misra.S b/ports/cortex_m85/ac6/src/tx_misra.S
index 8ac0c629..10548671 100644
--- a/ports/cortex_m85/ac6/src/tx_misra.S
+++ b/ports/cortex_m85/ac6/src/tx_misra.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -667,7 +668,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -682,7 +683,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARM_FP
/***********************************************************************************************/
@@ -699,8 +700,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -714,9 +715,9 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
+
.data
.word 0
diff --git a/ports/cortex_m85/ac6/src/tx_thread_context_restore.S b/ports/cortex_m85/ac6/src/tx_thread_context_restore.S
index 6320f475..5c5a6b25 100644
--- a/ports/cortex_m85/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_m85/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m85/ac6/src/tx_thread_context_save.S b/ports/cortex_m85/ac6/src/tx_thread_context_save.S
index d5911b43..46a1bda7 100644
--- a/ports/cortex_m85/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_m85/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m85/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_m85/ac6/src/tx_thread_interrupt_control.S
index 13256055..43483a79 100644
--- a/ports/cortex_m85/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_m85/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m85/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_m85/ac6/src/tx_thread_interrupt_disable.S
index b14623a6..e0d27e80 100644
--- a/ports/cortex_m85/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_m85/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m85/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_m85/ac6/src/tx_thread_interrupt_restore.S
index ffe8649f..a844935d 100644
--- a/ports/cortex_m85/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_m85/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m85/ac6/src/tx_thread_schedule.S b/ports/cortex_m85/ac6/src/tx_thread_schedule.S
index 202860ad..62412fff 100644
--- a/ports/cortex_m85/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_m85/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -60,23 +61,6 @@
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 04-02-2021 Scott Larson Modified comment(s), added */
-/* low power code, */
-/* resulting in version 6.1.6 */
-/* 06-02-2021 Scott Larson Added secure stack initialize */
-/* in SVC handler, */
-/* resulting in version 6.1.7 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 03-08-2023 Scott Larson Added preproc FPU option, */
-/* included tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -354,7 +338,7 @@ SVC_Handler:
CMP r1, #2 // Is it a secure stack free request?
BEQ _tx_svc_secure_free // Yes, go there
-
+
CMP r1, #3 // Is it a secure stack init request?
BEQ _tx_svc_secure_init // Yes, go there
diff --git a/ports/cortex_m85/ac6/src/tx_thread_secure_stack.c b/ports/cortex_m85/ac6/src/tx_thread_secure_stack.c
index 46ac71d3..f3582653 100644
--- a/ports/cortex_m85/ac6/src/tx_thread_secure_stack.c
+++ b/ports/cortex_m85/ac6/src/tx_thread_secure_stack.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -102,21 +103,6 @@ static INT tx_head_free_index = 0U;
/* */
/* _tx_initialize_kernel_enter */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 10-16-2020 Scott Larson Modified comment(s), */
-/* resulting in version 6.1.1 */
-/* 06-02-2021 Scott Larson Modified comment(s), and */
-/* changed name, execute in */
-/* handler mode, */
-/* resulting in version 6.1.7 */
-/* 01-31-2022 Himanshu Gupta Modified comments(s), updated */
-/* secure stack allocation, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
__attribute__((cmse_nonsecure_entry))
UINT _tx_thread_secure_mode_stack_initialize(void)
diff --git a/ports/cortex_m85/ac6/src/tx_thread_secure_stack_allocate.S b/ports/cortex_m85/ac6/src/tx_thread_secure_stack_allocate.S
index 99215d59..6ecda22d 100644
--- a/ports/cortex_m85/ac6/src/tx_thread_secure_stack_allocate.S
+++ b/ports/cortex_m85/ac6/src/tx_thread_secure_stack_allocate.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,14 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
// {
diff --git a/ports/cortex_m85/ac6/src/tx_thread_secure_stack_free.S b/ports/cortex_m85/ac6/src/tx_thread_secure_stack_free.S
index 441c2100..9a9d6555 100644
--- a/ports/cortex_m85/ac6/src/tx_thread_secure_stack_free.S
+++ b/ports/cortex_m85/ac6/src/tx_thread_secure_stack_free.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,14 +54,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_free(TX_THREAD *thread_ptr)
// {
diff --git a/ports/cortex_m85/ac6/src/tx_thread_secure_stack_initialize.S b/ports/cortex_m85/ac6/src/tx_thread_secure_stack_initialize.S
index 08b2ada0..01abe965 100644
--- a/ports/cortex_m85/ac6/src/tx_thread_secure_stack_initialize.S
+++ b/ports/cortex_m85/ac6/src/tx_thread_secure_stack_initialize.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,18 +54,6 @@
/* */
/* TX_PORT_SPECIFIC_PRE_INITIALIZATION */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* resulting in version 6.1.12 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_secure_stack_initialize(VOID)
// {
diff --git a/ports/cortex_m85/ac6/src/tx_thread_stack_build.S b/ports/cortex_m85/ac6/src/tx_thread_stack_build.S
index 6e3fe5e9..10ed7c6a 100644
--- a/ports/cortex_m85/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_m85/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m85/ac6/src/tx_thread_system_return.S b/ports/cortex_m85/ac6/src/tx_thread_system_return.S
index 9290a621..2b335f8d 100644
--- a/ports/cortex_m85/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_m85/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m85/ac6/src/tx_timer_interrupt.S b/ports/cortex_m85/ac6/src/tx_timer_interrupt.S
index 36266e85..8e2af8bd 100644
--- a/ports/cortex_m85/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_m85/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m85/ac6/src/txe_thread_secure_stack_allocate.c b/ports/cortex_m85/ac6/src/txe_thread_secure_stack_allocate.c
index 17cc9f53..43b4db08 100644
--- a/ports/cortex_m85/ac6/src/txe_thread_secure_stack_allocate.c
+++ b/ports/cortex_m85/ac6/src/txe_thread_secure_stack_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
{
@@ -76,10 +71,10 @@ UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_siz
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m85/ac6/src/txe_thread_secure_stack_free.c b/ports/cortex_m85/ac6/src/txe_thread_secure_stack_free.c
index a41b1c24..d6431134 100644
--- a/ports/cortex_m85/ac6/src/txe_thread_secure_stack_free.c
+++ b/ports/cortex_m85/ac6/src/txe_thread_secure_stack_free.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,12 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
{
@@ -74,10 +69,10 @@ UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m85/gnu/inc/tx_port.h b/ports/cortex_m85/gnu/inc/tx_port.h
index a852adae..9057a132 100644
--- a/ports/cortex_m85/gnu/inc/tx_port.h
+++ b/ports/cortex_m85/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,39 +46,6 @@
/* This file replaces the previous Cortex-M85 files. It unifies */
/* the Cortex-M85 compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-02-2021 Scott Larson Modified comment(s), added */
-/* ULONG64_DEFINED, */
-/* resulting in version 6.1.5 */
-/* 06-02-2021 Scott Larson Modified comment(s), removed */
-/* unneeded header file, funcs */
-/* set_control and get_control */
-/* changed to inline, */
-/* added symbol to enable */
-/* stack error handler, */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Scott Larson Modified comment(s), improved */
-/* stack check error handling, */
-/* resulting in version 6.1.9 */
-/* 01-31-2022 Scott Larson Modified comment(s), unified */
-/* this file across compilers, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* 03-08-2023 Scott Larson Removed unneeded #include, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -645,7 +613,7 @@ VOID _tx_thread_interrupt_restore(UIN
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M85/GNU Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M85/GNU Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m85/gnu/inc/tx_secure_interface.h b/ports/cortex_m85/gnu/inc/tx_secure_interface.h
index 39b5d5fd..5ac37fbf 100644
--- a/ports/cortex_m85/gnu/inc/tx_secure_interface.h
+++ b/ports/cortex_m85/gnu/inc/tx_secure_interface.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,12 +38,6 @@
/* It is assumed that tx_api.h and tx_port.h have already been */
/* included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_SECURE_INTERFACE_H
diff --git a/ports/cortex_m85/gnu/readme_threadx.txt b/ports/cortex_m85/gnu/readme_threadx.txt
index e38d20ee..d497b037 100644
--- a/ports/cortex_m85/gnu/readme_threadx.txt
+++ b/ports/cortex_m85/gnu/readme_threadx.txt
@@ -1,32 +1,32 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M85
+ Microsoft's Azure RTOS ThreadX for Cortex-M85
Using the GNU Tools
1. Building the ThreadX run-time Library
Import all ThreadX common and port-specific source files into a GNU project.
-Configure the project to build a library rather than an executable. This
-results in the ThreadX run-time library file tx.a, which is needed by
+Configure the project to build a library rather than an executable. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
-Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
-replace the common files of the same name.
+Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
+replace the common files of the same name.
2. Demonstration System
-No demonstration project is provided.
+No demonstration project is provided.
3. System Initialization
-The entry point in ThreadX for the Cortex-M85 using gnu tools uses the standard GNU
+The entry point in ThreadX for the Cortex-M85 using gnu tools uses the standard GNU
Cortex-M85 reset sequence. From the reset vector the C runtime will be initialized.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source.
+The ThreadX tx_initialize_low_level.S file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
@@ -35,7 +35,7 @@ parameter to your application definition function, tx_application_define.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M85 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -118,26 +118,26 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-To make ThreadX and the application(s) run faster, you can enable
-all compiler optimizations.
+To make ThreadX and the application(s) run faster, you can enable
+all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-M85
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
6.1 Vector Area
The Cortex-M85 vectors start at the label __tx_vectors or similar. The application may modify
-the vector area according to its needs. There is code in tx_initialize_low_level() that will
-configure the vector base register.
+the vector area according to its needs. There is code in tx_initialize_low_level() that will
+configure the vector base register.
6.2 Managed Interrupts
@@ -170,15 +170,15 @@ your_assembly_isr:
Note: the Cortex-M85 requires exception handlers to be thumb labels, this implies bit 0 set.
To accomplish this, the declaration of the label has to be preceded by the assembler directive
-.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
-be inserted in the correct location in the interrupt vector table. This table is typically
+.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
+be inserted in the correct location in the interrupt vector table. This table is typically
located in either your runtime startup file or in the tx_initialize_low_level.S file.
7. FPU Support
-ThreadX for Cortex-M85 supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M85 supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context.
diff --git a/ports/cortex_m85/gnu/src/tx_initialize_low_level.S b/ports/cortex_m85/gnu/src/tx_initialize_low_level.S
index e34d1d6f..22dc0780 100644
--- a/ports/cortex_m85/gnu/src/tx_initialize_low_level.S
+++ b/ports/cortex_m85/gnu/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,16 +66,6 @@ HEAP_SIZE = 0x00000000
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 01-31-2022 Scott Larson Fixed predefined macro name, */
-/* resulting in version 6.1.10 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_m85/gnu/src/tx_misra.S b/ports/cortex_m85/gnu/src/tx_misra.S
index 8ac0c629..10548671 100644
--- a/ports/cortex_m85/gnu/src/tx_misra.S
+++ b/ports/cortex_m85/gnu/src/tx_misra.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -667,7 +668,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -682,7 +683,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARM_FP
/***********************************************************************************************/
@@ -699,8 +700,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -714,9 +715,9 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
+
.data
.word 0
diff --git a/ports/cortex_m85/gnu/src/tx_thread_context_restore.S b/ports/cortex_m85/gnu/src/tx_thread_context_restore.S
index 56c06886..6daf837e 100644
--- a/ports/cortex_m85/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_m85/gnu/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m85/gnu/src/tx_thread_context_save.S b/ports/cortex_m85/gnu/src/tx_thread_context_save.S
index e6bf9501..8af9fbb1 100644
--- a/ports/cortex_m85/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_m85/gnu/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m85/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_m85/gnu/src/tx_thread_interrupt_control.S
index acf05310..431c2e38 100644
--- a/ports/cortex_m85/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_m85/gnu/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m85/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_m85/gnu/src/tx_thread_interrupt_disable.S
index 092c3b55..e734b6f4 100644
--- a/ports/cortex_m85/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_m85/gnu/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m85/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_m85/gnu/src/tx_thread_interrupt_restore.S
index 34530d70..9e874eca 100644
--- a/ports/cortex_m85/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_m85/gnu/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,14 +55,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m85/gnu/src/tx_thread_schedule.S b/ports/cortex_m85/gnu/src/tx_thread_schedule.S
index 91a60319..f46f5737 100644
--- a/ports/cortex_m85/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_m85/gnu/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,24 +57,6 @@
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 04-02-2021 Scott Larson Modified comment(s), added */
-/* low power code, */
-/* resulting in version 6.1.6 */
-/* 06-02-2021 Scott Larson Added secure stack initialize */
-/* in SVC handler, */
-/* resulting in version 6.1.7 */
-/* 01-31-2022 Scott Larson Fixed predefined macro name, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -351,7 +334,7 @@ SVC_Handler:
CMP r1, #2 // Is it a secure stack free request?
BEQ _tx_svc_secure_free // Yes, go there
-
+
CMP r1, #3 // Is it a secure stack init request?
BEQ _tx_svc_secure_init // Yes, go there
diff --git a/ports/cortex_m85/gnu/src/tx_thread_secure_stack.c b/ports/cortex_m85/gnu/src/tx_thread_secure_stack.c
index 51a93e18..0d0cf1a3 100644
--- a/ports/cortex_m85/gnu/src/tx_thread_secure_stack.c
+++ b/ports/cortex_m85/gnu/src/tx_thread_secure_stack.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -98,21 +99,6 @@ static INT tx_head_free_index = 0U;
/* */
/* _tx_initialize_kernel_enter */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 10-16-2020 Scott Larson Modified comment(s), */
-/* resulting in version 6.1.1 */
-/* 06-02-2021 Scott Larson Change name, execute in */
-/* handler mode, */
-/* disable optimizations, */
-/* resulting in version 6.1.7 */
-/* 01-31-2022 Himanshu Gupta Modified comments(s), updated */
-/* secure stack allocation, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
__attribute__((cmse_nonsecure_entry, optimize(0)))
UINT _tx_thread_secure_mode_stack_initialize(void)
diff --git a/ports/cortex_m85/gnu/src/tx_thread_secure_stack_allocate.S b/ports/cortex_m85/gnu/src/tx_thread_secure_stack_allocate.S
index 907cb845..02e27a3c 100644
--- a/ports/cortex_m85/gnu/src/tx_thread_secure_stack_allocate.S
+++ b/ports/cortex_m85/gnu/src/tx_thread_secure_stack_allocate.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,14 +56,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
// {
diff --git a/ports/cortex_m85/gnu/src/tx_thread_secure_stack_free.S b/ports/cortex_m85/gnu/src/tx_thread_secure_stack_free.S
index a7ebdd53..da5a2520 100644
--- a/ports/cortex_m85/gnu/src/tx_thread_secure_stack_free.S
+++ b/ports/cortex_m85/gnu/src/tx_thread_secure_stack_free.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,14 +54,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_free(TX_THREAD *thread_ptr)
// {
diff --git a/ports/cortex_m85/gnu/src/tx_thread_secure_stack_initialize.S b/ports/cortex_m85/gnu/src/tx_thread_secure_stack_initialize.S
index fcf88b53..3f17fc59 100644
--- a/ports/cortex_m85/gnu/src/tx_thread_secure_stack_initialize.S
+++ b/ports/cortex_m85/gnu/src/tx_thread_secure_stack_initialize.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -53,18 +54,6 @@
/* */
/* TX_PORT_SPECIFIC_PRE_INITIALIZATION */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* resulting in version 6.1.12 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_secure_stack_initialize(VOID)
// {
diff --git a/ports/cortex_m85/gnu/src/tx_thread_stack_build.S b/ports/cortex_m85/gnu/src/tx_thread_stack_build.S
index 17f0fe26..b22d0830 100644
--- a/ports/cortex_m85/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_m85/gnu/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m85/gnu/src/tx_thread_system_return.S b/ports/cortex_m85/gnu/src/tx_thread_system_return.S
index a2b94618..bbb5a630 100644
--- a/ports/cortex_m85/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_m85/gnu/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,14 +57,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m85/gnu/src/tx_timer_interrupt.S b/ports/cortex_m85/gnu/src/tx_timer_interrupt.S
index 21ab9f63..0113be17 100644
--- a/ports/cortex_m85/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_m85/gnu/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,14 +58,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-08-2023 Scott Larson Include tx_user.h, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m85/gnu/src/txe_thread_secure_stack_allocate.c b/ports/cortex_m85/gnu/src/txe_thread_secure_stack_allocate.c
index 17cc9f53..43b4db08 100644
--- a/ports/cortex_m85/gnu/src/txe_thread_secure_stack_allocate.c
+++ b/ports/cortex_m85/gnu/src/txe_thread_secure_stack_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
{
@@ -76,10 +71,10 @@ UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_siz
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m85/gnu/src/txe_thread_secure_stack_free.c b/ports/cortex_m85/gnu/src/txe_thread_secure_stack_free.c
index a41b1c24..d6431134 100644
--- a/ports/cortex_m85/gnu/src/txe_thread_secure_stack_free.c
+++ b/ports/cortex_m85/gnu/src/txe_thread_secure_stack_free.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,12 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
{
@@ -74,10 +69,10 @@ UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m85/iar/inc/tx_port.h b/ports/cortex_m85/iar/inc/tx_port.h
index 6de8ea77..bf245049 100644
--- a/ports/cortex_m85/iar/inc/tx_port.h
+++ b/ports/cortex_m85/iar/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -45,39 +46,6 @@
/* This file replaces the previous Cortex-M85 files. It unifies */
/* the Cortex-M85 compilers into one common file. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 03-02-2021 Scott Larson Modified comment(s), added */
-/* ULONG64_DEFINED, */
-/* resulting in version 6.1.5 */
-/* 06-02-2021 Scott Larson Modified comment(s), removed */
-/* unneeded header file, funcs */
-/* set_control and get_control */
-/* changed to inline, */
-/* added symbol to enable */
-/* stack error handler, */
-/* resulting in version 6.1.7 */
-/* 10-15-2021 Scott Larson Modified comment(s), improved */
-/* stack check error handling, */
-/* resulting in version 6.1.9 */
-/* 01-31-2022 Scott Larson Modified comment(s), unified */
-/* this file across compilers, */
-/* fixed predefined macro, */
-/* resulting in version 6.1.10 */
-/* 04-25-2022 Scott Larson Modified comments and added */
-/* volatile to registers, */
-/* resulting in version 6.1.11 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* described BASEPRI usage, */
-/* resulting in version 6.1.12 */
-/* 03-08-2023 Scott Larson Removed unneeded #include, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -645,7 +613,7 @@ VOID _tx_thread_interrupt_restore(UIN
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-M85/IAR Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-M85/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_m85/iar/inc/tx_secure_interface.h b/ports/cortex_m85/iar/inc/tx_secure_interface.h
index 39b5d5fd..5ac37fbf 100644
--- a/ports/cortex_m85/iar/inc/tx_secure_interface.h
+++ b/ports/cortex_m85/iar/inc/tx_secure_interface.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,12 +38,6 @@
/* It is assumed that tx_api.h and tx_port.h have already been */
/* included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_SECURE_INTERFACE_H
diff --git a/ports/cortex_m85/iar/readme_threadx.txt b/ports/cortex_m85/iar/readme_threadx.txt
index 6a39bbc7..6436cfa8 100644
--- a/ports/cortex_m85/iar/readme_threadx.txt
+++ b/ports/cortex_m85/iar/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-M85
+ Microsoft's Azure RTOS ThreadX for Cortex-M85
Using the IAR Tools
@@ -6,33 +6,33 @@
1. Building the ThreadX run-time Library
Import all ThreadX common and port-specific source files into an IAR project.
-Configure the project to build a library rather than an executable. This
-results in the ThreadX run-time library file tx.a, which is needed by
+Configure the project to build a library rather than an executable. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
-Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
-replace the common files of the same name.
+Files tx_thread_stack_error_handler.c and tx_thread_stack_error_notify.c
+replace the common files of the same name.
2. Demonstration System
No demonstration is provided because the IAR EWARM 8.50 simulator does
-not simulate the Cortex-M85 correctly.
+not simulate the Cortex-M85 correctly.
3. System Initialization
-The entry point in ThreadX for the Cortex-M85 using IAR tools is at label
-__iar_program_start. This is defined within the IAR compiler's startup code.
-In addition, this is where all static and global preset C variable
+The entry point in ThreadX for the Cortex-M85 using IAR tools is at label
+__iar_program_start. This is defined within the IAR compiler's startup code.
+In addition, this is where all static and global preset C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, and a periodic timer interrupt source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, and a periodic timer interrupt source.
The _tx_initialize_low_level function inside of tx_initialize_low_level.s
-also determines the first available address for use by the application, which
-is supplied as the sole input parameter to your application definition function,
-tx_application_define. To accomplish this, a section is created in
-tx_initialize_low_level.s called FREE_MEM, which must be located after all
+also determines the first available address for use by the application, which
+is supplied as the sole input parameter to your application definition function,
+tx_application_define. To accomplish this, a section is created in
+tx_initialize_low_level.s called FREE_MEM, which must be located after all
other RAM sections in memory.
@@ -41,7 +41,7 @@ other RAM sections in memory.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have the same stack frame in the Cortex-M85 version of
-ThreadX. The top of the suspended thread's stack is pointed to by
+ThreadX. The top of the suspended thread's stack is pointed to by
tx_thread_stack_ptr in the associated thread control block TX_THREAD.
Non-FPU Stack Frame:
@@ -124,17 +124,17 @@ FPU Stack Frame (only interrupted thread with FPU enabled):
5. Improving Performance
-To make ThreadX and the application(s) run faster, you can enable
-all compiler optimizations.
+To make ThreadX and the application(s) run faster, you can enable
+all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
6. Interrupt Handling
-The Cortex-M85 vectors start at the label __vector_table and is typically defined in a
+The Cortex-M85 vectors start at the label __vector_table and is typically defined in a
startup.s file (or similar). The application may modify the vector area according to its needs.
@@ -182,14 +182,14 @@ should have the following line added (if not already in place):
initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
-The project options "General Options -> Library Configuration" should also have the
+The project options "General Options -> Library Configuration" should also have the
"Enable thread support in library" box selected.
8. VFP Support
-ThreadX for Cortex-M85 supports automatic ("lazy") VFP support, which means that applications threads
-can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
+ThreadX for Cortex-M85 supports automatic ("lazy") VFP support, which means that applications threads
+can simply use the VFP and ThreadX automatically maintains the VFP registers as part of the thread
context.
diff --git a/ports/cortex_m85/iar/src/tx_iar.c b/ports/cortex_m85/iar/src/tx_iar.c
index c6092de3..238b485e 100644
--- a/ports/cortex_m85/iar/src/tx_iar.c
+++ b/ports/cortex_m85/iar/src/tx_iar.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,24 +423,24 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#include
+#include
void * __aeabi_read_tp();
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports/cortex_m85/iar/src/tx_initialize_low_level.s b/ports/cortex_m85/iar/src/tx_initialize_low_level.s
index 9c113881..64260c52 100644
--- a/ports/cortex_m85/iar/src/tx_initialize_low_level.s
+++ b/ports/cortex_m85/iar/src/tx_initialize_low_level.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,13 +75,6 @@ __tx_free_memory_start
/* CALLED BY */
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_initialize_low_level(VOID)
// {
diff --git a/ports/cortex_m85/iar/src/tx_misra.s b/ports/cortex_m85/iar/src/tx_misra.s
index f86d9a65..642bb89e 100644
--- a/ports/cortex_m85/iar/src/tx_misra.s
+++ b/ports/cortex_m85/iar/src/tx_misra.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -120,7 +121,7 @@
SECTION `.data`:DATA:REORDER:NOROOT(2)
DATA
-// 51 CHAR _tx_version_id[100] = "Copyright (c) 2024 Microsoft Corporation. * ThreadX 6.1 MISRA C Compliant *";
+// 51 CHAR _tx_version_id[100] = "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX 6.1 MISRA C Compliant *";
_tx_version_id:
DC8 43H, 6FH, 70H, 79H, 72H, 69H, 67H, 68H
DC8 74H, 20H, 28H, 63H, 29H, 20H, 31H, 39H
@@ -707,7 +708,7 @@ _tx_misra_control_get:
MRS R0, CONTROL
BX LR // return
-
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -722,7 +723,7 @@ _tx_misra_control_set:
MSR CONTROL, R0
BX LR // return
-
+
#ifdef __ARMVFP__
/***********************************************************************************************/
@@ -739,8 +740,8 @@ _tx_misra_fpccr_get:
LDR r0, =0xE000EF34 // Build FPCCR address
LDR r0, [r0] // Load FPCCR value
BX LR // return
-
-
+
+
/***********************************************************************************************/
/***********************************************************************************************/
/** */
@@ -754,10 +755,10 @@ _tx_misra_fpccr_get:
_tx_misra_vfp_touch:
vmov.f32 s0, s0
BX LR // return
-
+
#endif
-
-
+
+
SECTION `.iar_vfe_header`:DATA:NOALLOC:NOROOT(2)
SECTION_TYPE SHT_PROGBITS, 0
DATA
diff --git a/ports/cortex_m85/iar/src/tx_thread_context_restore.s b/ports/cortex_m85/iar/src/tx_thread_context_restore.s
index 349d3e20..ca914644 100644
--- a/ports/cortex_m85/iar/src/tx_thread_context_restore.s
+++ b/ports/cortex_m85/iar/src/tx_thread_context_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,13 +56,6 @@
/* CALLED BY */
/* */
/* ISRs Interrupt Service Routines */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_restore(VOID)
// {
diff --git a/ports/cortex_m85/iar/src/tx_thread_context_save.s b/ports/cortex_m85/iar/src/tx_thread_context_save.s
index dcad5553..ec1c3538 100644
--- a/ports/cortex_m85/iar/src/tx_thread_context_save.s
+++ b/ports/cortex_m85/iar/src/tx_thread_context_save.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,13 +56,6 @@
/* CALLED BY */
/* */
/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_context_save(VOID)
// {
diff --git a/ports/cortex_m85/iar/src/tx_thread_interrupt_control.s b/ports/cortex_m85/iar/src/tx_thread_interrupt_control.s
index 86f54c3e..24cc2ff7 100644
--- a/ports/cortex_m85/iar/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_m85/iar/src/tx_thread_interrupt_control.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,13 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_control(UINT new_posture)
// {
diff --git a/ports/cortex_m85/iar/src/tx_thread_interrupt_disable.s b/ports/cortex_m85/iar/src/tx_thread_interrupt_disable.s
index d58176c2..414b53dd 100644
--- a/ports/cortex_m85/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_m85/iar/src/tx_thread_interrupt_disable.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,13 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_interrupt_disable(VOID)
// {
diff --git a/ports/cortex_m85/iar/src/tx_thread_interrupt_restore.s b/ports/cortex_m85/iar/src/tx_thread_interrupt_restore.s
index d21b373e..c9ce1596 100644
--- a/ports/cortex_m85/iar/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_m85/iar/src/tx_thread_interrupt_restore.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -55,13 +56,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_interrupt_restore(UINT previous_posture)
// {
diff --git a/ports/cortex_m85/iar/src/tx_thread_schedule.s b/ports/cortex_m85/iar/src/tx_thread_schedule.s
index d54fd420..fa2d7ba0 100644
--- a/ports/cortex_m85/iar/src/tx_thread_schedule.s
+++ b/ports/cortex_m85/iar/src/tx_thread_schedule.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -73,23 +74,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* _tx_thread_system_return Return to system from thread */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 04-02-2021 Scott Larson Modified comment(s), added */
-/* low power code, */
-/* resulting in version 6.1.6 */
-/* 06-02-2021 Scott Larson Added secure stack initialize */
-/* in SVC handler, */
-/* resulting in version 6.1.7 */
-/* 04-25-2022 Scott Larson Added BASEPRI support, */
-/* resulting in version 6.1.11 */
-/* 03-08-2023 Scott Larson Added preproc FPU option, */
-/* resulting in version 6.2.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_schedule(VOID)
// {
@@ -348,7 +332,7 @@ SVC_Handler:
CMP r1, #2 // Is it a secure stack free request?
BEQ _tx_svc_secure_free // Yes, go there
-
+
CMP r1, #3 // Is it a secure stack init request?
BEQ _tx_svc_secure_init // Yes, go there
diff --git a/ports/cortex_m85/iar/src/tx_thread_secure_stack.c b/ports/cortex_m85/iar/src/tx_thread_secure_stack.c
index 4360e63b..c4b79ad1 100644
--- a/ports/cortex_m85/iar/src/tx_thread_secure_stack.c
+++ b/ports/cortex_m85/iar/src/tx_thread_secure_stack.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -102,20 +103,6 @@ static INT tx_head_free_index = 0U;
/* */
/* _tx_initialize_kernel_enter */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* 10-16-2020 Scott Larson Modified comment(s), */
-/* resulting in version 6.1.1 */
-/* 06-02-2021 Scott Larson Change name, execute in */
-/* handler mode, */
-/* resulting in version 6.1.7 */
-/* 01-31-2022 Himanshu Gupta Modified comments(s), updated */
-/* secure stack allocation, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
__attribute__((cmse_nonsecure_entry))
UINT _tx_thread_secure_mode_stack_initialize(void)
diff --git a/ports/cortex_m85/iar/src/tx_thread_secure_stack_allocate.s b/ports/cortex_m85/iar/src/tx_thread_secure_stack_allocate.s
index 7cb99950..112f0136 100644
--- a/ports/cortex_m85/iar/src/tx_thread_secure_stack_allocate.s
+++ b/ports/cortex_m85/iar/src/tx_thread_secure_stack_allocate.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -56,13 +57,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
// {
diff --git a/ports/cortex_m85/iar/src/tx_thread_secure_stack_free.s b/ports/cortex_m85/iar/src/tx_thread_secure_stack_free.s
index 206369e6..e0cc7a87 100644
--- a/ports/cortex_m85/iar/src/tx_thread_secure_stack_free.s
+++ b/ports/cortex_m85/iar/src/tx_thread_secure_stack_free.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,13 +55,6 @@
/* CALLED BY */
/* */
/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// UINT _tx_thread_secure_stack_free(TX_THREAD *thread_ptr)
// {
diff --git a/ports/cortex_m85/iar/src/tx_thread_secure_stack_initialize.s b/ports/cortex_m85/iar/src/tx_thread_secure_stack_initialize.s
index dd92ca35..364044bc 100644
--- a/ports/cortex_m85/iar/src/tx_thread_secure_stack_initialize.s
+++ b/ports/cortex_m85/iar/src/tx_thread_secure_stack_initialize.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,17 +55,6 @@
/* CALLED BY */
/* */
/* TX_PORT_SPECIFIC_PRE_INITIALIZATION */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 06-02-2021 Scott Larson Initial Version 6.1.7 */
-/* 07-29-2022 Scott Larson Modified comments and changed */
-/* secure stack initialization */
-/* macro to port-specific, */
-/* resulting in version 6.1.12 */
-/* */
/**************************************************************************/
// VOID _tx_thread_secure_stack_initialize(VOID)
// {
diff --git a/ports/cortex_m85/iar/src/tx_thread_stack_build.s b/ports/cortex_m85/iar/src/tx_thread_stack_build.s
index d21f51b3..b6b5837e 100644
--- a/ports/cortex_m85/iar/src/tx_thread_stack_build.s
+++ b/ports/cortex_m85/iar/src/tx_thread_stack_build.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,13 +58,6 @@
/* CALLED BY */
/* */
/* _tx_thread_create Create thread service */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
// {
diff --git a/ports/cortex_m85/iar/src/tx_thread_system_return.s b/ports/cortex_m85/iar/src/tx_thread_system_return.s
index 07d9a5dd..768262a2 100644
--- a/ports/cortex_m85/iar/src/tx_thread_system_return.s
+++ b/ports/cortex_m85/iar/src/tx_thread_system_return.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -57,13 +58,6 @@
/* CALLED BY */
/* */
/* ThreadX components */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_thread_system_return(VOID)
// {
diff --git a/ports/cortex_m85/iar/src/tx_timer_interrupt.s b/ports/cortex_m85/iar/src/tx_timer_interrupt.s
index e1ce095a..b7d7c589 100644
--- a/ports/cortex_m85/iar/src/tx_timer_interrupt.s
+++ b/ports/cortex_m85/iar/src/tx_timer_interrupt.s
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -71,13 +72,6 @@
/* CALLED BY */
/* */
/* interrupt vector */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
// VOID _tx_timer_interrupt(VOID)
// {
diff --git a/ports/cortex_m85/iar/src/txe_thread_secure_stack_allocate.c b/ports/cortex_m85/iar/src/txe_thread_secure_stack_allocate.c
index 17cc9f53..43b4db08 100644
--- a/ports/cortex_m85/iar/src/txe_thread_secure_stack_allocate.c
+++ b/ports/cortex_m85/iar/src/txe_thread_secure_stack_allocate.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -63,12 +64,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_size)
{
@@ -76,10 +71,10 @@ UINT _txe_thread_secure_stack_allocate(TX_THREAD *thread_ptr, ULONG stack_siz
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_m85/iar/src/txe_thread_secure_stack_free.c b/ports/cortex_m85/iar/src/txe_thread_secure_stack_free.c
index a41b1c24..d6431134 100644
--- a/ports/cortex_m85/iar/src/txe_thread_secure_stack_free.c
+++ b/ports/cortex_m85/iar/src/txe_thread_secure_stack_free.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -61,12 +62,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 Scott Larson Initial Version 6.1 */
-/* */
/**************************************************************************/
UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
{
@@ -74,10 +69,10 @@ UINT _txe_thread_secure_stack_free(TX_THREAD *thread_ptr)
return(TX_FEATURE_NOT_ENABLED);
#else
UINT status;
-
+
/* Default status to success. */
status = TX_SUCCESS;
-
+
/* Check for an invalid thread pointer. */
if (thread_ptr == TX_NULL)
{
@@ -93,7 +88,7 @@ UINT status;
/* Thread pointer is invalid, return appropriate error code. */
status = TX_THREAD_ERROR;
}
-
+
/* Check for interrupt call. */
if (TX_THREAD_GET_SYSTEM_STATE() != ((ULONG) 0))
{
@@ -104,7 +99,7 @@ UINT status;
status = TX_CALLER_ERROR;
}
}
-
+
/* Determine if everything is okay. */
if (status == TX_SUCCESS)
{
diff --git a/ports/cortex_r4/ac5/example_build/sample_threadx.c b/ports/cortex_r4/ac5/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/cortex_r4/ac5/example_build/sample_threadx.c
+++ b/ports/cortex_r4/ac5/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_r4/ac5/example_build/tx_initialize_low_level.s b/ports/cortex_r4/ac5/example_build/tx_initialize_low_level.s
index c36819eb..6d7ddf4f 100644
--- a/ports/cortex_r4/ac5/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_r4/ac5/example_build/tx_initialize_low_level.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -90,45 +90,39 @@ __vectors
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level Cortex-R4/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level Cortex-R4/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -179,7 +173,7 @@ _tx_initialize_low_level
; _tx_thread_system_stack_ptr = (VOID_PTR) (sp);
;
LDR r1, =_tx_thread_system_stack_ptr ; Pickup address of system stack ptr
- LDR r0, [r1, #0] ; Pickup system stack
+ LDR r0, [r1, #0] ; Pickup system stack
ADD r0, r0, #4 ; Increment to next free word
;
; /* Save the first available memory address. */
@@ -201,7 +195,7 @@ _tx_initialize_low_level
;
;
;/* Define initial heap/stack routine for the ARM RealView (and ADS) startup code. This
-; routine will set the initial stack to use the ThreadX IRQ & FIQ &
+; routine will set the initial stack to use the ThreadX IRQ & FIQ &
; (optionally SYS) stack areas. */
;
EXPORT __user_initial_stackheap
@@ -253,7 +247,7 @@ __tx_reserved_handler
;
;
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -261,21 +255,21 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
BL _tx_timer_interrupt ; Timer interrupt handler
_tx_not_timer_interrupt
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -285,7 +279,7 @@ _tx_not_timer_interrupt
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -301,28 +295,28 @@ _tx_not_timer_interrupt
__tx_example_vectored_irq_handler
;
;
-; /* Save initial context and call context save to prepare for
+; /* Save initial context and call context save to prepare for
; vectored ISR execution. */
;
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
; BL _tx_thread_vectored_context_save ; Vectored context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -331,7 +325,7 @@ __tx_example_vectored_irq_handler
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
@@ -353,11 +347,11 @@ __tx_fiq_processing_return
; /* At this point execution is still in the FIQ mode. The CPSR, point of
; interrupt, and all C scratch registers are available for use. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
; from FIQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with FIQ interrupts enabled.
+; system mode and returns with FIQ interrupts enabled.
;
-; NOTE: It is very important to ensure all FIQ interrupts are cleared
+; NOTE: It is very important to ensure all FIQ interrupts are cleared
; prior to enabling nested FIQ interrupts. */
IF :DEF:TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/cortex_r4/ac5/inc/tx_port.h b/ports/cortex_r4/ac5/inc/tx_port.h
index 81b50433..07233290 100644
--- a/ports/cortex_r4/ac5/inc/tx_port.h
+++ b/ports/cortex_r4/ac5/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-R4/AC5 */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-R4/AC5 */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -75,7 +67,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -111,12 +103,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -126,8 +118,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -174,7 +166,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -186,13 +178,13 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable;
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -206,11 +198,11 @@ typedef unsigned short USHORT;
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -218,8 +210,8 @@ typedef unsigned short USHORT;
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -246,21 +238,21 @@ typedef unsigned short USHORT;
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef __thumb
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (ULONG) __clz((unsigned int) m); \
- b = 31 - b;
+ b = 31 - b;
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -280,7 +272,7 @@ typedef unsigned short USHORT;
{ \
__enable_irq(); \
__enable_fiq(); \
- }
+ }
#else
@@ -289,7 +281,7 @@ typedef unsigned short USHORT;
#define TX_RESTORE if (!interrupt_save_disabled) \
{ \
__enable_irq(); \
- }
+ }
#endif
#else
@@ -325,8 +317,8 @@ void tx_thread_vfp_disable(void);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-R4/AC5 Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-R4/AC5 Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_r4/ac5/readme_threadx.txt b/ports/cortex_r4/ac5/readme_threadx.txt
index d27aa166..718f1c03 100644
--- a/ports/cortex_r4/ac5/readme_threadx.txt
+++ b/ports/cortex_r4/ac5/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-R4
+ Microsoft's Azure RTOS ThreadX for Cortex-R4
Thumb & 32-bit Mode
@@ -6,21 +6,21 @@
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the ARM
-AC5 development environment. At this point you may run the build_threadx.bat
-batch file. This will build the ThreadX run-time environment in the
-"example_build" directory.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the ARM
+AC5 development environment. At this point you may run the build_threadx.bat
+batch file. This will build the ThreadX run-time environment in the
+"example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
1.1 Building with Project Files
-The ThreadX library can also be built via project files. Simply open
-the tx.mcp file with project builder and select make. This will place
+The ThreadX library can also be built via project files. Simply open
+the tx.mcp file with project builder and select make. This will place
the tx.a library file into the Debug sub-directory.
@@ -29,45 +29,45 @@ the tx.a library file into the Debug sub-directory.
The ThreadX demonstration is designed to execute under the ARM
Windows-based simulator.
-Building the demonstration is easy; simply execute the build_threadx_demo.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_demo.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.axf
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.axf
is a binary file that can be downloaded and executed on the ARM simulator.
2.0.1 Building with Project Files
-The ThreadX demonstration can also be built via project files. Simply open
-the sample_threadx.mcp file with project builder and select make. This will place
+The ThreadX demonstration can also be built via project files. Simply open
+the sample_threadx.mcp file with project builder and select make. This will place
the sample_threadx.axf output image into the Debug sub-directory.
3. System Initialization
-The entry point in ThreadX for the Cortex-R4 using AC5 tools is at label
-__main. This is defined within the AC5 compiler's startup code. In
-addition, this is where all static and global pre-set C variable
+The entry point in ThreadX for the Cortex-R4 using AC5 tools is at label
+__main. This is defined within the AC5 compiler's startup code. In
+addition, this is where all static and global pre-set C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source. By default, the vector area is defined to be located in the Init area,
-which is defined at the top of tx_initialize_low_level.s. This area is typically
-located at 0. In situations where this is impossible, the vectors at the beginning
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source. By default, the vector area is defined to be located in the Init area,
+which is defined at the top of tx_initialize_low_level.s. This area is typically
+located at 0. In situations where this is impossible, the vectors at the beginning
of the Init area should be copied to address 0.
This is also where initialization of a periodic timer interrupt source
should take place.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
4. Assembler / Compiler Switches
-The following are compiler switches used in building the demonstration
+The following are compiler switches used in building the demonstration
system:
Compiler Switch Meaning
@@ -83,10 +83,10 @@ Linker Switch Meaning
-o demo.axf Specifies demo output file name
--elf Specifies elf output file format
--ro Specifies that Read-Only memory starts at address 0
- --first tx_initialize_low_level.o(Init)
+ --first tx_initialize_low_level.o(Init)
Specifies that the first area loaded is Init
--remove Remove unused areas
- --list Specifies map file name
+ --list Specifies map file name
--symbols Specifies symbols for map file
--map Creates a map file
@@ -97,161 +97,161 @@ Application Defines
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
--PD "TX_ENABLE_IRQ_NESTING SETL {TRUE}" This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s.
--PD "TX_ENABLE_FIQ_NESTING SETL {TRUE}" This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s. In addition,
IRQ nesting should also be enabled.
-DTX_ENABLE_FIQ_SUPPORT This compiler define enables FIQ
interrupt handling in the ThreadX
- generic C source. This define
+ generic C source. This define
should also be used in conjunction
with the corresponding assembler
- define.
+ define.
-DTX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- -DTX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ -DTX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- -DTX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ -DTX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- -DTX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ -DTX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- -DTX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ -DTX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- -DTX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ -DTX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- -DTX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ -DTX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- -DTX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ -DTX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- -DTX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ -DTX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- -DTX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ -DTX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- -DTX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ -DTX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- -DTX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ -DTX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- -DTX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ -DTX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- -DTX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ -DTX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- -DTX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ -DTX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- -DTX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ -DTX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- -DTX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ -DTX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- -DTX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ -DTX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- -DTX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ -DTX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- -DTX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ -DTX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
-DTX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- -DTX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ -DTX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- -DTX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ -DTX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
5. Register Usage and Stack Frames
-The AC5 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The AC5 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -269,39 +269,39 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
-performance. To make it run faster, you can change the build_threadx.bat file to
-remove the -g option and enable all compiler optimizations.
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
+performance. To make it run faster, you can change the build_threadx.bat file to
+remove the -g option and enable all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-R4
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-R4 vectors start at address zero. The demonstration system startup
-Init area contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+Init area contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -312,12 +312,12 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -325,7 +325,7 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -338,7 +338,7 @@ __tx_irq_processing_return
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.s:
EXPORT __tx_irq_example_handler
@@ -348,12 +348,12 @@ __tx_irq_example_handler
STMDB sp!, {r0-r3} ; Save some scratch registers
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
BL _tx_thread_vectored_context_save ; Call the vectored IRQ context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -370,22 +370,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested IRQ interrupts are no longer required,
calling the _tx_thread_irq_nesting_end service disables nesting by disabling
-IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
+IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -393,10 +393,10 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* Enable nested IRQ interrupts. NOTE: Since this service returns
-; with IRQ interrupts enabled, all IRQ interrupt sources must be
+; with IRQ interrupts enabled, all IRQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-;
+;
; /* Application ISR call(s) go here! */
;
; /* Disable nested IRQ interrupts. The mode is switched back to
@@ -409,12 +409,12 @@ __tx_irq_processing_return
7.3 FIQ Interrupts
-By default, Cortex-R4 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, Cortex-R4 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -423,7 +423,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.s.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.s:
@@ -451,18 +451,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -478,7 +478,7 @@ __tx_fiq_processing_return
; interrupt, and all C scratch registers are available for use. */
;
; /* Enable nested FIQ interrupts. NOTE: Since this service returns
-; with FIQ interrupts enabled, all FIQ interrupt sources must be
+; with FIQ interrupts enabled, all FIQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
;
@@ -494,29 +494,29 @@ __tx_fiq_processing_return
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.s in the Integrator sub-directories.
9. Thumb/Cortex-R4 Mixed Mode
-By default, ThreadX is setup for running in Cortex-R4 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
-ThreadX file and/or the application in Thumb mode. If any Thumb code
-is used the entire ThreadX source- both C and assembly - should be built
+By default, ThreadX is setup for running in Cortex-R4 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
+ThreadX file and/or the application in Thumb mode. If any Thumb code
+is used the entire ThreadX source- both C and assembly - should be built
with the "-apcs /interwork" option.
10. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_r4/ac5/src/tx_thread_context_restore.s b/ports/cortex_r4/ac5/src/tx_thread_context_restore.s
index 3a4eef8c..0572cd1c 100644
--- a/ports/cortex_r4/ac5/src/tx_thread_context_restore.s
+++ b/ports/cortex_r4/ac5/src/tx_thread_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -54,44 +54,38 @@ SVC_MODE EQU 0x93 ; SVC mode
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore Cortex-R4/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore Cortex-R4/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -121,13 +115,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3, #0] ; Store the counter
+ STR r2, [r3, #0] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
diff --git a/ports/cortex_r4/ac5/src/tx_thread_context_save.s b/ports/cortex_r4/ac5/src/tx_thread_context_save.s
index c03187e4..c3c6de9b 100644
--- a/ports/cortex_r4/ac5/src/tx_thread_context_save.s
+++ b/ports/cortex_r4/ac5/src/tx_thread_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -39,43 +39,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save Cortex-R4/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save Cortex-R4/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
@@ -90,7 +84,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
IF :DEF:TX_ENABLE_FIQ_SUPPORT
CPSID if ; Disable FIQ interrupts
ENDIF
@@ -108,7 +102,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -124,7 +118,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -138,13 +132,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -164,7 +158,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -174,7 +168,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -189,7 +183,7 @@ __tx_thread_idle_system_save
ENDIF
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports/cortex_r4/ac5/src/tx_thread_fiq_context_restore.s b/ports/cortex_r4/ac5/src/tx_thread_fiq_context_restore.s
index e2a712a7..89cab39d 100644
--- a/ports/cortex_r4/ac5/src/tx_thread_fiq_context_restore.s
+++ b/ports/cortex_r4/ac5/src/tx_thread_fiq_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -32,7 +32,7 @@
;
SVC_MODE EQU 0xD3 ; SVC mode
FIQ_MODE EQU 0xD1 ; FIQ mode
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
;
@@ -50,44 +50,38 @@ IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_restore Cortex-R4/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_restore Cortex-R4/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the fiq interrupt context when processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* FIQ ISR Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the fiq interrupt context when processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* FIQ ISR Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_context_restore(VOID)
@@ -113,13 +107,13 @@ _tx_thread_fiq_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -163,7 +157,7 @@ __tx_thread_fiq_no_preempt_restore
; /* Restore interrupted thread or ISR. */
;
; /* Pickup the saved stack pointer. */
-; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
+; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
;
; /* Recover the saved context and return to the point of interrupt. */
;
@@ -207,7 +201,7 @@ _tx_skip_fiq_vfp_save
MOV r3, #1 ; Build interrupt stack type
STMDB sp!, {r3, r4} ; Save interrupt stack type and SPSR
STR sp, [r0, #8] ; Save stack pointer in thread control
- ; block
+ ; block
;
; /* Save the remaining time-slice and disable it. */
; if (_tx_timer_time_slice)
@@ -219,7 +213,7 @@ _tx_skip_fiq_vfp_save
BEQ __tx_thread_fiq_dont_save_ts ; No, don't save it
;
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-; _tx_timer_time_slice = 0;
+; _tx_timer_time_slice = 0;
;
STR r2, [r0, #24] ; Save thread's time-slice
MOV r2, #0 ; Clear value
diff --git a/ports/cortex_r4/ac5/src/tx_thread_fiq_context_save.s b/ports/cortex_r4/ac5/src/tx_thread_fiq_context_save.s
index 9026e56d..8fd1fcac 100644
--- a/ports/cortex_r4/ac5/src/tx_thread_fiq_context_save.s
+++ b/ports/cortex_r4/ac5/src/tx_thread_fiq_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -39,43 +39,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_save Cortex-R4/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_save Cortex-R4/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
; VOID _tx_thread_fiq_context_save(VOID)
@@ -90,7 +84,7 @@ _tx_thread_fiq_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -105,7 +99,7 @@ _tx_thread_fiq_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -121,38 +115,38 @@ _tx_thread_fiq_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
__tx_thread_fiq_not_nested_save
-; }
+; }
;
; /* Otherwise, not nested, check to see if a thread was running. */
; else if (_tx_thread_current_ptr)
-; {
+; {
;
ADD r2, r2, #1 ; Increment the interrupt counter
STR r2, [r3] ; Store it back in the variable
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
-; ; scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
+; ; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, lr} ; Store other registers, Note that we don't
-; ; need to save sl and ip since FIQ has
-; ; copies of these registers. Nested
+; ; need to save sl and ip since FIQ has
+; ; copies of these registers. Nested
; ; interrupt processing does need to save
; ; these registers.
;
; /* Save the current stack pointer in the thread's control block. */
-; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
;
; /* Switch to the system stack. */
-; sp = _tx_thread_system_stack_ptr;
+; sp = _tx_thread_system_stack_ptr;
;
MOV r10, #0 ; Clear stack limit
@@ -165,7 +159,7 @@ __tx_thread_fiq_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
; else
@@ -185,18 +179,18 @@ __tx_thread_fiq_idle_system_save
ENDIF
;
; /* Not much to do here, save the current SPSR and LR for possible
-; use in IRQ interrupted in idle system conditions, and return to
+; use in IRQ interrupted in idle system conditions, and return to
; FIQ interrupt processing. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, lr} ; Store other registers that will get used
-; ; or stripped off the stack in context
-; ; restore
- B __tx_fiq_processing_return ; Continue FIQ processing
+; ; or stripped off the stack in context
+; ; restore
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
-;}
+;}
;
END
diff --git a/ports/cortex_r4/ac5/src/tx_thread_fiq_nesting_end.s b/ports/cortex_r4/ac5/src/tx_thread_fiq_nesting_end.s
index a26bab46..2f67e820 100644
--- a/ports/cortex_r4/ac5/src/tx_thread_fiq_nesting_end.s
+++ b/ports/cortex_r4/ac5/src/tx_thread_fiq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
FIQ_MODE_BITS EQU 0x11 ; FIQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_end Cortex-R4/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_end Cortex-R4/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-;/* processing from system mode back to FIQ mode prior to the ISR */
-;/* calling _tx_thread_fiq_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+;/* processing from system mode back to FIQ mode prior to the ISR */
+;/* calling _tx_thread_fiq_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_fiq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #FIQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/cortex_r4/ac5/src/tx_thread_fiq_nesting_start.s b/ports/cortex_r4/ac5/src/tx_thread_fiq_nesting_start.s
index d714b4b3..d5e01f06 100644
--- a/ports/cortex_r4/ac5/src/tx_thread_fiq_nesting_start.s
+++ b/ports/cortex_r4/ac5/src/tx_thread_fiq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_start Cortex-R4/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_start Cortex-R4/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-;/* processing to the system mode so nested FIQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+;/* processing to the system mode so nested FIQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/cortex_r4/ac5/src/tx_thread_interrupt_control.s b/ports/cortex_r4/ac5/src/tx_thread_interrupt_control.s
index e69cb941..e242582c 100644
--- a/ports/cortex_r4/ac5/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_r4/ac5/src/tx_thread_interrupt_control.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,42 +36,36 @@ INT_MASK EQU 0x80 ; Interrupt bit mask
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control Cortex-R4/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control Cortex-R4/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/cortex_r4/ac5/src/tx_thread_interrupt_disable.s b/ports/cortex_r4/ac5/src/tx_thread_interrupt_disable.s
index 239cb49e..62158e06 100644
--- a/ports/cortex_r4/ac5/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_r4/ac5/src/tx_thread_interrupt_disable.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -29,41 +29,35 @@
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable Cortex-R4/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable Cortex-R4/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(void)
@@ -80,7 +74,7 @@ _tx_thread_interrupt_disable
IF :DEF:TX_ENABLE_FIQ_SUPPORT
CPSID if ; Disable IRQ and FIQ
ELSE
- CPSID i ; Disable IRQ
+ CPSID i ; Disable IRQ
ENDIF
IF {INTER} = {TRUE}
diff --git a/ports/cortex_r4/ac5/src/tx_thread_interrupt_restore.s b/ports/cortex_r4/ac5/src/tx_thread_interrupt_restore.s
index bbf8ccd7..36bdebf1 100644
--- a/ports/cortex_r4/ac5/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_r4/ac5/src/tx_thread_interrupt_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -29,42 +29,36 @@
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore Cortex-R4/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore Cortex-R4/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function is responsible for restoring interrupts to the state */
;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/cortex_r4/ac5/src/tx_thread_irq_nesting_end.s b/ports/cortex_r4/ac5/src/tx_thread_irq_nesting_end.s
index 2c718a74..ab4ff39b 100644
--- a/ports/cortex_r4/ac5/src/tx_thread_irq_nesting_end.s
+++ b/ports/cortex_r4/ac5/src/tx_thread_irq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end Cortex-R4/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end Cortex-R4/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_irq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #IRQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/cortex_r4/ac5/src/tx_thread_irq_nesting_start.s b/ports/cortex_r4/ac5/src/tx_thread_irq_nesting_start.s
index 2bd74a99..01442b0c 100644
--- a/ports/cortex_r4/ac5/src/tx_thread_irq_nesting_start.s
+++ b/ports/cortex_r4/ac5/src/tx_thread_irq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start Cortex-R4/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start Cortex-R4/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/cortex_r4/ac5/src/tx_thread_schedule.s b/ports/cortex_r4/ac5/src/tx_thread_schedule.s
index 64af5589..fb788268 100644
--- a/ports/cortex_r4/ac5/src/tx_thread_schedule.s
+++ b/ports/cortex_r4/ac5/src/tx_thread_schedule.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -40,45 +40,39 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule Cortex-R4/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule Cortex-R4/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
@@ -107,7 +101,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -120,7 +114,7 @@ __tx_thread_schedule_loop
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
;
- LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
STR r0, [r1, #0] ; Setup current thread pointer
;
; /* Increment the run count for this thread. */
@@ -134,7 +128,7 @@ __tx_thread_schedule_loop
; /* Setup time-slice, if present. */
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
;
- LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
+ LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
; variable
LDR sp, [r0, #8] ; Switch stack pointers
STR r3, [r2, #0] ; Setup time-slice
diff --git a/ports/cortex_r4/ac5/src/tx_thread_stack_build.s b/ports/cortex_r4/ac5/src/tx_thread_stack_build.s
index 2f21d30c..d2ffcd2f 100644
--- a/ports/cortex_r4/ac5/src/tx_thread_stack_build.s
+++ b/ports/cortex_r4/ac5/src/tx_thread_stack_build.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -41,44 +41,38 @@ THUMB_BIT EQU 0x20 ; Thumb-bit
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build Cortex-R4/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build Cortex-R4/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function builds a stack frame on the supplied thread's stack. */
;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
;/* thread_ptr Pointer to thread control blk */
;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -86,10 +80,10 @@ THUMB_BIT EQU 0x20 ; Thumb-bit
EXPORT _tx_thread_stack_build
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-R4 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports/cortex_r4/ac5/src/tx_thread_system_return.s b/ports/cortex_r4/ac5/src/tx_thread_system_return.s
index f6128d56..cd3ffb00 100644
--- a/ports/cortex_r4/ac5/src/tx_thread_system_return.s
+++ b/ports/cortex_r4/ac5/src/tx_thread_system_return.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -33,50 +33,44 @@
IMPORT _tx_timer_time_slice
IMPORT _tx_thread_schedule
IF :DEF:TX_ENABLE_EXECUTION_CHANGE_NOTIFY
- IMPORT _tx_execution_thread_exit
+ IMPORT _tx_execution_thread_exit
ENDIF
;
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return Cortex-R4/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return Cortex-R4/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
@@ -103,7 +97,7 @@ _tx_skip_solicited_vfp_save
MOV r0, #0 ; Build a solicited stack type
MRS r1, CPSR ; Pickup the CPSR
STMDB sp!, {r0-r1} ; Save type and CPSR
-;
+;
; /* Lockout interrupts. */
;
IF :DEF:TX_ENABLE_FIQ_SUPPORT
diff --git a/ports/cortex_r4/ac5/src/tx_thread_vectored_context_save.s b/ports/cortex_r4/ac5/src/tx_thread_vectored_context_save.s
index aec5717d..8d3f023d 100644
--- a/ports/cortex_r4/ac5/src/tx_thread_vectored_context_save.s
+++ b/ports/cortex_r4/ac5/src/tx_thread_vectored_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -38,43 +38,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save Cortex-R4/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save Cortex-R4/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_vectored_context_save(VOID)
@@ -107,7 +101,7 @@ _tx_thread_vectored_context_save
; /* Return to the ISR. */
;
MOV r10, #0 ; Clear stack limit
-
+
IF :DEF:TX_ENABLE_EXECUTION_CHANGE_NOTIFY
;
; /* Call the ISR enter function to indicate an ISR is executing. */
@@ -135,7 +129,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -171,7 +165,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports/cortex_r4/ac5/src/tx_timer_interrupt.s b/ports/cortex_r4/ac5/src/tx_timer_interrupt.s
index a5d96fda..10e49b6c 100644
--- a/ports/cortex_r4/ac5/src/tx_timer_interrupt.s
+++ b/ports/cortex_r4/ac5/src/tx_timer_interrupt.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Timer */
;/** */
@@ -44,46 +44,40 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt Cortex-R4/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt Cortex-R4/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -107,7 +101,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -225,13 +219,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports/cortex_r4/ac6/example_build/sample_threadx/.cproject b/ports/cortex_r4/ac6/example_build/sample_threadx/.cproject
index e2104d21..4265aaf8 100644
--- a/ports/cortex_r4/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_r4/ac6/example_build/sample_threadx/.cproject
@@ -1,158 +1,158 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_r4/ac6/example_build/sample_threadx/sample_threadx.c b/ports/cortex_r4/ac6/example_build/sample_threadx/sample_threadx.c
index a32037a6..6a996f77 100644
--- a/ports/cortex_r4/ac6/example_build/sample_threadx/sample_threadx.c
+++ b/ports/cortex_r4/ac6/example_build/sample_threadx/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -85,41 +85,41 @@ CHAR *pointer = TX_NULL;
/* Create the main thread. */
tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
status = tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -127,23 +127,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -246,11 +246,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -309,7 +309,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -362,7 +362,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_r4/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_r4/ac6/example_build/sample_threadx/sample_threadx.scat
index 926647b2..9eb35ca0 100644
--- a/ports/cortex_r4/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_r4/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -18,21 +18,21 @@ SDRAM 0x0 0x40000000
* (+RO-CODE) ; Application RO code (.text)
* (+RO-DATA) ; Application RO data (.constdata)
}
-
+
IRQ_STACK +0 ALIGN 8 EMPTY 1024 {}
-
+
FIQ_STACK +0 ALIGN 8 EMPTY 512 {}
-
+
SVC_STACK +0 ALIGN 8 EMPTY 2048 {}
-
+
SYS_STACK +0 ALIGN 8 EMPTY 2048 {}
-
+
ABORT_STACK +0 ALIGN 8 EMPTY 2048 {}
; Application RW & ZI data (.data & .bss)
DATA +0 0x100000
{
- * (+RW,+ZI)
+ * (+RW,+ZI)
}
PERIPHERALS 0xA0000000 EMPTY 0x20000000 { }; Peripherals
diff --git a/ports/cortex_r4/ac6/example_build/sample_threadx/startup.S b/ports/cortex_r4/ac6/example_build/sample_threadx/startup.S
index 98d3b2b1..cc59bcd9 100644
--- a/ports/cortex_r4/ac6/example_build/sample_threadx/startup.S
+++ b/ports/cortex_r4/ac6/example_build/sample_threadx/startup.S
@@ -3,7 +3,7 @@
//
// Copyright (c) 2006-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
//----------------------------------------------------------------
@@ -196,7 +196,7 @@ Reset_Handler:
// Enable Branch prediction
//----------------------------------------------------------------
-// In the Cortex-R4, the Z-bit of the SCTLR does not control the program flow prediction.
+// In the Cortex-R4, the Z-bit of the SCTLR does not control the program flow prediction.
// Some control bits in the ACTLR control the program flow and prefetch features instead.
// These are enabled by default, but are shown here for completeness.
diff --git a/ports/cortex_r4/ac6/example_build/tx/.cproject b/ports/cortex_r4/ac6/example_build/tx/.cproject
index 87d4b781..e1eba1a5 100644
--- a/ports/cortex_r4/ac6/example_build/tx/.cproject
+++ b/ports/cortex_r4/ac6/example_build/tx/.cproject
@@ -1,162 +1,162 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_r4/ac6/inc/tx_port.h b/ports/cortex_r4/ac6/inc/tx_port.h
index 0e4b3f1e..ff4ed9d1 100644
--- a/ports/cortex_r4/ac6/inc/tx_port.h
+++ b/ports/cortex_r4/ac6/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-R4/AC6 */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-R4/AC6 */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -78,7 +70,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -114,12 +106,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -129,8 +121,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -177,7 +169,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -189,13 +181,13 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable;
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -209,11 +201,11 @@ typedef unsigned short USHORT;
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -221,8 +213,8 @@ typedef unsigned short USHORT;
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -249,21 +241,21 @@ typedef unsigned short USHORT;
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef __thumb
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (ULONG) __clz((unsigned int) m); \
- b = 31 - b;
+ b = 31 - b;
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -283,7 +275,7 @@ typedef unsigned short USHORT;
{ \
__enable_irq(); \
__enable_fiq(); \
- }
+ }
#else
@@ -292,7 +284,7 @@ typedef unsigned short USHORT;
#define TX_RESTORE if (!interrupt_save_disabled) \
{ \
__enable_irq(); \
- }
+ }
#endif
#else
@@ -328,8 +320,8 @@ void tx_thread_vfp_disable(void);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-R4/AC6 Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-R4/AC6 Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_r4/ac6/readme_threadx.txt b/ports/cortex_r4/ac6/readme_threadx.txt
index b861033f..9c0019aa 100644
--- a/ports/cortex_r4/ac6/readme_threadx.txt
+++ b/ports/cortex_r4/ac6/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-R4
+ Microsoft's Azure RTOS ThreadX for Cortex-R4
Thumb & 32-bit Mode
@@ -6,12 +6,12 @@
1. Import the ThreadX Projects
-In order to build the ThreadX library and the ThreadX demonstration, first move
-the project folders into your DS workspace directory. The project folders are
-named 'tx' and 'sample_threadx' and are located in the installation directory.
+In order to build the ThreadX library and the ThreadX demonstration, first move
+the project folders into your DS workspace directory. The project folders are
+named 'tx' and 'sample_threadx' and are located in the installation directory.
Now that the projects are in the workspace directory, import them into DS by
-doing the following for each project:
+doing the following for each project:
1. Click 'File -> Import -> Existing Projects into Workspace'
2. Set the root directory the project i.e. the 'tx' or 'sample_threadx' directory
@@ -23,8 +23,8 @@ This is expected, so please do so.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply right-click the Eclipse project
-"tx" and then select the "Build Project" button. You should now observe the compilation
+Building the ThreadX library is easy; simply right-click the Eclipse project
+"tx" and then select the "Build Project" button. You should now observe the compilation
and assembly of the ThreadX library. This project build produces the ThreadX
library file tx.a.
@@ -34,41 +34,41 @@ library file tx.a.
The ThreadX demonstration is designed to execute under the DS-5 debugger on the
VE_Cortex-R4 Bare Metal simulator.
-Building the demonstration is easy; simply right-click the Eclipse project
-"sample_threadx" and then select the "Build Project" button. You should now observe
-the compilation and assembly of the ThreadX demonstration. This project build produces
-the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
+Building the demonstration is easy; simply right-click the Eclipse project
+"sample_threadx" and then select the "Build Project" button. You should now observe
+the compilation and assembly of the ThreadX demonstration. This project build produces
+the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
in the Project Explorer window, right-click on the 'cortex-r4_tx.launch' file, click
'Debug As', and then click 'cortex-r4_tx' from the submenu. This will cause the
-debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
+debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
to execute the ThreadX demonstration.
4. System Initialization
-The entry point in ThreadX for the Cortex-R4 using ARM tools is at label
-"Vectors". This is defined within startup.S in the sample_threadx project. In addition,
-this is where all static and global pre-set C variable initialization processing
+The entry point in ThreadX for the Cortex-R4 using ARM tools is at label
+"Vectors". This is defined within startup.S in the sample_threadx project. In addition,
+this is where all static and global pre-set C variable initialization processing
takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for determining the
-first available RAM address for use by the application, which is supplied as the
+The ThreadX tx_initialize_low_level.s file is responsible for determining the
+first available RAM address for use by the application, which is supplied as the
sole input parameter to your application definition function, tx_application_define.
5. Register Usage and Stack Frames
-The ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -86,39 +86,39 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
-performance. To make it run faster, you can change the build_threadx.bat file to
-remove the -g option and enable all compiler optimizations.
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
+performance. To make it run faster, you can change the build_threadx.bat file to
+remove the -g option and enable all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-R4
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-R4 vectors start at address zero. The demonstration system startup.S
-file contains the vectors and is loaded at address zero. On actual hardware platforms,
-this area might have to be copied to address 0.
+file contains the vectors and is loaded at address zero. On actual hardware platforms,
+this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -129,8 +129,8 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
.global __tx_irq_handler
@@ -159,7 +159,7 @@ __tx_irq_handler:
7.2.2 Vectored IRQ ISRs
The vectored ARM ISR mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example ISR handler defined in
+by the particular implementation. The following is an example ISR handler defined in
tx_initialize_low_level.s:
.global __tx_example_vectored_irq_handler
@@ -200,18 +200,18 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested IRQ interrupts are no longer required,
calling the _tx_thread_irq_nesting_end service disables nesting by disabling
-IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
+IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
.global __tx_irq_handler
@@ -249,12 +249,12 @@ __tx_irq_processing_return:
7.3 FIQ Interrupts
-By default, Cortex-R4 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, Cortex-R4 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -263,7 +263,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.s.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.s:
@@ -293,18 +293,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -322,7 +322,7 @@ __tx_fiq_processing_return:
interrupt, and all C scratch registers are available for use. */
/* Enable nested FIQ interrupts. NOTE: Since this service returns
- with FIQ interrupts enabled, all FIQ interrupt sources must be
+ with FIQ interrupts enabled, all FIQ interrupt sources must be
cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@@ -338,28 +338,28 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.s in the Integrator sub-directories.
9. Thumb/Cortex-R4 Mixed Mode
-By default, ThreadX is setup for running in Cortex-R4 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
-ThreadX file and/or the application in Thumb mode. To build ThreadX
-assembly files in Thumb mode, define TX_THUMB_MODE.
+By default, ThreadX is setup for running in Cortex-R4 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
+ThreadX file and/or the application in Thumb mode. To build ThreadX
+assembly files in Thumb mode, define TX_THUMB_MODE.
10. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
diff --git a/ports/cortex_r4/ac6/src/tx_initialize_low_level.S b/ports/cortex_r4/ac6/src/tx_initialize_low_level.S
index c14ebc5d..a4f0ada0 100644
--- a/ports/cortex_r4/ac6/src/tx_initialize_low_level.S
+++ b/ports/cortex_r4/ac6/src/tx_initialize_low_level.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -100,12 +101,6 @@
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_initialize_low_level(VOID)
{ */
diff --git a/ports/cortex_r4/ac6/src/tx_thread_context_restore.S b/ports/cortex_r4/ac6/src/tx_thread_context_restore.S
index 410b465f..51203843 100644
--- a/ports/cortex_r4/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_r4/ac6/src/tx_thread_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -54,7 +55,7 @@
#endif
.text
.eabi_attribute Tag_ABI_align_preserved, 1
-
+
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
@@ -88,12 +89,6 @@
/* */
/* ISRs Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_context_restore(VOID)
{ */
@@ -181,15 +176,15 @@ __tx_thread_preempt_restore:
LDMIA sp!, {r3, r10, r12, lr} // Recover temporarily saved registers
MOV r1, lr // Save lr (point of interrupt)
-
+
CPS #SVC_MODE // Switch to SVC mode to save context on thread stack
STR r1, [sp, #-4]! // Save point of interrupt
STMDB sp!, {r4-r12, lr} // Save upper half of registers
MOV r4, r3 // Save SPSR in r4
-
+
CPS #IRQ_MODE // Switch back to IRQ mode
LDMIA sp!, {r0-r3} // Recover r0-r3
-
+
CPS #SVC_MODE // Switch to SVC mode to save remaining context on thread stack
STMDB sp!, {r0-r3} // Save r0-r3 on thread's stack
diff --git a/ports/cortex_r4/ac6/src/tx_thread_context_save.S b/ports/cortex_r4/ac6/src/tx_thread_context_save.S
index 696dc985..68951b08 100644
--- a/ports/cortex_r4/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_r4/ac6/src/tx_thread_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -76,12 +77,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_context_save(VOID)
{ */
diff --git a/ports/cortex_r4/ac6/src/tx_thread_fiq_context_restore.S b/ports/cortex_r4/ac6/src/tx_thread_fiq_context_restore.S
index 94c20b72..7fbcc84a 100644
--- a/ports/cortex_r4/ac6/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_r4/ac6/src/tx_thread_fiq_context_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -88,12 +89,6 @@
/* */
/* FIQ ISR Interrupt Service Routines */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_fiq_context_restore(VOID) */
/* { */
@@ -186,15 +181,15 @@ __tx_thread_fiq_preempt_restore:
LDMIA sp!, {r3, lr} // Recover temporarily saved registers
MOV r1, lr // Save lr (point of interrupt)
-
+
CPS #SVC_MODE // Switch to SVC mode to save context on thread stack
STR r1, [sp, #-4]! // Save point of interrupt
STMDB sp!, {r4-r12, lr} // Save upper half of registers
MOV r4, r3 // Save SPSR in r4
-
+
CPS #FIQ_MODE // Switch back to FIQ mode
LDMIA sp!, {r0-r3} // Recover r0-r3
-
+
CPS #SVC_MODE // Switch to SVC mode to save remaining context on thread stack
STMDB sp!, {r0-r3} // Save r0-r3 on thread's stack
diff --git a/ports/cortex_r4/ac6/src/tx_thread_fiq_context_save.S b/ports/cortex_r4/ac6/src/tx_thread_fiq_context_save.S
index 1d85abe5..3c1333b3 100644
--- a/ports/cortex_r4/ac6/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_r4/ac6/src/tx_thread_fiq_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -76,12 +77,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_fiq_context_save(VOID) */
/* { */
@@ -90,7 +85,7 @@
.type _tx_thread_fiq_context_save, "function"
_tx_thread_fiq_context_save:
- /* Upon entry to this routine, it is assumed that IRQ interrupts are locked
+ /* Upon entry to this routine, it is assumed that IRQ interrupts are locked
out, we are in IRQ mode, and all registers are intact. */
/* Check for a nested interrupt condition. */
diff --git a/ports/cortex_r4/ac6/src/tx_thread_fiq_nesting_end.S b/ports/cortex_r4/ac6/src/tx_thread_fiq_nesting_end.S
index df8a4633..5abbdddf 100644
--- a/ports/cortex_r4/ac6/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_r4/ac6/src/tx_thread_fiq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,12 +78,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_fiq_nesting_end(VOID) */
/* { */
@@ -90,13 +85,13 @@
.type _tx_thread_fiq_nesting_end, "function"
_tx_thread_fiq_nesting_end:
MOV r3, lr // Save ISR return address
-
+
#ifdef TX_ENABLE_FIQ_SUPPORT
CPSID if // Disable IRQ and FIQ interrupts
#else
CPSID i // Disable IRQ interrupts
#endif
-
+
LDMIA sp!, {r1, lr} // Pickup saved lr (and r1 throw-away for
// 8-byte alignment logic)
CPS #FIQ_MODE // Switch back to FIQ mode
diff --git a/ports/cortex_r4/ac6/src/tx_thread_fiq_nesting_start.S b/ports/cortex_r4/ac6/src/tx_thread_fiq_nesting_start.S
index f26d9a0c..73564d78 100644
--- a/ports/cortex_r4/ac6/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_r4/ac6/src/tx_thread_fiq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,12 +75,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_fiq_nesting_start(VOID) */
/* { */
diff --git a/ports/cortex_r4/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_r4/ac6/src/tx_thread_interrupt_control.S
index 11ab4e4f..83aa06c4 100644
--- a/ports/cortex_r4/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_r4/ac6/src/tx_thread_interrupt_control.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -73,12 +74,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* UINT _tx_thread_interrupt_control(UINT new_posture) */
/* { */
diff --git a/ports/cortex_r4/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_r4/ac6/src/tx_thread_interrupt_disable.S
index cd7476a6..d605e034 100644
--- a/ports/cortex_r4/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_r4/ac6/src/tx_thread_interrupt_disable.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -65,12 +66,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* UINT _tx_thread_interrupt_disable(void) */
/* { */
diff --git a/ports/cortex_r4/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_r4/ac6/src/tx_thread_interrupt_restore.S
index 8e966de6..f9315d7f 100644
--- a/ports/cortex_r4/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_r4/ac6/src/tx_thread_interrupt_restore.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -66,12 +67,6 @@
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* UINT _tx_thread_interrupt_restore(UINT old_posture) */
/* { */
diff --git a/ports/cortex_r4/ac6/src/tx_thread_irq_nesting_end.S b/ports/cortex_r4/ac6/src/tx_thread_irq_nesting_end.S
index cf8e0ac1..664e02c5 100644
--- a/ports/cortex_r4/ac6/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_r4/ac6/src/tx_thread_irq_nesting_end.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,12 +78,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_irq_nesting_end(VOID) */
/* { */
@@ -96,7 +91,7 @@ _tx_thread_irq_nesting_end:
#else
CPSID i // Disable IRQ interrupts
#endif
-
+
LDMIA sp!, {r1, lr} // Pickup saved lr (and r1 throw-away for
// 8-byte alignment logic)
CPS #IRQ_MODE // Switch back to IRQ mode
diff --git a/ports/cortex_r4/ac6/src/tx_thread_irq_nesting_start.S b/ports/cortex_r4/ac6/src/tx_thread_irq_nesting_start.S
index b3ebe405..1d50b484 100644
--- a/ports/cortex_r4/ac6/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_r4/ac6/src/tx_thread_irq_nesting_start.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,12 +75,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_irq_nesting_start(VOID) */
/* { */
diff --git a/ports/cortex_r4/ac6/src/tx_thread_schedule.S b/ports/cortex_r4/ac6/src/tx_thread_schedule.S
index c12d5442..7148bd9e 100644
--- a/ports/cortex_r4/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_r4/ac6/src/tx_thread_schedule.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -74,12 +75,6 @@
/* _tx_thread_system_return Return to system from thread */
/* _tx_thread_context_restore Restore thread's context */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_schedule(VOID) */
/* { */
diff --git a/ports/cortex_r4/ac6/src/tx_thread_stack_build.S b/ports/cortex_r4/ac6/src/tx_thread_stack_build.S
index 9f72ba6c..a2993136 100644
--- a/ports/cortex_r4/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_r4/ac6/src/tx_thread_stack_build.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -79,12 +80,6 @@
/* */
/* _tx_thread_create Create thread service */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID)) */
/* { */
diff --git a/ports/cortex_r4/ac6/src/tx_thread_system_return.S b/ports/cortex_r4/ac6/src/tx_thread_system_return.S
index 2c5f11d6..048b4525 100644
--- a/ports/cortex_r4/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_r4/ac6/src/tx_thread_system_return.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -77,12 +78,6 @@
/* */
/* ThreadX components */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_system_return(VOID) */
/* { */
diff --git a/ports/cortex_r4/ac6/src/tx_thread_vectored_context_save.S b/ports/cortex_r4/ac6/src/tx_thread_vectored_context_save.S
index de49cc0d..dbb40aba 100644
--- a/ports/cortex_r4/ac6/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_r4/ac6/src/tx_thread_vectored_context_save.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -75,12 +76,6 @@
/* */
/* ISRs */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_thread_vectored_context_save(VOID) */
/* { */
diff --git a/ports/cortex_r4/ac6/src/tx_timer_interrupt.S b/ports/cortex_r4/ac6/src/tx_timer_interrupt.S
index d48313ef..8c3abf90 100644
--- a/ports/cortex_r4/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_r4/ac6/src/tx_timer_interrupt.S
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -84,12 +85,6 @@
/* */
/* interrupt vector */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
/* VOID _tx_timer_interrupt(VOID) */
/* { */
diff --git a/ports/cortex_r4/ghs/example_build/tx_initialize_low_level.arm b/ports/cortex_r4/ghs/example_build/tx_initialize_low_level.arm
index e9271a0e..212056fb 100644
--- a/ports/cortex_r4/ghs/example_build/tx_initialize_low_level.arm
+++ b/ports/cortex_r4/ghs/example_build/tx_initialize_low_level.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r4/ghs/inc/tx_el.h b/ports/cortex_r4/ghs/inc/tx_el.h
index b8926921..72e5bbe3 100644
--- a/ports/cortex_r4/ghs/inc/tx_el.h
+++ b/ports/cortex_r4/ghs/inc/tx_el.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,12 +37,6 @@
/* EventAnalyzer. It is assumed that tx_api.h and tx_port.h have */
/* already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_EL_H
diff --git a/ports/cortex_r4/ghs/inc/tx_port.h b/ports/cortex_r4/ghs/inc/tx_port.h
index ca07eaec..22daf8ea 100644
--- a/ports/cortex_r4/ghs/inc/tx_port.h
+++ b/ports/cortex_r4/ghs/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -384,7 +376,7 @@ asm void restore_ints(int a)
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-R4/Green Hills Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-R4/Green Hills Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_r4/ghs/readme_threadx.txt b/ports/cortex_r4/ghs/readme_threadx.txt
index f0fe2220..b7e10db3 100644
--- a/ports/cortex_r4/ghs/readme_threadx.txt
+++ b/ports/cortex_r4/ghs/readme_threadx.txt
@@ -1,19 +1,19 @@
- Microsoft's Azure RTOS ThreadX for Cortex-R4
+ Microsoft's Azure RTOS ThreadX for Cortex-R4
Using the Green Hills Software Tools
1. Open the ThreadX Project Workspace
-In order to build the ThreadX library and the ThreadX demonstration first load
-the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
-"example_build" directory.
+In order to build the ThreadX library and the ThreadX demonstration first load
+the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
+"example_build" directory.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply select the MULTI project file
-tx.gpj and then select the build button. You should now observe the
-compilation and assembly of the ThreadX library. This project build produces
+Building the ThreadX library is easy; simply select the MULTI project file
+tx.gpj and then select the build button. You should now observe the
+compilation and assembly of the ThreadX library. This project build produces
the ThreadX library file tx.a.
@@ -21,55 +21,55 @@ the ThreadX library file tx.a.
The ThreadX demonstration is designed to execute under the MULTI environment
on the Green Hills Cortex-R4 simulator. The instructions that follow describe
-how to get the ThreadX evaluation running under the MULTI Cortex-R4 simulation
+how to get the ThreadX evaluation running under the MULTI Cortex-R4 simulation
environment.
-Building the demonstration is easy; simply select the MULTI project file
-sample_threadx.gpj. At this point, select the "Project Build" button and observe
-the compilation, assembly, and linkage of the ThreadX demonstration application.
+Building the demonstration is easy; simply select the MULTI project file
+sample_threadx.gpj. At this point, select the "Project Build" button and observe
+the compilation, assembly, and linkage of the ThreadX demonstration application.
-After the demonstration is built, invoke the MULTI ARM simulator by selecting
-the simulator connection from within the sample_threadx.con connection file.
-Once connected to the simulator, select the "Debug" button. You should now
-observe the main function of sample_threadx.c.
+After the demonstration is built, invoke the MULTI ARM simulator by selecting
+the simulator connection from within the sample_threadx.con connection file.
+Once connected to the simulator, select the "Debug" button. You should now
+observe the main function of sample_threadx.c.
At this point, you should setup a simulated timer interrupt for ThreadX
by entering "timer 9999 irq" in the "target" window of the debugger.
-You are now ready to execute the ThreadX demonstration system. Select
-breakpoints and data watches to observe the execution of the sample_threadx.c
+You are now ready to execute the ThreadX demonstration system. Select
+breakpoints and data watches to observe the execution of the sample_threadx.c
application.
4. EventAnalyzer Demonstration
-To build a demonstration system that also logs events for the MULTI EventAnalyzer,
-perform the same steps as the regular demo, except build the ThreadX library with
-txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
-The resulting image will log all system events, which can then be displayed by the
+To build a demonstration system that also logs events for the MULTI EventAnalyzer,
+perform the same steps as the regular demo, except build the ThreadX library with
+txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
+The resulting image will log all system events, which can then be displayed by the
MULTI EventAnalyzer.
5. System Initialization
-The system entry point using the Green Hills tools is at the label _start.
-This is defined within the crt0.arm file supplied by Green Hills. In addition,
-this is where all static and global preset C variable initialization
+The system entry point using the Green Hills tools is at the label _start.
+This is defined within the crt0.arm file supplied by Green Hills. In addition,
+this is where all static and global preset C variable initialization
processing is called from.
After the Green Hills startup function returns, ThreadX initialization is
called. The main initialization function is _tx_initialize_low_level and
-is located in the file tx_initialize_low_level.arm. This function is responsible
-for setting up various system data structures, interrupt vectors, and the
+is located in the file tx_initialize_low_level.arm. This function is responsible
+for setting up various system data structures, interrupt vectors, and the
periodic timer interrupt source of ThreadX.
-In addition, _tx_initialize_low_level determines where the first available
+In addition, _tx_initialize_low_level determines where the first available
RAM memory address is located. This address is supplied to tx_application_define.
-By default, the first available RAM memory address is assumed to start at the
-beginning of the ThreadX section .free_mem. If changes are made to the
-sample_threadx.ld file, the .free_mem section should remain the last allocated
-section in the main RAM area. The starting address of this section is passed
+By default, the first available RAM memory address is assumed to start at the
+beginning of the ThreadX section .free_mem. If changes are made to the
+sample_threadx.ld file, the .free_mem section should remain the last allocated
+section in the main RAM area. The starting address of this section is passed
to tx_application_define.
@@ -87,27 +87,27 @@ The following defines and their associated action are as follows:
TX_ENABLE_FIQ_NESTING If defined, this brings in special FIQ
interrupt nesting logic into the ThreadX
library. This define should be applied
- to the entire ThreadX library and the
+ to the entire ThreadX library and the
define TX_ENABLE_FIQ_SUPPORT should also
be defined.
TX_ENABLE_FIQ_SUPPORT If defined, this brings in FIQ context
save and restore logic necessary for
applications to call ThreadX services from
- FIQ interrupt handlers. This define
- should be applied to the entire ThreadX
+ FIQ interrupt handlers. This define
+ should be applied to the entire ThreadX
library.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 4 in the "ThreadX User Guide"
+ Chapter 4 in the "ThreadX User Guide"
for more details.
TX_ENABLE_EVENT_LOGGING This define enables event logging for any
or all of the ThreadX source code. If this
- option is used anywhere, the tx_initialize_high_level.c
+ option is used anywhere, the tx_initialize_high_level.c
file must be compiled with it as well, since this
is where the event log is initialized.
@@ -119,121 +119,121 @@ The following defines and their associated action are as follows:
If this is enabled, run-time filtering logic
is added to the event logging code.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
7. Register Usage and Stack Frames
-The Green Hills compiler assumes that registers r0-r3 (a1-a4) and r12 (ip)
-are scratch registers for each function. All other registers used by a C
-function must be preserved by the function. ThreadX takes advantage of this
-in situations where a context switch happens as a result of making a ThreadX
-service call (which is itself a C function). In such cases, the saved
+The Green Hills compiler assumes that registers r0-r3 (a1-a4) and r12 (ip)
+are scratch registers for each function. All other registers used by a C
+function must be preserved by the function. ThreadX takes advantage of this
+in situations where a context switch happens as a result of making a ThreadX
+service call (which is itself a C function). In such cases, the saved
context of a thread is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -251,40 +251,40 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
8. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make ThreadX run faster, you can change the tx.gpj project
-to disable debug information and enable the desired optimizations.
+to disable debug information and enable the desired optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined before tx_api.h is included.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined before tx_api.h is included.
9. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-R4
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
9.1 Vector Area
The Cortex-R4 vectors start at address zero. The demonstration system reset.arm
-file contains the reset section (which contains all the ARM vectors) and is
+file contains the reset section (which contains all the ARM vectors) and is
typically loaded at address zero. On actual hardware platforms, this section
-might have to be copied to address 0.
+might have to be copied to address 0.
9.2 IRQ ISRs
@@ -294,13 +294,13 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
9.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.arm:
.globl __tx_irq_handler
- .globl __tx_irq_processing_return
+ .globl __tx_irq_processing_return
__tx_irq_handler:
/* Jump to context save to save system context. */
@@ -308,7 +308,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
/* At this point execution is still in the IRQ mode. The CPSR, point of
- interrupt, and all C scratch registers are available for use. Note
+ interrupt, and all C scratch registers are available for use. Note
that IRQ interrupts are still disabled upon return from the context
save function. */
@@ -321,7 +321,7 @@ __tx_irq_processing_return:
9.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.arm:
.globl __tx_irq_example_handler
@@ -331,12 +331,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} # Save some scratch registers
MRS r0, SPSR # Pickup saved SPSR
- SUB lr, lr, #4 # Adjust point of interrupt
+ SUB lr, lr, #4 # Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} # Store other scratch registers
BL _tx_thread_vectored_context_save # Call the vectored IRQ context save
/* At this point execution is still in the IRQ mode. The CPSR, point of
- interrupt, and all C scratch registers are available for use. Note
+ interrupt, and all C scratch registers are available for use. Note
that IRQ interrupts are still disabled upon return from the context
save function. */
@@ -353,22 +353,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.arm. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables nesting
-by disabling IRQ interrupts and switching back to IRQ mode in preparation for
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.arm. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables nesting
+by disabling IRQ interrupts and switching back to IRQ mode in preparation for
the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in the
+The following is an example of enabling IRQ nested interrupts in the
typical IRQ handler:
.globl __tx_irq_handler
- .globl __tx_irq_processing_return
+ .globl __tx_irq_processing_return
__tx_irq_handler:
/* Jump to context save to save system context. */
@@ -376,10 +376,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
/* Enable nested IRQ interrupts. NOTE: Since this service returns
- with IRQ interrupts enabled, all IRQ interrupt sources must be
+ with IRQ interrupts enabled, all IRQ interrupt sources must be
cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-
+
/* Application ISR call(s) go here! */
/* Disable nested IRQ interrupts. The mode is switched back to
@@ -392,9 +392,9 @@ __tx_irq_processing_return:
9.3 FIQ Interrupts
-By default, Cortex-R4 FIQ interrupts are left completely enabled by ThreadX.
-Of course, this means that the application is fully responsible for
-saving/restoring any registers used in the FIQ ISR processing. In addition,
+By default, Cortex-R4 FIQ interrupts are left completely enabled by ThreadX.
+Of course, this means that the application is fully responsible for
+saving/restoring any registers used in the FIQ ISR processing. In addition,
no ThreadX service calls are allowed from the default FIQ ISRs. The default
FIQ interrupt shell is located in tx_initialize_low_level.arm.
@@ -403,7 +403,7 @@ FIQ interrupt shell is located in tx_initialize_low_level.arm.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.arm:
@@ -431,18 +431,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.arm. When nested FIQ interrupts are no longer
-required, calling the _tx_thread_fiq_nesting_end service disables nesting by
-disabling FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.arm. When nested FIQ interrupts are no longer
+required, calling the _tx_thread_fiq_nesting_end service disables nesting by
+disabling FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -458,7 +458,7 @@ __tx_fiq_processing_return:
interrupt, and all C scratch registers are available for use. */
/* Enable nested FIQ interrupts. NOTE: Since this service returns
- with FIQ interrupts enabled, all FIQ interrupt sources must be
+ with FIQ interrupts enabled, all FIQ interrupt sources must be
cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@@ -475,22 +475,22 @@ __tx_fiq_processing_return:
10. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.arm.
11. Thumb/Cortex-R4 Mixed Mode
-By default, ThreadX is setup for running in Cortex-R4 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
+By default, ThreadX is setup for running in Cortex-R4 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
ThreadX file and/or the application in Thumb mode. The only exception
-to this is the file tx_thread_shell_entry.c. This file must always be
+to this is the file tx_thread_shell_entry.c. This file must always be
built in 32-bit mode.
@@ -503,7 +503,7 @@ information associated with this specific port of ThreadX:
04-02-2021 Release 6.1.6 changes:
tx_port.h Updated macro definition
-05/19/2020 Initial ThreadX version of Cortex-R4/Green Hills port.
+05/19/2020 Initial ThreadX version of Cortex-R4/Green Hills port.
Copyright(c) 1996-2020 Microsoft Corporation
diff --git a/ports/cortex_r4/ghs/src/tx_el.c b/ports/cortex_r4/ghs/src/tx_el.c
index 365622cd..b5d3b8b7 100644
--- a/ports/cortex_r4/ghs/src/tx_el.c
+++ b/ports/cortex_r4/ghs/src/tx_el.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -82,12 +83,6 @@ UINT _tx_thread_interrupt_control(UINT new_posture);
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_el_initialize(VOID)
{
diff --git a/ports/cortex_r4/ghs/src/tx_thread_context_restore.arm b/ports/cortex_r4/ghs/src/tx_thread_context_restore.arm
index 75450de7..6e9ef7d7 100644
--- a/ports/cortex_r4/ghs/src/tx_thread_context_restore.arm
+++ b/ports/cortex_r4/ghs/src/tx_thread_context_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r4/ghs/src/tx_thread_context_save.arm b/ports/cortex_r4/ghs/src/tx_thread_context_save.arm
index 416edebc..adf474ce 100644
--- a/ports/cortex_r4/ghs/src/tx_thread_context_save.arm
+++ b/ports/cortex_r4/ghs/src/tx_thread_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r4/ghs/src/tx_thread_fiq_context_restore.arm b/ports/cortex_r4/ghs/src/tx_thread_fiq_context_restore.arm
index bdee5905..c41f5217 100644
--- a/ports/cortex_r4/ghs/src/tx_thread_fiq_context_restore.arm
+++ b/ports/cortex_r4/ghs/src/tx_thread_fiq_context_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r4/ghs/src/tx_thread_fiq_context_save.arm b/ports/cortex_r4/ghs/src/tx_thread_fiq_context_save.arm
index d60d4174..e51721ff 100644
--- a/ports/cortex_r4/ghs/src/tx_thread_fiq_context_save.arm
+++ b/ports/cortex_r4/ghs/src/tx_thread_fiq_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r4/ghs/src/tx_thread_fiq_nesting_end.arm b/ports/cortex_r4/ghs/src/tx_thread_fiq_nesting_end.arm
index fe229cd5..606bb33b 100644
--- a/ports/cortex_r4/ghs/src/tx_thread_fiq_nesting_end.arm
+++ b/ports/cortex_r4/ghs/src/tx_thread_fiq_nesting_end.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r4/ghs/src/tx_thread_fiq_nesting_start.arm b/ports/cortex_r4/ghs/src/tx_thread_fiq_nesting_start.arm
index 2c81a48c..a79e0ef1 100644
--- a/ports/cortex_r4/ghs/src/tx_thread_fiq_nesting_start.arm
+++ b/ports/cortex_r4/ghs/src/tx_thread_fiq_nesting_start.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r4/ghs/src/tx_thread_interrupt_control.arm b/ports/cortex_r4/ghs/src/tx_thread_interrupt_control.arm
index ad438998..21642ef3 100644
--- a/ports/cortex_r4/ghs/src/tx_thread_interrupt_control.arm
+++ b/ports/cortex_r4/ghs/src/tx_thread_interrupt_control.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r4/ghs/src/tx_thread_interrupt_disable.arm b/ports/cortex_r4/ghs/src/tx_thread_interrupt_disable.arm
index 14fc9798..8fef75d1 100644
--- a/ports/cortex_r4/ghs/src/tx_thread_interrupt_disable.arm
+++ b/ports/cortex_r4/ghs/src/tx_thread_interrupt_disable.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r4/ghs/src/tx_thread_interrupt_restore.arm b/ports/cortex_r4/ghs/src/tx_thread_interrupt_restore.arm
index 01794ebb..145588da 100644
--- a/ports/cortex_r4/ghs/src/tx_thread_interrupt_restore.arm
+++ b/ports/cortex_r4/ghs/src/tx_thread_interrupt_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r4/ghs/src/tx_thread_irq_nesting_end.arm b/ports/cortex_r4/ghs/src/tx_thread_irq_nesting_end.arm
index 9c0dfe53..60b91854 100644
--- a/ports/cortex_r4/ghs/src/tx_thread_irq_nesting_end.arm
+++ b/ports/cortex_r4/ghs/src/tx_thread_irq_nesting_end.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r4/ghs/src/tx_thread_irq_nesting_start.arm b/ports/cortex_r4/ghs/src/tx_thread_irq_nesting_start.arm
index d83340e3..e132b877 100644
--- a/ports/cortex_r4/ghs/src/tx_thread_irq_nesting_start.arm
+++ b/ports/cortex_r4/ghs/src/tx_thread_irq_nesting_start.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r4/ghs/src/tx_thread_schedule.arm b/ports/cortex_r4/ghs/src/tx_thread_schedule.arm
index 38b6d693..a902fef1 100644
--- a/ports/cortex_r4/ghs/src/tx_thread_schedule.arm
+++ b/ports/cortex_r4/ghs/src/tx_thread_schedule.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r4/ghs/src/tx_thread_stack_build.arm b/ports/cortex_r4/ghs/src/tx_thread_stack_build.arm
index a6de7389..6bb4de3c 100644
--- a/ports/cortex_r4/ghs/src/tx_thread_stack_build.arm
+++ b/ports/cortex_r4/ghs/src/tx_thread_stack_build.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r4/ghs/src/tx_thread_system_return.arm b/ports/cortex_r4/ghs/src/tx_thread_system_return.arm
index ea2fe6bb..3e4c34b0 100644
--- a/ports/cortex_r4/ghs/src/tx_thread_system_return.arm
+++ b/ports/cortex_r4/ghs/src/tx_thread_system_return.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r4/ghs/src/tx_thread_vectored_context_save.arm b/ports/cortex_r4/ghs/src/tx_thread_vectored_context_save.arm
index 18c844f4..764ee154 100644
--- a/ports/cortex_r4/ghs/src/tx_thread_vectored_context_save.arm
+++ b/ports/cortex_r4/ghs/src/tx_thread_vectored_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r4/ghs/src/tx_timer_interrupt.arm b/ports/cortex_r4/ghs/src/tx_timer_interrupt.arm
index b7303701..e6c8ac0e 100644
--- a/ports/cortex_r4/ghs/src/tx_timer_interrupt.arm
+++ b/ports/cortex_r4/ghs/src/tx_timer_interrupt.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r4/gnu/example_build/crt0.S b/ports/cortex_r4/gnu/example_build/crt0.S
index aa0f3239..56b6c958 100644
--- a/ports/cortex_r4/gnu/example_build/crt0.S
+++ b/ports/cortex_r4/gnu/example_build/crt0.S
@@ -26,13 +26,13 @@ _mainCRTStartup:
mov a2, #0 /* Second arg: fill value */
mov fp, a2 /* Null frame pointer */
mov r7, a2 /* Null frame pointer for Thumb */
-
- ldr a1, .LC1 /* First arg: start of memory block */
- ldr a3, .LC2
- sub a3, a3, a1 /* Third arg: length of block */
-
-
+ ldr a1, .LC1 /* First arg: start of memory block */
+ ldr a3, .LC2
+ sub a3, a3, a1 /* Third arg: length of block */
+
+
+
bl memset
mov r0, #0 /* no arguments */
mov r1, #0 /* no argv either */
@@ -48,15 +48,15 @@ _mainCRTStartup:
/* bl init */
mov r0, r4
mov r1, r5
-#endif
+#endif
bl main
bl exit /* Should not return. */
-
- /* For Thumb, constants must be after the code since only
+
+ /* For Thumb, constants must be after the code since only
positive offsets are supported for PC relative addresses. */
-
+
.align 0
.LC0:
.LC1:
diff --git a/ports/cortex_r4/gnu/example_build/reset.S b/ports/cortex_r4/gnu/example_build/reset.S
index a11c826a..5d05258b 100644
--- a/ports/cortex_r4/gnu/example_build/reset.S
+++ b/ports/cortex_r4/gnu/example_build/reset.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Initialize */
@/** */
@@ -65,11 +65,11 @@ SWI:
.word __tx_swi_interrupt @ Software interrupt handler
PREFETCH:
.word __tx_prefetch_handler @ Prefetch exception handler
-ABORT:
+ABORT:
.word __tx_abort_handler @ Abort exception handler
-RESERVED:
+RESERVED:
.word __tx_reserved_handler @ Reserved exception handler
-IRQ:
+IRQ:
.word __tx_irq_handler @ IRQ interrupt handler
FIQ:
.word __tx_fiq_handler @ FIQ interrupt handler
diff --git a/ports/cortex_r4/gnu/example_build/sample_threadx.c b/ports/cortex_r4/gnu/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/cortex_r4/gnu/example_build/sample_threadx.c
+++ b/ports/cortex_r4/gnu/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_r4/gnu/example_build/sample_threadx.ld b/ports/cortex_r4/gnu/example_build/sample_threadx.ld
index 3dea4e1c..e940b2b8 100644
--- a/ports/cortex_r4/gnu/example_build/sample_threadx.ld
+++ b/ports/cortex_r4/gnu/example_build/sample_threadx.ld
@@ -7,7 +7,7 @@ OUTPUT_ARCH(arm)
SECTIONS
{
. = 0x00000000;
-
+
.vectors : {reset.o(.text) }
/* Read-only sections, merged into text segment: */
@@ -94,8 +94,8 @@ SECTIONS
*(.gnu.linkonce.t*)
*(.glue_7t) *(.glue_7)
} =0
- .init :
- {
+ .init :
+ {
KEEP (*(.init))
} =0
_etext = .;
@@ -120,7 +120,7 @@ SECTIONS
.data1 : { *(.data1) }
.eh_frame : { KEEP (*(.eh_frame)) }
.gcc_except_table : { *(.gcc_except_table) }
- .ctors :
+ .ctors :
{
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
@@ -153,9 +153,9 @@ SECTIONS
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata :
+ .sdata :
{
- *(.sdata)
+ *(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
}
@@ -191,7 +191,7 @@ SECTIONS
_stack_bottom = ABSOLUTE(.) ;
- /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
+ /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
SYS stack if nested interrupts are enabled. */
. = ALIGN(8) ;
. += 4096 ;
diff --git a/ports/cortex_r4/gnu/example_build/tx_initialize_low_level.S b/ports/cortex_r4/gnu/example_build/tx_initialize_low_level.S
index 82304d36..1abcf7f5 100644
--- a/ports/cortex_r4/gnu/example_build/tx_initialize_low_level.S
+++ b/ports/cortex_r4/gnu/example_build/tx_initialize_low_level.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Initialize */
@/** */
@@ -62,7 +62,7 @@ SYS_STACK_SIZE = 1024 @ System stack size
.type $_tx_initialize_low_level,function
$_tx_initialize_low_level:
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_initialize_low_level @ Call _tx_initialize_low_level function
@@ -72,45 +72,39 @@ $_tx_initialize_low_level:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_initialize_low_level Cortex-R4/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_initialize_low_level Cortex-R4/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is responsible for any low-level processor */
-@/* initialization, including setting up interrupt vectors, setting */
-@/* up a periodic timer interrupt source, saving the system stack */
-@/* pointer for use in ISR processing later, and finding the first */
-@/* available RAM memory address for tx_application_define. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* _tx_initialize_kernel_enter ThreadX entry function */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is responsible for any low-level processor */
+@/* initialization, including setting up interrupt vectors, setting */
+@/* up a periodic timer interrupt source, saving the system stack */
+@/* pointer for use in ISR processing later, and finding the first */
+@/* available RAM memory address for tx_application_define. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* _tx_initialize_kernel_enter ThreadX entry function */
@/* */
@/**************************************************************************/
@VOID _tx_initialize_low_level(VOID)
@@ -125,7 +119,7 @@ _tx_initialize_low_level:
@
LDR r1, =_sp @ Get pointer to stack area
-#ifdef TX_ENABLE_IRQ_NESTING
+#ifdef TX_ENABLE_IRQ_NESTING
@
@ /* Setup the system mode stack for nested interrupt support */
@
@@ -156,7 +150,7 @@ _tx_initialize_low_level:
MSR CPSR, r0 @ Enter SVC mode
LDR r2, =_stack_bottom @ Pickup stack bottom
CMP r3, r2 @ Compare the current stack end with the bottom
-_stack_error_loop:
+_stack_error_loop:
BLT _stack_error_loop @ If the IRQ stack exceeds the stack bottom, just sit here!
@
@ /* Save the system stack pointer. */
@@ -208,7 +202,7 @@ __tx_reserved_handler:
B __tx_reserved_handler @ Reserved exception handler
@
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -216,17 +210,17 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. In
+@ interrupt, and all C scratch registers are available for use. In
@ addition, IRQ interrupts may be re-enabled - with certain restrictions -
@ if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-@ small code sequences where lr is saved before enabling interrupts and
+@ small code sequences where lr is saved before enabling interrupts and
@ restored after interrupts are again disabled. */
@
-@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
@ from IRQ mode with interrupts disabled. This routine switches to the
-@ system mode and returns with IRQ interrupts enabled.
-@
-@ NOTE: It is very important to ensure all IRQ interrupts are cleared
+@ system mode and returns with IRQ interrupts enabled.
+@
+@ NOTE: It is very important to ensure all IRQ interrupts are cleared
@ prior to enabling nested IRQ interrupts. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -240,7 +234,7 @@ __tx_irq_processing_return:
@
@
@ /* If interrupt nesting was started earlier, the end of interrupt nesting
-@ service must be called before returning to _tx_thread_context_restore.
+@ service must be called before returning to _tx_thread_context_restore.
@ This routine returns in processing in IRQ mode with interrupts disabled. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -256,28 +250,28 @@ __tx_irq_processing_return:
@__tx_example_vectored_irq_handler:
@
@
-@ /* Save initial context and call context save to prepare for
+@ /* Save initial context and call context save to prepare for
@ vectored ISR execution. */
@
@ STMDB sp!, {r0-r3} @ Save some scratch registers
@ MRS r0, SPSR @ Pickup saved SPSR
-@ SUB lr, lr, #4 @ Adjust point of interrupt
+@ SUB lr, lr, #4 @ Adjust point of interrupt
@ STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
@ BL _tx_thread_vectored_context_save @ Vectored context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. In
+@ interrupt, and all C scratch registers are available for use. In
@ addition, IRQ interrupts may be re-enabled - with certain restrictions -
@ if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-@ small code sequences where lr is saved before enabling interrupts and
+@ small code sequences where lr is saved before enabling interrupts and
@ restored after interrupts are again disabled. */
@
@
-@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
@ from IRQ mode with interrupts disabled. This routine switches to the
-@ system mode and returns with IRQ interrupts enabled.
-@
-@ NOTE: It is very important to ensure all IRQ interrupts are cleared
+@ system mode and returns with IRQ interrupts enabled.
+@
+@ NOTE: It is very important to ensure all IRQ interrupts are cleared
@ prior to enabling nested IRQ interrupts. */
@#ifdef TX_ENABLE_IRQ_NESTING
@ BL _tx_thread_irq_nesting_start
@@ -286,7 +280,7 @@ __tx_irq_processing_return:
@ /* Application IRQ handlers can be called here! */
@
@ /* If interrupt nesting was started earlier, the end of interrupt nesting
-@ service must be called before returning to _tx_thread_context_restore.
+@ service must be called before returning to _tx_thread_context_restore.
@ This routine returns in processing in IRQ mode with interrupts disabled. */
@#ifdef TX_ENABLE_IRQ_NESTING
@ BL _tx_thread_irq_nesting_end
@@ -308,11 +302,11 @@ __tx_fiq_processing_return:
@ /* At this point execution is still in the FIQ mode. The CPSR, point of
@ interrupt, and all C scratch registers are available for use. */
@
-@ /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+@ /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
@ from FIQ mode with interrupts disabled. This routine switches to the
-@ system mode and returns with FIQ interrupts enabled.
+@ system mode and returns with FIQ interrupts enabled.
@
-@ NOTE: It is very important to ensure all FIQ interrupts are cleared
+@ NOTE: It is very important to ensure all FIQ interrupts are cleared
@ prior to enabling nested FIQ interrupts. */
#ifdef TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/cortex_r4/gnu/inc/tx_port.h b/ports/cortex_r4/gnu/inc/tx_port.h
index c304cb99..827590c9 100644
--- a/ports/cortex_r4/gnu/inc/tx_port.h
+++ b/ports/cortex_r4/gnu/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-R4/GNU */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-R4/GNU */
/* 6.1.12 */
/* */
/* AUTHOR */
@@ -32,27 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -65,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -78,7 +67,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -114,12 +103,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -129,8 +118,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -177,7 +166,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -189,13 +178,13 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
-#define TX_THREAD_EXTENSION_2
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -209,11 +198,11 @@ typedef unsigned short USHORT;
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -221,8 +210,8 @@ typedef unsigned short USHORT;
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -249,24 +238,24 @@ typedef unsigned short USHORT;
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
-
+
#if __TARGET_ARCH_ARM > 4
#ifndef __thumb__
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
asm volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) ); \
- b = 31 - b;
+ b = 31 - b;
#endif
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -310,8 +299,8 @@ unsigned int _tx_thread_interrupt_restore(UINT old_posture);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-R4/GNU Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-R4/GNU Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_r4/gnu/readme_threadx.txt b/ports/cortex_r4/gnu/readme_threadx.txt
index 06712f8a..93d69abb 100644
--- a/ports/cortex_r4/gnu/readme_threadx.txt
+++ b/ports/cortex_r4/gnu/readme_threadx.txt
@@ -1,55 +1,55 @@
- Microsoft's Azure RTOS ThreadX for Cortex-R4
+ Microsoft's Azure RTOS ThreadX for Cortex-R4
Using the GNU Tools
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the GNU
-development environment.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the GNU
+development environment.
-At this point you may run the build_threadx.bat batch file. This will build the
-ThreadX run-time environment in the "example_build" directory.
+At this point you may run the build_threadx.bat batch file. This will build the
+ThreadX run-time environment in the "example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
2. Demonstration System
-Building the demonstration is easy; simply execute the build_threadx_sample.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_sample.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with TX.A. The resulting file DEMO is a binary file
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with TX.A. The resulting file DEMO is a binary file
that can be downloaded and executed.
3. System Initialization
-The entry point in ThreadX for the Cortex-R4 using GNU tools is at label _start.
+The entry point in ThreadX for the Cortex-R4 using GNU tools is at label _start.
This is defined within the modified version of the GNU startup code - crt0.S.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up various
-system data structures, the interrupt vectors, and a periodic timer interrupt source.
-By default, the vector area is defined to be located at the "__vectors" label,
-which is defined in reset.S. This area is typically located at 0. In situations
-where this is impossible, the vectors at the "__vectors" label should be copied
+The ThreadX tx_initialize_low_level.S file is responsible for setting up various
+system data structures, the interrupt vectors, and a periodic timer interrupt source.
+By default, the vector area is defined to be located at the "__vectors" label,
+which is defined in reset.S. This area is typically located at 0. In situations
+where this is impossible, the vectors at the "__vectors" label should be copied
to address 0.
-This is also where initialization of a periodic timer interrupt source should take
+This is also where initialization of a periodic timer interrupt source should take
place.
-In addition, _tx_initialize_low_level defines the first available address
-for use by the application, which is supplied as the sole input parameter
+In addition, _tx_initialize_low_level defines the first available address
+for use by the application, which is supplied as the sole input parameter
to your application definition function, tx_application_define.
4. Assembler / Compiler Switches
-The following are compiler switches used in building the demonstration
+The following are compiler switches used in building the demonstration
system:
Compiler/Assembler Meaning
@@ -73,164 +73,164 @@ Application Defines ( -D option)
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S.
TX_ENABLE_FIQ_NESTING This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S. In addition,
IRQ nesting should also be enabled.
TX_ENABLE_FIQ_SUPPORT This compiler define enables FIQ
interrupt handling in the ThreadX
- generic C source. This define
+ generic C source. This define
should also be used in conjunction
with the corresponding assembler
- define.
+ define.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
5. Register Usage and Stack Frames
-The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -248,52 +248,52 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-R4
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-R4 vectors start at address zero. The demonstration system startup
-reset.S file contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+reset.S file contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
-ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
+ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
nested IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.S:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -301,7 +301,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -314,7 +314,7 @@ __tx_irq_processing_return:
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.S:
.global __tx_irq_example_handler
@@ -324,12 +324,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} @ Save some scratch registers
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
BL _tx_thread_vectored_context_save @ Call the vectored IRQ context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -346,22 +346,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -369,10 +369,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* Enable nested IRQ interrupts. NOTE: Since this service returns
-@ with IRQ interrupts enabled, all IRQ interrupt sources must be
+@ with IRQ interrupts enabled, all IRQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-@
+@
@ /* Application ISR call(s) go here! */
@
@ /* Disable nested IRQ interrupts. The mode is switched back to
@@ -385,12 +385,12 @@ __tx_irq_processing_return:
7.3 FIQ Interrupts
-By default, FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.S.
@@ -399,7 +399,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.S.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.S:
@@ -427,18 +427,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.S. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -454,7 +454,7 @@ __tx_fiq_processing_return:
@ interrupt, and all C scratch registers are available for use. */
@
@ /* Enable nested FIQ interrupts. NOTE: Since this service returns
-@ with FIQ interrupts enabled, all FIQ interrupt sources must be
+@ with FIQ interrupts enabled, all FIQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@
@@ -470,12 +470,12 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
-interrupt source, these services are not functional but the remainder of
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
+interrupt source, these services are not functional but the remainder of
ThreadX will still run.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.S for the demonstration system.
diff --git a/ports/cortex_r4/gnu/src/tx_thread_context_restore.S b/ports/cortex_r4/gnu/src/tx_thread_context_restore.S
index b56b9d83..aab6ce05 100644
--- a/ports/cortex_r4/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_r4/gnu/src/tx_thread_context_restore.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -43,48 +43,42 @@ IRQ_MODE = 0x92 @ Disable IRQ, IRQ mode
@
@/* No 16-bit Thumb mode veneer code is needed for _tx_thread_context_restore
@ since it will never be called 16-bit mode. */
-@
+@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_context_restore Cortex-R4/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_context_restore Cortex-R4/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function restores the interrupt context if it is processing a */
-@/* nested interrupt. If not, it returns to the interrupt thread if no */
-@/* preemption is necessary. Otherwise, if preemption is necessary or */
-@/* if no thread was running, the function returns to the scheduler. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_schedule Thread scheduling routine */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs Interrupt Service Routines */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function restores the interrupt context if it is processing a */
+@/* nested interrupt. If not, it returns to the interrupt thread if no */
+@/* preemption is necessary. Otherwise, if preemption is necessary or */
+@/* if no thread was running, the function returns to the scheduler. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_schedule Thread scheduling routine */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs Interrupt Service Routines */
@/* */
@/**************************************************************************/
@VOID _tx_thread_context_restore(VOID)
@@ -115,13 +109,13 @@ _tx_thread_context_restore:
LDR r3, =_tx_thread_system_state @ Pickup address of system state variable
LDR r2, [r3] @ Pickup system state
SUB r2, r2, #1 @ Decrement the counter
- STR r2, [r3] @ Store the counter
+ STR r2, [r3] @ Store the counter
CMP r2, #0 @ Was this the first interrupt?
BEQ __tx_thread_not_nested_restore @ If so, not a nested restore
@
@ /* Interrupts are nested. */
@
-@ /* Just recover the saved registers and return to the point of
+@ /* Just recover the saved registers and return to the point of
@ interrupt. */
@
LDMIA sp!, {r0, r10, r12, lr} @ Recover SPSR, POI, and scratch regs
diff --git a/ports/cortex_r4/gnu/src/tx_thread_context_save.S b/ports/cortex_r4/gnu/src/tx_thread_context_save.S
index 1dfb9ecd..8533f8b9 100644
--- a/ports/cortex_r4/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_r4/gnu/src/tx_thread_context_save.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -30,47 +30,41 @@
@
@/* No 16-bit Thumb mode veneer code is needed for _tx_thread_context_save
@ since it will never be called 16-bit mode. */
-@
+@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_context_save Cortex-R4/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_context_save Cortex-R4/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function saves the context of an executing thread in the */
-@/* beginning of interrupt processing. The function also ensures that */
-@/* the system stack is used upon return to the calling ISR. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function saves the context of an executing thread in the */
+@/* beginning of interrupt processing. The function also ensures that */
+@/* the system stack is used upon return to the calling ISR. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_context_save(VOID)
@@ -86,7 +80,7 @@ _tx_thread_context_save:
@ if (_tx_thread_system_state++)
@ {
@
- STMDB sp!, {r0-r3} @ Save some working registers
+ STMDB sp!, {r0-r3} @ Save some working registers
#ifdef TX_ENABLE_FIQ_SUPPORT
CPSID if @ Disable FIQ interrupts
#endif
@@ -104,7 +98,7 @@ _tx_thread_context_save:
@ calling ISR. */
@
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other registers
@
@ /* Return to the ISR. */
@@ -120,7 +114,7 @@ _tx_thread_context_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_irq_processing_return @ Continue IRQ processing
+ B __tx_irq_processing_return @ Continue IRQ processing
@
__tx_thread_not_nested_save:
@ }
@@ -134,13 +128,13 @@ __tx_thread_not_nested_save:
LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread ptr
LDR r0, [r1] @ Pickup current thread pointer
CMP r0, #0 @ Is it NULL?
- BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
@ scheduling loop - nothing needs saving!
@
@ /* Save minimal context of interrupted thread. */
@
MRS r2, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} @ Store other registers
@
@ /* Save the current stack pointer in the thread's control block. */
@@ -160,7 +154,7 @@ __tx_thread_not_nested_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_irq_processing_return @ Continue IRQ processing
+ B __tx_irq_processing_return @ Continue IRQ processing
@
@ }
@ else
@@ -170,7 +164,7 @@ __tx_thread_idle_system_save:
@
@ /* Interrupt occurred in the scheduling loop. */
@
-@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
+@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
@ processing. */
@
MOV r10, #0 @ Clear stack limit
@@ -185,7 +179,7 @@ __tx_thread_idle_system_save:
#endif
ADD sp, sp, #16 @ Recover saved registers
- B __tx_irq_processing_return @ Continue IRQ processing
+ B __tx_irq_processing_return @ Continue IRQ processing
@
@ }
@}
diff --git a/ports/cortex_r4/gnu/src/tx_thread_fiq_context_restore.S b/ports/cortex_r4/gnu/src/tx_thread_fiq_context_restore.S
index 6e0212c9..bf7f2de3 100644
--- a/ports/cortex_r4/gnu/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_r4/gnu/src/tx_thread_fiq_context_restore.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -24,7 +24,7 @@
SVC_MODE = 0xD3 @ SVC mode
FIQ_MODE = 0xD1 @ FIQ mode
-MODE_MASK = 0x1F @ Mode mask
+MODE_MASK = 0x1F @ Mode mask
THUMB_MASK = 0x20 @ Thumb bit mask
IRQ_MODE_BITS = 0x12 @ IRQ mode bits
@
@@ -45,44 +45,38 @@ IRQ_MODE_BITS = 0x12 @ IRQ mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_context_restore Cortex-R4/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_context_restore Cortex-R4/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function restores the fiq interrupt context when processing a */
-@/* nested interrupt. If not, it returns to the interrupt thread if no */
-@/* preemption is necessary. Otherwise, if preemption is necessary or */
-@/* if no thread was running, the function returns to the scheduler. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_schedule Thread scheduling routine */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* FIQ ISR Interrupt Service Routines */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function restores the fiq interrupt context when processing a */
+@/* nested interrupt. If not, it returns to the interrupt thread if no */
+@/* preemption is necessary. Otherwise, if preemption is necessary or */
+@/* if no thread was running, the function returns to the scheduler. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_schedule Thread scheduling routine */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* FIQ ISR Interrupt Service Routines */
@/* */
@/**************************************************************************/
@VOID _tx_thread_fiq_context_restore(VOID)
@@ -109,13 +103,13 @@ _tx_thread_fiq_context_restore:
LDR r3, =_tx_thread_system_state @ Pickup address of system state variable
LDR r2, [r3] @ Pickup system state
SUB r2, r2, #1 @ Decrement the counter
- STR r2, [r3] @ Store the counter
+ STR r2, [r3] @ Store the counter
CMP r2, #0 @ Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore @ If so, not a nested restore
@
@ /* Interrupts are nested. */
@
-@ /* Just recover the saved registers and return to the point of
+@ /* Just recover the saved registers and return to the point of
@ interrupt. */
@
LDMIA sp!, {r0, r10, r12, lr} @ Recover SPSR, POI, and scratch regs
@@ -203,7 +197,7 @@ __tx_thread_fiq_preempt_restore:
BEQ __tx_thread_fiq_dont_save_ts @ No, don't save it
@
@ _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-@ _tx_timer_time_slice = 0;
+@ _tx_timer_time_slice = 0;
@
STR r2, [r0, #24] @ Save thread's time-slice
MOV r2, #0 @ Clear value
diff --git a/ports/cortex_r4/gnu/src/tx_thread_fiq_context_save.S b/ports/cortex_r4/gnu/src/tx_thread_fiq_context_save.S
index 330bb9d5..4b3b9f4f 100644
--- a/ports/cortex_r4/gnu/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_r4/gnu/src/tx_thread_fiq_context_save.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -34,43 +34,37 @@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_context_save Cortex-R4/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_context_save Cortex-R4/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function saves the context of an executing thread in the */
-@/* beginning of interrupt processing. The function also ensures that */
-@/* the system stack is used upon return to the calling ISR. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function saves the context of an executing thread in the */
+@/* beginning of interrupt processing. The function also ensures that */
+@/* the system stack is used upon return to the calling ISR. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@ VOID _tx_thread_fiq_context_save(VOID)
@@ -86,7 +80,7 @@ _tx_thread_fiq_context_save:
@ if (_tx_thread_system_state++)
@ {
@
- STMDB sp!, {r0-r3} @ Save some working registers
+ STMDB sp!, {r0-r3} @ Save some working registers
LDR r3, =_tx_thread_system_state @ Pickup address of system state variable
LDR r2, [r3] @ Pickup system state
CMP r2, #0 @ Is this the first interrupt?
@@ -101,7 +95,7 @@ _tx_thread_fiq_context_save:
@ calling ISR. */
@
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other registers
@
@ /* Return to the ISR. */
@@ -117,38 +111,38 @@ _tx_thread_fiq_context_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_fiq_processing_return @ Continue FIQ processing
+ B __tx_fiq_processing_return @ Continue FIQ processing
@
__tx_thread_fiq_not_nested_save:
-@ }
+@ }
@
@ /* Otherwise, not nested, check to see if a thread was running. */
@ else if (_tx_thread_current_ptr)
-@ {
+@ {
@
ADD r2, r2, #1 @ Increment the interrupt counter
STR r2, [r3] @ Store it back in the variable
LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread ptr
LDR r0, [r1] @ Pickup current thread pointer
CMP r0, #0 @ Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save @ If so, interrupt occurred in
-@ @ scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save @ If so, interrupt occurred in
+@ @ scheduling loop - nothing needs saving!
@
@ /* Save minimal context of interrupted thread. */
@
MRS r2, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r2, lr} @ Store other registers, Note that we don't
-@ @ need to save sl and ip since FIQ has
-@ @ copies of these registers. Nested
+@ @ need to save sl and ip since FIQ has
+@ @ copies of these registers. Nested
@ @ interrupt processing does need to save
@ @ these registers.
@
@ /* Save the current stack pointer in the thread's control block. */
-@ _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+@ _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
@
@ /* Switch to the system stack. */
-@ sp = _tx_thread_system_stack_ptr;
+@ sp = _tx_thread_system_stack_ptr;
@
MOV r10, #0 @ Clear stack limit
@@ -161,7 +155,7 @@ __tx_thread_fiq_not_nested_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_fiq_processing_return @ Continue FIQ processing
+ B __tx_fiq_processing_return @ Continue FIQ processing
@
@ }
@ else
@@ -181,16 +175,16 @@ __tx_thread_fiq_idle_system_save:
#endif
@
@ /* Not much to do here, save the current SPSR and LR for possible
-@ use in IRQ interrupted in idle system conditions, and return to
+@ use in IRQ interrupted in idle system conditions, and return to
@ FIQ interrupt processing. */
@
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, lr} @ Store other registers that will get used
-@ @ or stripped off the stack in context
-@ @ restore
- B __tx_fiq_processing_return @ Continue FIQ processing
+@ @ or stripped off the stack in context
+@ @ restore
+ B __tx_fiq_processing_return @ Continue FIQ processing
@
@ }
-@}
+@}
diff --git a/ports/cortex_r4/gnu/src/tx_thread_fiq_nesting_end.S b/ports/cortex_r4/gnu/src/tx_thread_fiq_nesting_end.S
index 245752a5..8e5cd21c 100644
--- a/ports/cortex_r4/gnu/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_r4/gnu/src/tx_thread_fiq_nesting_end.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -27,7 +27,7 @@ DISABLE_INTS = 0xC0 @ Disable IRQ/FIQ interrupts
#else
DISABLE_INTS = 0x80 @ Disable IRQ interrupts
#endif
-MODE_MASK = 0x1F @ Mode mask
+MODE_MASK = 0x1F @ Mode mask
FIQ_MODE_BITS = 0x11 @ FIQ mode bits
@
@
@@ -37,51 +37,45 @@ FIQ_MODE_BITS = 0x11 @ FIQ mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_nesting_end Cortex-R4/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_nesting_end Cortex-R4/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from FIQ mode after */
-@/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-@/* processing from system mode back to FIQ mode prior to the ISR */
-@/* calling _tx_thread_fiq_context_restore. Note that this function */
-@/* assumes the system stack pointer is in the same position after */
-@/* nesting start function was called. */
-@/* */
-@/* This function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with FIQ interrupts disabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is called by the application from FIQ mode after */
+@/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+@/* processing from system mode back to FIQ mode prior to the ISR */
+@/* calling _tx_thread_fiq_context_restore. Note that this function */
+@/* assumes the system stack pointer is in the same position after */
+@/* nesting start function was called. */
+@/* */
+@/* This function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with FIQ interrupts disabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_fiq_nesting_end(VOID)
@@ -93,7 +87,7 @@ _tx_thread_fiq_nesting_end:
MRS r0, CPSR @ Pickup the CPSR
ORR r0, r0, #DISABLE_INTS @ Build disable interrupt value
MSR CPSR_c, r0 @ Disable interrupts
- LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
@ 8-byte alignment logic)
BIC r0, r0, #MODE_MASK @ Clear mode bits
ORR r0, r0, #FIQ_MODE_BITS @ Build IRQ mode CPSR
diff --git a/ports/cortex_r4/gnu/src/tx_thread_fiq_nesting_start.S b/ports/cortex_r4/gnu/src/tx_thread_fiq_nesting_start.S
index 636007cb..f836f639 100644
--- a/ports/cortex_r4/gnu/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_r4/gnu/src/tx_thread_fiq_nesting_start.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -33,48 +33,42 @@ SYS_MODE_BITS = 0x1F @ System mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_nesting_start Cortex-R4/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_nesting_start Cortex-R4/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from FIQ mode after */
-@/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-@/* processing to the system mode so nested FIQ interrupt processing */
-@/* is possible (system mode has its own "lr" register). Note that */
-@/* this function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with FIQ interrupts enabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is called by the application from FIQ mode after */
+@/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+@/* processing to the system mode so nested FIQ interrupt processing */
+@/* is possible (system mode has its own "lr" register). Note that */
+@/* this function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with FIQ interrupts enabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/cortex_r4/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_r4/gnu/src/tx_thread_interrupt_control.S
index b78773a0..df05d745 100644
--- a/ports/cortex_r4/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_r4/gnu/src/tx_thread_interrupt_control.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -34,7 +34,7 @@ INT_MASK = 0x03F
$_tx_thread_interrupt_control:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_interrupt_control @ Call _tx_thread_interrupt_control function
@@ -44,42 +44,36 @@ $_tx_thread_interrupt_control:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_interrupt_control Cortex-R4/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_interrupt_control Cortex-R4/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is responsible for changing the interrupt lockout */
-@/* posture of the system. */
-@/* */
-@/* INPUT */
-@/* */
-@/* new_posture New interrupt lockout posture */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* old_posture Old interrupt lockout posture */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* Application Code */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is responsible for changing the interrupt lockout */
+@/* posture of the system. */
+@/* */
+@/* INPUT */
+@/* */
+@/* new_posture New interrupt lockout posture */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* old_posture Old interrupt lockout posture */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* Application Code */
@/* */
@/**************************************************************************/
@UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/cortex_r4/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_r4/gnu/src/tx_thread_interrupt_disable.S
index 7e376a51..9440f6c2 100644
--- a/ports/cortex_r4/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_r4/gnu/src/tx_thread_interrupt_disable.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -31,7 +31,7 @@
$_tx_thread_interrupt_disable:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_interrupt_disable @ Call _tx_thread_interrupt_disable function
@@ -41,41 +41,35 @@ $_tx_thread_interrupt_disable:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_interrupt_disable Cortex-R4/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_interrupt_disable Cortex-R4/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is responsible for disabling interrupts */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* old_posture Old interrupt lockout posture */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* Application Code */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is responsible for disabling interrupts */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* old_posture Old interrupt lockout posture */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* Application Code */
@/* */
@/**************************************************************************/
@UINT _tx_thread_interrupt_disable(void)
@@ -93,7 +87,7 @@ _tx_thread_interrupt_disable:
#ifdef TX_ENABLE_FIQ_SUPPORT
CPSID if @ Disable IRQ and FIQ
#else
- CPSID i @ Disable IRQ
+ CPSID i @ Disable IRQ
#endif
#ifdef __THUMB_INTERWORK
diff --git a/ports/cortex_r4/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_r4/gnu/src/tx_thread_interrupt_restore.S
index 209cb658..3728f23e 100644
--- a/ports/cortex_r4/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_r4/gnu/src/tx_thread_interrupt_restore.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -31,7 +31,7 @@
$_tx_thread_interrupt_restore:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_interrupt_restore @ Call _tx_thread_interrupt_restore function
@@ -41,42 +41,36 @@ $_tx_thread_interrupt_restore:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_interrupt_restore Cortex-R4/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_interrupt_restore Cortex-R4/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
+@/* */
@/* This function is responsible for restoring interrupts to the state */
@/* returned by a previous _tx_thread_interrupt_disable call. */
-@/* */
-@/* INPUT */
-@/* */
-@/* old_posture Old interrupt lockout posture */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* Application Code */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* INPUT */
+@/* */
+@/* old_posture Old interrupt lockout posture */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* Application Code */
@/* */
@/**************************************************************************/
@UINT _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/cortex_r4/gnu/src/tx_thread_irq_nesting_end.S b/ports/cortex_r4/gnu/src/tx_thread_irq_nesting_end.S
index 84caee5b..10a81ac0 100644
--- a/ports/cortex_r4/gnu/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_r4/gnu/src/tx_thread_irq_nesting_end.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -27,7 +27,7 @@ DISABLE_INTS = 0xC0 @ Disable IRQ/FIQ interrupts
#else
DISABLE_INTS = 0x80 @ Disable IRQ interrupts
#endif
-MODE_MASK = 0x1F @ Mode mask
+MODE_MASK = 0x1F @ Mode mask
IRQ_MODE_BITS = 0x12 @ IRQ mode bits
@
@
@@ -37,51 +37,45 @@ IRQ_MODE_BITS = 0x12 @ IRQ mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_irq_nesting_end Cortex-R4/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_irq_nesting_end Cortex-R4/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from IRQ mode after */
-@/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-@/* processing from system mode back to IRQ mode prior to the ISR */
-@/* calling _tx_thread_context_restore. Note that this function */
-@/* assumes the system stack pointer is in the same position after */
-@/* nesting start function was called. */
-@/* */
-@/* This function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with IRQ interrupts disabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is called by the application from IRQ mode after */
+@/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+@/* processing from system mode back to IRQ mode prior to the ISR */
+@/* calling _tx_thread_context_restore. Note that this function */
+@/* assumes the system stack pointer is in the same position after */
+@/* nesting start function was called. */
+@/* */
+@/* This function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with IRQ interrupts disabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_irq_nesting_end(VOID)
@@ -93,7 +87,7 @@ _tx_thread_irq_nesting_end:
MRS r0, CPSR @ Pickup the CPSR
ORR r0, r0, #DISABLE_INTS @ Build disable interrupt value
MSR CPSR_c, r0 @ Disable interrupts
- LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
@ 8-byte alignment logic)
BIC r0, r0, #MODE_MASK @ Clear mode bits
ORR r0, r0, #IRQ_MODE_BITS @ Build IRQ mode CPSR
diff --git a/ports/cortex_r4/gnu/src/tx_thread_irq_nesting_start.S b/ports/cortex_r4/gnu/src/tx_thread_irq_nesting_start.S
index 9a2b1cc3..9a123b31 100644
--- a/ports/cortex_r4/gnu/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_r4/gnu/src/tx_thread_irq_nesting_start.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -33,48 +33,42 @@ SYS_MODE_BITS = 0x1F @ System mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_irq_nesting_start Cortex-R4/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_irq_nesting_start Cortex-R4/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from IRQ mode after */
-@/* _tx_thread_context_save has been called and switches the IRQ */
-@/* processing to the system mode so nested IRQ interrupt processing */
-@/* is possible (system mode has its own "lr" register). Note that */
-@/* this function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with IRQ interrupts enabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is called by the application from IRQ mode after */
+@/* _tx_thread_context_save has been called and switches the IRQ */
+@/* processing to the system mode so nested IRQ interrupt processing */
+@/* is possible (system mode has its own "lr" register). Note that */
+@/* this function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with IRQ interrupts enabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/cortex_r4/gnu/src/tx_thread_schedule.S b/ports/cortex_r4/gnu/src/tx_thread_schedule.S
index 36a3ed61..10054a49 100644
--- a/ports/cortex_r4/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_r4/gnu/src/tx_thread_schedule.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -38,7 +38,7 @@
$_tx_thread_schedule:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_schedule @ Call _tx_thread_schedule function
@@ -48,45 +48,39 @@ $_tx_thread_schedule:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_schedule Cortex-R4/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_schedule Cortex-R4/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function waits for a thread control block pointer to appear in */
-@/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-@/* in the variable, the corresponding thread is resumed. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* _tx_initialize_kernel_enter ThreadX entry function */
-@/* _tx_thread_system_return Return to system from thread */
-@/* _tx_thread_context_restore Restore thread's context */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function waits for a thread control block pointer to appear in */
+@/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+@/* in the variable, the corresponding thread is resumed. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* _tx_initialize_kernel_enter ThreadX entry function */
+@/* _tx_thread_system_return Return to system from thread */
+@/* _tx_thread_context_restore Restore thread's context */
@/* */
@/**************************************************************************/
@VOID _tx_thread_schedule(VOID)
@@ -116,7 +110,7 @@ __tx_thread_schedule_loop:
@
@ }
@ while(_tx_thread_execute_ptr == TX_NULL);
-@
+@
@ /* Yes! We have a thread to execute. Lockout interrupts and
@ transfer control to it. */
@
@@ -129,7 +123,7 @@ __tx_thread_schedule_loop:
@ /* Setup the current thread pointer. */
@ _tx_thread_current_ptr = _tx_thread_execute_ptr;
@
- LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread
STR r0, [r1] @ Setup current thread pointer
@
@ /* Increment the run count for this thread. */
@@ -143,7 +137,7 @@ __tx_thread_schedule_loop:
@ /* Setup time-slice, if present. */
@ _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
@
- LDR r2, =_tx_timer_time_slice @ Pickup address of time-slice
+ LDR r2, =_tx_timer_time_slice @ Pickup address of time-slice
@ variable
LDR sp, [r0, #8] @ Switch stack pointers
STR r3, [r2] @ Setup time-slice
diff --git a/ports/cortex_r4/gnu/src/tx_thread_stack_build.S b/ports/cortex_r4/gnu/src/tx_thread_stack_build.S
index 678e7a9b..f5748109 100644
--- a/ports/cortex_r4/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_r4/gnu/src/tx_thread_stack_build.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -42,7 +42,7 @@ CPSR_MASK = 0x9F @ Mask initial CPSR, IRQ interru
.type $_tx_thread_stack_build,function
$_tx_thread_stack_build:
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_stack_build @ Call _tx_thread_stack_build function
@@ -52,44 +52,38 @@ $_tx_thread_stack_build:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_stack_build Cortex-R4/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_stack_build Cortex-R4/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
+@/* */
@/* This function builds a stack frame on the supplied thread's stack. */
@/* The stack frame results in a fake interrupt return to the supplied */
-@/* function pointer. */
-@/* */
-@/* INPUT */
-@/* */
+@/* function pointer. */
+@/* */
+@/* INPUT */
+@/* */
@/* thread_ptr Pointer to thread control blk */
@/* function_ptr Pointer to return function */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* _tx_thread_create Create thread service */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* _tx_thread_create Create thread service */
@/* */
@/**************************************************************************/
@VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -98,10 +92,10 @@ $_tx_thread_stack_build:
.type _tx_thread_stack_build,function
_tx_thread_stack_build:
@
-@
+@
@ /* Build a fake interrupt frame. The form of the fake interrupt stack
@ on the ARM9 should look like the following after it is built:
-@
+@
@ Stack Top: 1 Interrupt stack frame type
@ CPSR Initial value for CPSR
@ a1 (r0) Initial value for a1
diff --git a/ports/cortex_r4/gnu/src/tx_thread_system_return.S b/ports/cortex_r4/gnu/src/tx_thread_system_return.S
index eee00ce6..f8a0ee09 100644
--- a/ports/cortex_r4/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_r4/gnu/src/tx_thread_system_return.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -42,7 +42,7 @@
$_tx_thread_system_return:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_system_return @ Call _tx_thread_system_return function
@@ -52,44 +52,38 @@ $_tx_thread_system_return:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_system_return Cortex-R4/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_system_return Cortex-R4/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is target processor specific. It is used to transfer */
-@/* control from a thread back to the ThreadX system. Only a */
-@/* minimal context is saved since the compiler assumes temp registers */
-@/* are going to get slicked by a function call anyway. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_schedule Thread scheduling loop */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ThreadX components */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is target processor specific. It is used to transfer */
+@/* control from a thread back to the ThreadX system. Only a */
+@/* minimal context is saved since the compiler assumes temp registers */
+@/* are going to get slicked by a function call anyway. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_schedule Thread scheduling loop */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ThreadX components */
@/* */
@/**************************************************************************/
@VOID _tx_thread_system_return(VOID)
@@ -124,7 +118,7 @@ _tx_skip_solicited_vfp_save:
@
MOV r0, #0 @ Build a solicited stack type
STMDB sp!, {r0-r1} @ Save type and CPSR
-@
+@
@
#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
@
diff --git a/ports/cortex_r4/gnu/src/tx_thread_vectored_context_save.S b/ports/cortex_r4/gnu/src/tx_thread_vectored_context_save.S
index a303ef54..1c4f07ce 100644
--- a/ports/cortex_r4/gnu/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_r4/gnu/src/tx_thread_vectored_context_save.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -30,47 +30,41 @@
@
@/* No 16-bit Thumb mode veneer code is needed for _tx_thread_vectored_context_save
@ since it will never be called 16-bit mode. */
-@
+@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_vectored_context_save Cortex-R4/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_vectored_context_save Cortex-R4/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function saves the context of an executing thread in the */
-@/* beginning of interrupt processing. The function also ensures that */
-@/* the system stack is used upon return to the calling ISR. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function saves the context of an executing thread in the */
+@/* beginning of interrupt processing. The function also ensures that */
+@/* the system stack is used upon return to the calling ISR. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_vectored_context_save(VOID)
@@ -128,7 +122,7 @@ __tx_thread_not_nested_save:
LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread ptr
LDR r0, [r1, #0] @ Pickup current thread pointer
CMP r0, #0 @ Is it NULL?
- BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
@ scheduling loop - nothing needs saving!
@
@ /* Note: Minimal context of interrupted thread is already saved. */
@@ -160,7 +154,7 @@ __tx_thread_idle_system_save:
@
@ /* Interrupt occurred in the scheduling loop. */
@
-@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
+@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
@ processing. */
@
MOV r10, #0 @ Clear stack limit
diff --git a/ports/cortex_r4/gnu/src/tx_timer_interrupt.S b/ports/cortex_r4/gnu/src/tx_timer_interrupt.S
index 0b6c8381..99a1dff7 100644
--- a/ports/cortex_r4/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_r4/gnu/src/tx_timer_interrupt.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Timer */
@/** */
@@ -48,7 +48,7 @@
.type $_tx_timer_interrupt,function
$_tx_timer_interrupt:
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_timer_interrupt @ Call _tx_timer_interrupt function
@@ -58,46 +58,40 @@ $_tx_timer_interrupt:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_timer_interrupt Cortex-R4/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_timer_interrupt Cortex-R4/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function processes the hardware timer interrupt. This */
-@/* processing includes incrementing the system clock and checking for */
-@/* time slice and/or timer expiration. If either is found, the */
-@/* interrupt context save/restore functions are called along with the */
-@/* expiration functions. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_time_slice Time slice interrupted thread */
-@/* _tx_timer_expiration_process Timer expiration processing */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* interrupt vector */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function processes the hardware timer interrupt. This */
+@/* processing includes incrementing the system clock and checking for */
+@/* time slice and/or timer expiration. If either is found, the */
+@/* interrupt context save/restore functions are called along with the */
+@/* expiration functions. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_time_slice Time slice interrupted thread */
+@/* _tx_timer_expiration_process Timer expiration processing */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* interrupt vector */
@/* */
@/**************************************************************************/
@VOID _tx_timer_interrupt(VOID)
@@ -122,7 +116,7 @@ _tx_timer_interrupt:
@ if (_tx_timer_time_slice)
@ {
@
- LDR r3, =_tx_timer_time_slice @ Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice @ Pickup address of time-slice
LDR r2, [r3] @ Pickup time-slice
CMP r2, #0 @ Is it non-active?
BEQ __tx_timer_no_time_slice @ Yes, skip time-slice processing
@@ -240,7 +234,7 @@ __tx_timer_dont_activate:
@ if (_tx_timer_expired_time_slice)
@ {
@
- LDR r3, =_tx_timer_expired_time_slice @ Pickup address of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice @ Pickup address of time-slice expired
LDR r2, [r3] @ Pickup the actual flag
CMP r2, #0 @ See if the flag is set
BEQ __tx_timer_not_ts_expiration @ No, skip time-slice processing
diff --git a/ports/cortex_r4/iar/example_build/sample_threadx.c b/ports/cortex_r4/iar/example_build/sample_threadx.c
index 983109cc..ca92ff86 100644
--- a/ports/cortex_r4/iar/example_build/sample_threadx.c
+++ b/ports/cortex_r4/iar/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -63,7 +63,7 @@ void thread_6_and_7_entry(ULONG thread_input);
int main()
{
-
+
/* Enter the ThreadX kernel. */
tx_kernel_enter();
}
@@ -87,42 +87,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -130,23 +130,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -249,11 +249,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -312,7 +312,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -365,7 +365,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_r4/iar/example_build/tx_initialize_low_level.s b/ports/cortex_r4/iar/example_build/tx_initialize_low_level.s
index 1b743b09..b3310a39 100644
--- a/ports/cortex_r4/iar/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_r4/iar/example_build/tx_initialize_low_level.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Initialize */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Initialize */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -52,7 +52,7 @@ SVC_MODE DEFINE 0x13 ; SVC mode
;
;
;
-;/* Define the FREE_MEM segment that will specify where free memory is
+;/* Define the FREE_MEM segment that will specify where free memory is
; defined. This must also be located in at the end of other RAM segments
; in the linker control file. The value of this segment is what is passed
; to tx_application_define. */
@@ -65,45 +65,39 @@ __tx_free_memory_start
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level Cortex-R4/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -135,7 +129,7 @@ _tx_initialize_low_level
;
LDR r2, =_tx_initialize_unused_memory ; Pickup unused memory ptr address
STR r0, [r2, #0] ; Save first free memory address
-;
+;
; /* Setup Timer for periodic interrupts. */
;
; /* Done, return to caller. */
@@ -183,17 +177,17 @@ IRQ_Handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -208,7 +202,7 @@ __tx_irq_processing_return
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -227,22 +221,22 @@ __tx_irq_processing_return
; /* Jump to context save to save system context. */
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other registers
; BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -251,7 +245,7 @@ __tx_irq_processing_return
; /* Application IRQ handler is called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
diff --git a/ports/cortex_r4/iar/inc/tx_port.h b/ports/cortex_r4/iar/inc/tx_port.h
index f4048621..c2950326 100644
--- a/ports/cortex_r4/iar/inc/tx_port.h
+++ b/ports/cortex_r4/iar/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-R4/IAR */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-R4/IAR */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -79,7 +71,7 @@
#endif
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -115,19 +107,19 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#define TX_INT_DISABLE 0x80 /* Disable IRQ interrupts */
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -172,7 +164,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -186,18 +178,18 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable; \
- VOID *tx_thread_iar_tls_pointer;
+ VOID *tx_thread_iar_tls_pointer;
#else
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable;
#endif
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -211,11 +203,11 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -225,23 +217,23 @@ ULONG _tx_misra_time_stamp_get(VOID);
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#if (__VER__ < 8000000)
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {_tx_iar_destroy_per_thread_tls_area(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
-#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
+#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#endif
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -269,8 +261,8 @@ void __iar_Initlocks(void);
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef TX_DISABLE_INLINE
@@ -281,22 +273,22 @@ void __iar_Initlocks(void);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (UINT) __CLZ(m); \
- b = 31 - b;
+ b = 31 - b;
#endif
#endif
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
/* First, check and see what mode the file is being compiled in. The IAR compiler
- defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
+ defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
is present. If ARM 32-bit mode is present, the fast CPSR manipulation macros
are available. Otherwise, if Thumb mode is present, we must use function calls. */
@@ -365,8 +357,8 @@ void tx_thread_vfp_disable(void);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-R4/IAR Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-R4/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_r4/iar/readme_threadx.txt b/ports/cortex_r4/iar/readme_threadx.txt
index 400eaa1f..ac297f16 100644
--- a/ports/cortex_r4/iar/readme_threadx.txt
+++ b/ports/cortex_r4/iar/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-R4
+ Microsoft's Azure RTOS ThreadX for Cortex-R4
Thumb & 32-bit Mode
@@ -7,10 +7,10 @@
1. Building the ThreadX run-time Library
Building the ThreadX library is easy. First, open the Azure RTOS workspace
-azure_rtos.eww. Next, make the TX project the "active project" in the
-IAR Embedded Workbench and select the "Make" button. You should observe
-assembly and compilation of a series of ThreadX source files. This
-results in the ThreadX run-time library file tx.a, which is needed by
+azure_rtos.eww. Next, make the TX project the "active project" in the
+IAR Embedded Workbench and select the "Make" button. You should observe
+assembly and compilation of a series of ThreadX source files. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
@@ -20,47 +20,47 @@ The ThreadX demonstration is designed to execute under the IAR
Windows-based Cortex-R4 simulator.
Building the demonstration is easy; simply make the sample_threadx.ewp project
-the "active project" in the IAR Embedded Workbench and select the
+the "active project" in the IAR Embedded Workbench and select the
"Make" button.
-You should observe the compilation of sample_threadx.c (which is the demonstration
+You should observe the compilation of sample_threadx.c (which is the demonstration
application) and linking with tx.a. The resulting file sample_threadx.out is a
binary file that can be downloaded and executed on IAR's Cortex-R4 simulator.
3. System Initialization
-The entry point in ThreadX for the Cortex-R4 using IAR tools is at label
-?cstartup. This is defined within the IAR compiler's startup code. In
-addition, this is where all static and global preset C variable
+The entry point in ThreadX for the Cortex-R4 using IAR tools is at label
+?cstartup. This is defined within the IAR compiler's startup code. In
+addition, this is where all static and global preset C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, and a periodic timer interrupt source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, and a periodic timer interrupt source.
By default, the vector area is defined at the top of cstartup.s, which is
-a slightly modified from the base IAR file.
+a slightly modified from the base IAR file.
The _tx_initialize_low_level function inside of tx_initialize_low_level.s
-also determines the first available address for use by the application, which
-is supplied as the sole input parameter to your application definition function,
-tx_application_define. To accomplish this, a section is created in
-tx_initialize_low_level.s called FREE_MEM, which must be located after all
+also determines the first available address for use by the application, which
+is supplied as the sole input parameter to your application definition function,
+tx_application_define. To accomplish this, a section is created in
+tx_initialize_low_level.s called FREE_MEM, which must be located after all
other RAM sections in memory.
4. Register Usage and Stack Frames
-The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
-scratch registers for each function. All other registers used by a C function
-must be preserved by the function. ThreadX takes advantage of this in
-situations where a context switch happens as a result of making a ThreadX
-service call (which is itself a C function). In such cases, the saved
+The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
+scratch registers for each function. All other registers used by a C function
+must be preserved by the function. ThreadX takes advantage of this in
+situations where a context switch happens as a result of making a ThreadX
+service call (which is itself a C function). In such cases, the saved
context of a thread is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -78,12 +78,12 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
5. Conditional Compilation Switches
@@ -92,159 +92,159 @@ The following are conditional compilation options for building the ThreadX libra
and application:
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
-project to enable various compiler optimizations.
+project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-R4
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-R4 vectors start at address zero. The demonstration system startup
-cstartup.s file contains the vectors and is loaded at address zero.
-On actual hardware platforms, this area might have to be copied to address 0.
+cstartup.s file contains the vectors and is loaded at address zero.
+On actual hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -255,12 +255,12 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
PUBLIC __tx_irq_handler
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -268,7 +268,7 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -281,7 +281,7 @@ __tx_irq_processing_return
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.s:
@@ -292,12 +292,12 @@ __tx_example_vectored_irq_handler
; /* Jump to context save to save system context. */
STMDB sp!, {r0-r3} ; Save some scratch registers
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -314,24 +314,24 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
RSEG .text:CODE:NOROOT(2)
PUBLIC __tx_irq_handler
RSEG .text:CODE:NOROOT(2)
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -339,15 +339,15 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;
BL _tx_thread_irq_nesting_start
@@ -355,7 +355,7 @@ __tx_irq_processing_return
; /* Application ISR dispatch call goes here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;
BL _tx_thread_irq_nesting_end
@@ -366,12 +366,12 @@ __tx_irq_processing_return
7.3 FIQ Interrupts
-By default, Cortex-R4 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of a thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, Cortex-R4 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of a thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -383,21 +383,21 @@ cannot be disabled. The hardware does not support nested FIQ interrupts.
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
+To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
in the IRQ processing.
9. Thumb/Cortex-R4 Mixed Mode
-By default, ThreadX is setup for running in Cortex-R4 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
+By default, ThreadX is setup for running in Cortex-R4 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
ThreadX file and/or the application in Thumb mode. The only exception
-to this is the file tx_thread_shell_entry.c. This file must always be
+to this is the file tx_thread_shell_entry.c. This file must always be
built in 32-bit mode.
diff --git a/ports/cortex_r4/iar/src/tx_iar.c b/ports/cortex_r4/iar/src/tx_iar.c
index a37231c8..238b485e 100644
--- a/ports/cortex_r4/iar/src/tx_iar.c
+++ b/ports/cortex_r4/iar/src/tx_iar.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** IAR Multithreaded Library Support */
/** */
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,24 +423,24 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#include
+#include
void * __aeabi_read_tp();
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports/cortex_r4/iar/src/tx_thread_context_restore.s b/ports/cortex_r4/iar/src/tx_thread_context_restore.s
index 1b51ccdc..7f7d414a 100644
--- a/ports/cortex_r4/iar/src/tx_thread_context_restore.s
+++ b/ports/cortex_r4/iar/src/tx_thread_context_restore.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -47,44 +47,38 @@ THUMB_MASK DEFINE 0x20 ; Thumb bit mask
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore Cortex-R4/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -112,13 +106,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -181,7 +175,7 @@ __tx_thread_preempt_restore
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
-
+
#ifdef __ARMVFP__
LDR r2, [r0, #144] ; Pickup the VFP enabled flag
CMP r2, #0 ; Is the VFP enabled?
@@ -191,7 +185,7 @@ __tx_thread_preempt_restore
VSTMDB sp!, {D0-D15} ; Save D0-D15
_tx_skip_irq_vfp_save
#endif
-
+
MOV r3, #1 ; Build interrupt stack type
STMDB sp!, {r3, r4} ; Save interrupt stack type and SPSR
STR sp, [r0, #8] ; Save stack pointer in thread control
@@ -237,7 +231,7 @@ __tx_thread_idle_system_restore
; /* Just return back to the scheduler! */
;
CPS #SVC_MODE ; Enter SVC mode
-
+
B _tx_thread_schedule ; Return to scheduler
;}
;
diff --git a/ports/cortex_r4/iar/src/tx_thread_context_save.s b/ports/cortex_r4/iar/src/tx_thread_context_save.s
index 9c01112d..6ce8cd84 100644
--- a/ports/cortex_r4/iar/src/tx_thread_context_save.s
+++ b/ports/cortex_r4/iar/src/tx_thread_context_save.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -36,43 +36,37 @@
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save Cortex-R4/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
@@ -89,7 +83,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -104,7 +98,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -120,7 +114,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -134,13 +128,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -160,7 +154,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -170,7 +164,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -185,7 +179,7 @@ __tx_thread_idle_system_save
#endif
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports/cortex_r4/iar/src/tx_thread_interrupt_control.s b/ports/cortex_r4/iar/src/tx_thread_interrupt_control.s
index 44561789..ece9c9a9 100644
--- a/ports/cortex_r4/iar/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_r4/iar/src/tx_thread_interrupt_control.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;#define TX_SOURCE_CODE
;
@@ -32,42 +32,36 @@
INT_MASK DEFINE 0x80 ; Interrupt bit mask
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control Cortex-R4/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
@@ -87,7 +81,7 @@ _tx_thread_interrupt_control
;
MSR CPSR_cxsf, r1 ; Setup new CPSR
AND r0, r3, #INT_MASK ; Return previous interrupt mask
-
+
BX lr ; Return to caller
;
;}
diff --git a/ports/cortex_r4/iar/src/tx_thread_interrupt_disable.s b/ports/cortex_r4/iar/src/tx_thread_interrupt_disable.s
index cc071a5b..bb162749 100644
--- a/ports/cortex_r4/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_r4/iar/src/tx_thread_interrupt_disable.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;#define TX_SOURCE_CODE
;
@@ -32,41 +32,35 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable Cortex-R4/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(VOID)
diff --git a/ports/cortex_r4/iar/src/tx_thread_interrupt_restore.s b/ports/cortex_r4/iar/src/tx_thread_interrupt_restore.s
index a2bc5506..b96ebe46 100644
--- a/ports/cortex_r4/iar/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_r4/iar/src/tx_thread_interrupt_restore.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;#define TX_SOURCE_CODE
;
@@ -28,42 +28,36 @@
;#include "tx_thread.h"
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore Cortex-R4/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for restoring interrupts to the state */
-;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for restoring interrupts to the state */
+;/* returned by a previous _tx_thread_interrupt_disable call. */
+;/* */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;void _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/cortex_r4/iar/src/tx_thread_irq_nesting_end.s b/ports/cortex_r4/iar/src/tx_thread_irq_nesting_end.s
index 42b1deae..cf06f9b0 100644
--- a/ports/cortex_r4/iar/src/tx_thread_irq_nesting_end.s
+++ b/ports/cortex_r4/iar/src/tx_thread_irq_nesting_end.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -33,51 +33,45 @@
IRQ_MODE DEFINE 0x12 ; IRQ mode
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end Cortex-R4/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
diff --git a/ports/cortex_r4/iar/src/tx_thread_irq_nesting_start.s b/ports/cortex_r4/iar/src/tx_thread_irq_nesting_start.s
index 83fbbd17..1a7c99d2 100644
--- a/ports/cortex_r4/iar/src/tx_thread_irq_nesting_start.s
+++ b/ports/cortex_r4/iar/src/tx_thread_irq_nesting_start.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -33,48 +33,42 @@
SYS_MODE DEFINE 0x1F ; System mode
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start Cortex-R4/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/cortex_r4/iar/src/tx_thread_schedule.s b/ports/cortex_r4/iar/src/tx_thread_schedule.s
index 42be1490..dd548e46 100644
--- a/ports/cortex_r4/iar/src/tx_thread_schedule.s
+++ b/ports/cortex_r4/iar/src/tx_thread_schedule.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -37,45 +37,39 @@
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule Cortex-R4/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
@@ -104,7 +98,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -113,7 +107,7 @@ __tx_thread_schedule_loop
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
;
- LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
STR r0, [r1, #0] ; Setup current thread pointer
;
; /* Increment the run count for this thread. */
@@ -127,7 +121,7 @@ __tx_thread_schedule_loop
; /* Setup time-slice, if present. */
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
;
- LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
+ LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
; variable
LDR sp, [r0, #8] ; Switch stack pointers
STR r3, [r2, #0] ; Setup time-slice
@@ -184,7 +178,7 @@ _tx_skip_solicited_vfp_restore:
#ifdef __ARMVFP__
PUBLIC tx_thread_vfp_enable
CODE32
-tx_thread_vfp_enable??rA
+tx_thread_vfp_enable??rA
tx_thread_vfp_enable
MRS r2, CPSR ; Pickup the CPSR
CPSID i ; Disable IRQ interrupts
@@ -200,7 +194,7 @@ __tx_no_thread_to_enable:
PUBLIC tx_thread_vfp_disable
CODE32
-tx_thread_vfp_disable??rA
+tx_thread_vfp_disable??rA
tx_thread_vfp_disable
MRS r2, CPSR ; Pickup the CPSR
CPSID i ; Disable IRQ interrupts
diff --git a/ports/cortex_r4/iar/src/tx_thread_stack_build.s b/ports/cortex_r4/iar/src/tx_thread_stack_build.s
index bbb86848..7a95aeb7 100644
--- a/ports/cortex_r4/iar/src/tx_thread_stack_build.s
+++ b/ports/cortex_r4/iar/src/tx_thread_stack_build.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -33,58 +33,52 @@ SVC_MODE DEFINE 0x13 ; SVC mode
CPSR_MASK DEFINE 0x9F ; Mask initial CPSR, IRQ ints enabled
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build Cortex-R4/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function builds a stack frame on the supplied thread's stack. */
-;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
-;/* thread_ptr Pointer to thread control blk */
-;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function builds a stack frame on the supplied thread's stack. */
+;/* The stack frame results in a fake interrupt return to the supplied */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
+;/* thread_ptr Pointer to thread control blk */
+;/* function_ptr Pointer to return function */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
;{
RSEG .text:CODE:NOROOT(2)
PUBLIC _tx_thread_stack_build
-
+
ARM
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-R4 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports/cortex_r4/iar/src/tx_thread_system_return.s b/ports/cortex_r4/iar/src/tx_thread_system_return.s
index a8c755fa..89a42df4 100644
--- a/ports/cortex_r4/iar/src/tx_thread_system_return.s
+++ b/ports/cortex_r4/iar/src/tx_thread_system_return.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;#define TX_SOURCE_CODE
;
@@ -37,44 +37,38 @@
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return Cortex-R4/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
@@ -107,7 +101,7 @@ _tx_skip_solicited_vfp_save:
MOV r0, #0 ; Build a solicited stack type
STMDB sp!, {r0-r1} ; Save type and CPSR
-;
+;
;
#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
;
diff --git a/ports/cortex_r4/iar/src/tx_thread_vectored_context_save.s b/ports/cortex_r4/iar/src/tx_thread_vectored_context_save.s
index aa24d6c3..91fb156e 100644
--- a/ports/cortex_r4/iar/src/tx_thread_vectored_context_save.s
+++ b/ports/cortex_r4/iar/src/tx_thread_vectored_context_save.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -35,43 +35,37 @@
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save Cortex-R4/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_vectored_context_save(VOID)
@@ -128,7 +122,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -160,7 +154,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports/cortex_r4/iar/src/tx_timer_interrupt.s b/ports/cortex_r4/iar/src/tx_timer_interrupt.s
index 896c5525..c17b011d 100644
--- a/ports/cortex_r4/iar/src/tx_timer_interrupt.s
+++ b/ports/cortex_r4/iar/src/tx_timer_interrupt.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Timer */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Timer */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;#define TX_SOURCE_CODE
;
@@ -43,46 +43,40 @@
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt Cortex-R4/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt Cortex-R4/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time-slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time-slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -108,7 +102,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -226,13 +220,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports/cortex_r5/ac5/example_build/sample_threadx.c b/ports/cortex_r5/ac5/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/cortex_r5/ac5/example_build/sample_threadx.c
+++ b/ports/cortex_r5/ac5/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_r5/ac5/example_build/tx_initialize_low_level.s b/ports/cortex_r5/ac5/example_build/tx_initialize_low_level.s
index 0ae74009..a403c04a 100644
--- a/ports/cortex_r5/ac5/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_r5/ac5/example_build/tx_initialize_low_level.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Initialize */
;/** */
@@ -90,45 +90,39 @@ __vectors
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level Cortex-R5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level Cortex-R5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -179,7 +173,7 @@ _tx_initialize_low_level
; _tx_thread_system_stack_ptr = (VOID_PTR) (sp);
;
LDR r1, =_tx_thread_system_stack_ptr ; Pickup address of system stack ptr
- LDR r0, [r1, #0] ; Pickup system stack
+ LDR r0, [r1, #0] ; Pickup system stack
ADD r0, r0, #4 ; Increment to next free word
;
; /* Save the first available memory address. */
@@ -201,7 +195,7 @@ _tx_initialize_low_level
;
;
;/* Define initial heap/stack routine for the ARM RealView (and ADS) startup code. This
-; routine will set the initial stack to use the ThreadX IRQ & FIQ &
+; routine will set the initial stack to use the ThreadX IRQ & FIQ &
; (optionally SYS) stack areas. */
;
EXPORT __user_initial_stackheap
@@ -253,7 +247,7 @@ __tx_reserved_handler
;
;
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -261,21 +255,21 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
BL _tx_timer_interrupt ; Timer interrupt handler
_tx_not_timer_interrupt
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -285,7 +279,7 @@ _tx_not_timer_interrupt
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
IF :DEF:TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -301,28 +295,28 @@ _tx_not_timer_interrupt
__tx_example_vectored_irq_handler
;
;
-; /* Save initial context and call context save to prepare for
+; /* Save initial context and call context save to prepare for
; vectored ISR execution. */
;
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
; BL _tx_thread_vectored_context_save ; Vectored context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -331,7 +325,7 @@ __tx_example_vectored_irq_handler
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
; IF :DEF:TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
@@ -353,11 +347,11 @@ __tx_fiq_processing_return
; /* At this point execution is still in the FIQ mode. The CPSR, point of
; interrupt, and all C scratch registers are available for use. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
; from FIQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with FIQ interrupts enabled.
+; system mode and returns with FIQ interrupts enabled.
;
-; NOTE: It is very important to ensure all FIQ interrupts are cleared
+; NOTE: It is very important to ensure all FIQ interrupts are cleared
; prior to enabling nested FIQ interrupts. */
IF :DEF:TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/cortex_r5/ac5/inc/tx_port.h b/ports/cortex_r5/ac5/inc/tx_port.h
index 678700dc..aa188c5c 100644
--- a/ports/cortex_r5/ac5/inc/tx_port.h
+++ b/ports/cortex_r5/ac5/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-R5/AC5 */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-R5/AC5 */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -75,7 +67,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -111,12 +103,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -126,8 +118,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -174,7 +166,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -186,13 +178,13 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
-#define TX_THREAD_EXTENSION_2
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -206,11 +198,11 @@ typedef unsigned short USHORT;
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -218,8 +210,8 @@ typedef unsigned short USHORT;
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -246,21 +238,21 @@ typedef unsigned short USHORT;
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef __thumb
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (ULONG) __clz((unsigned int) m); \
- b = 31 - b;
+ b = 31 - b;
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -280,7 +272,7 @@ typedef unsigned short USHORT;
{ \
__enable_irq(); \
__enable_fiq(); \
- }
+ }
#else
@@ -289,7 +281,7 @@ typedef unsigned short USHORT;
#define TX_RESTORE if (!interrupt_save_disabled) \
{ \
__enable_irq(); \
- }
+ }
#endif
#else
@@ -318,8 +310,8 @@ unsigned int _tx_thread_interrupt_restore(UINT old_posture);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-R5/AC5 Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-R5/AC5 Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_r5/ac5/readme_threadx.txt b/ports/cortex_r5/ac5/readme_threadx.txt
index 9910f87e..0df144e2 100644
--- a/ports/cortex_r5/ac5/readme_threadx.txt
+++ b/ports/cortex_r5/ac5/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-R5
+ Microsoft's Azure RTOS ThreadX for Cortex-R5
Thumb & 32-bit Mode
@@ -6,21 +6,21 @@
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the ARM
-AC5 development environment. At this point you may run the build_threadx.bat
-batch file. This will build the ThreadX run-time environment in the
-"example_build" directory.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the ARM
+AC5 development environment. At this point you may run the build_threadx.bat
+batch file. This will build the ThreadX run-time environment in the
+"example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
1.1 Building with Project Files
-The ThreadX library can also be built via project files. Simply open
-the tx.mcp file with project builder and select make. This will place
+The ThreadX library can also be built via project files. Simply open
+the tx.mcp file with project builder and select make. This will place
the tx.a library file into the Debug sub-directory.
@@ -29,45 +29,45 @@ the tx.a library file into the Debug sub-directory.
The ThreadX demonstration is designed to execute under the ARM
Windows-based simulator.
-Building the demonstration is easy; simply execute the build_threadx_demo.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_demo.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file sample_threadx.axf
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file sample_threadx.axf
is a binary file that can be downloaded and executed on the ARM simulator.
2.0.1 Building with Project Files
-The ThreadX demonstration can also be built via project files. Simply open
-the sample_threadx.mcp file with project builder and select make. This will place
+The ThreadX demonstration can also be built via project files. Simply open
+the sample_threadx.mcp file with project builder and select make. This will place
the sample_threadx.axf output image into the Debug sub-directory.
3. System Initialization
-The entry point in ThreadX for the Cortex-R5 using AC5 tools is at label
-__main. This is defined within the AC5 compiler's startup code. In
-addition, this is where all static and global pre-set C variable
+The entry point in ThreadX for the Cortex-R5 using AC5 tools is at label
+__main. This is defined within the AC5 compiler's startup code. In
+addition, this is where all static and global pre-set C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, the vector area, and a periodic timer interrupt
-source. By default, the vector area is defined to be located in the Init area,
-which is defined at the top of tx_initialize_low_level.s. This area is typically
-located at 0. In situations where this is impossible, the vectors at the beginning
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, the vector area, and a periodic timer interrupt
+source. By default, the vector area is defined to be located in the Init area,
+which is defined at the top of tx_initialize_low_level.s. This area is typically
+located at 0. In situations where this is impossible, the vectors at the beginning
of the Init area should be copied to address 0.
This is also where initialization of a periodic timer interrupt source
should take place.
-In addition, _tx_initialize_low_level determines the first available
-address for use by the application, which is supplied as the sole input
+In addition, _tx_initialize_low_level determines the first available
+address for use by the application, which is supplied as the sole input
parameter to your application definition function, tx_application_define.
4. Assembler / Compiler Switches
-The following are compiler switches used in building the demonstration
+The following are compiler switches used in building the demonstration
system:
Compiler Switch Meaning
@@ -83,10 +83,10 @@ Linker Switch Meaning
-o demo.axf Specifies demo output file name
--elf Specifies elf output file format
--ro Specifies that Read-Only memory starts at address 0
- --first tx_initialize_low_level.o(Init)
+ --first tx_initialize_low_level.o(Init)
Specifies that the first area loaded is Init
--remove Remove unused areas
- --list Specifies map file name
+ --list Specifies map file name
--symbols Specifies symbols for map file
--map Creates a map file
@@ -97,161 +97,161 @@ Application Defines
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
--PD "TX_ENABLE_IRQ_NESTING SETL {TRUE}" This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s.
--PD "TX_ENABLE_FIQ_NESTING SETL {TRUE}" This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s. In addition,
IRQ nesting should also be enabled.
-DTX_ENABLE_FIQ_SUPPORT This compiler define enables FIQ
interrupt handling in the ThreadX
- generic C source. This define
+ generic C source. This define
should also be used in conjunction
with the corresponding assembler
- define.
+ define.
-DTX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- -DTX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ -DTX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- -DTX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ -DTX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- -DTX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ -DTX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- -DTX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ -DTX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- -DTX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ -DTX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- -DTX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ -DTX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- -DTX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ -DTX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- -DTX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ -DTX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- -DTX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ -DTX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- -DTX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ -DTX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- -DTX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ -DTX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- -DTX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ -DTX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- -DTX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ -DTX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- -DTX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ -DTX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- -DTX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ -DTX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- -DTX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ -DTX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- -DTX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ -DTX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- -DTX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ -DTX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- -DTX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ -DTX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
-DTX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- -DTX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ -DTX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- -DTX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ -DTX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
5. Register Usage and Stack Frames
-The AC5 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The AC5 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -269,39 +269,39 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
-performance. To make it run faster, you can change the build_threadx.bat file to
-remove the -g option and enable all compiler optimizations.
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
+performance. To make it run faster, you can change the build_threadx.bat file to
+remove the -g option and enable all compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-R5
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-R5 vectors start at address zero. The demonstration system startup
-Init area contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+Init area contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -312,12 +312,12 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -325,7 +325,7 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -338,7 +338,7 @@ __tx_irq_processing_return
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.s:
EXPORT __tx_irq_example_handler
@@ -348,12 +348,12 @@ __tx_irq_example_handler
STMDB sp!, {r0-r3} ; Save some scratch registers
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other scratch registers
BL _tx_thread_vectored_context_save ; Call the vectored IRQ context save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -370,22 +370,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested IRQ interrupts are no longer required,
calling the _tx_thread_irq_nesting_end service disables nesting by disabling
-IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
+IRQ interrupts and switching back to IRQ mode in preparation for the IRQ
context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
EXPORT __tx_irq_handler
- EXPORT __tx_irq_processing_return
+ EXPORT __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -393,10 +393,10 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* Enable nested IRQ interrupts. NOTE: Since this service returns
-; with IRQ interrupts enabled, all IRQ interrupt sources must be
+; with IRQ interrupts enabled, all IRQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-;
+;
; /* Application ISR call(s) go here! */
;
; /* Disable nested IRQ interrupts. The mode is switched back to
@@ -409,12 +409,12 @@ __tx_irq_processing_return
7.3 FIQ Interrupts
-By default, Cortex-R5 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, Cortex-R5 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -423,7 +423,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.s.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.s:
@@ -451,18 +451,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.s. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -478,7 +478,7 @@ __tx_fiq_processing_return
; interrupt, and all C scratch registers are available for use. */
;
; /* Enable nested FIQ interrupts. NOTE: Since this service returns
-; with FIQ interrupts enabled, all FIQ interrupt sources must be
+; with FIQ interrupts enabled, all FIQ interrupt sources must be
; cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
;
@@ -494,22 +494,22 @@ __tx_fiq_processing_return
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.s in the Integrator sub-directories.
9. Thumb/Cortex-R5 Mixed Mode
-By default, ThreadX is setup for running in Cortex-R5 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
-ThreadX file and/or the application in Thumb mode. If any Thumb code
-is used the entire ThreadX source- both C and assembly - should be built
+By default, ThreadX is setup for running in Cortex-R5 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
+ThreadX file and/or the application in Thumb mode. If any Thumb code
+is used the entire ThreadX source- both C and assembly - should be built
with the "-apcs /interwork" option.
diff --git a/ports/cortex_r5/ac5/src/tx_thread_context_restore.s b/ports/cortex_r5/ac5/src/tx_thread_context_restore.s
index 15fbb1e9..1d070d89 100644
--- a/ports/cortex_r5/ac5/src/tx_thread_context_restore.s
+++ b/ports/cortex_r5/ac5/src/tx_thread_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -54,44 +54,38 @@ SVC_MODE EQU 0x93 ; SVC mode
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore Cortex-R5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore Cortex-R5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -121,13 +115,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3, #0] ; Store the counter
+ STR r2, [r3, #0] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -193,7 +187,7 @@ __tx_thread_preempt_restore
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
-
+
IF {TARGET_FPU_VFP} = {TRUE}
LDR r2, [r0, #144] ; Pickup the VFP enabled flag
CMP r2, #0 ; Is the VFP enabled?
diff --git a/ports/cortex_r5/ac5/src/tx_thread_context_save.s b/ports/cortex_r5/ac5/src/tx_thread_context_save.s
index 9d1b2d14..043fbdeb 100644
--- a/ports/cortex_r5/ac5/src/tx_thread_context_save.s
+++ b/ports/cortex_r5/ac5/src/tx_thread_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -39,43 +39,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save Cortex-R5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save Cortex-R5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
@@ -90,7 +84,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
IF :DEF:TX_ENABLE_FIQ_SUPPORT
CPSID if ; Disable FIQ interrupts
ENDIF
@@ -108,7 +102,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -124,7 +118,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -138,13 +132,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -164,7 +158,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -174,7 +168,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -189,7 +183,7 @@ __tx_thread_idle_system_save
ENDIF
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports/cortex_r5/ac5/src/tx_thread_fiq_context_restore.s b/ports/cortex_r5/ac5/src/tx_thread_fiq_context_restore.s
index 65a4be5a..f58456b9 100644
--- a/ports/cortex_r5/ac5/src/tx_thread_fiq_context_restore.s
+++ b/ports/cortex_r5/ac5/src/tx_thread_fiq_context_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -32,7 +32,7 @@
;
SVC_MODE EQU 0xD3 ; SVC mode
FIQ_MODE EQU 0xD1 ; FIQ mode
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
;
@@ -50,44 +50,38 @@ IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_restore Cortex-R5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_restore Cortex-R5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the fiq interrupt context when processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* FIQ ISR Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the fiq interrupt context when processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* FIQ ISR Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_context_restore(VOID)
@@ -113,13 +107,13 @@ _tx_thread_fiq_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -163,7 +157,7 @@ __tx_thread_fiq_no_preempt_restore
; /* Restore interrupted thread or ISR. */
;
; /* Pickup the saved stack pointer. */
-; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
+; tmp_ptr = _tx_thread_current_ptr -> tx_thread_stack_ptr;
;
; /* Recover the saved context and return to the point of interrupt. */
;
@@ -195,7 +189,7 @@ __tx_thread_fiq_preempt_restore
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1] ; Pickup current thread pointer
STR sp, [r0, #8] ; Save stack pointer in thread control
- ; block
+ ; block
;
; /* Save the remaining time-slice and disable it. */
; if (_tx_timer_time_slice)
@@ -207,7 +201,7 @@ __tx_thread_fiq_preempt_restore
BEQ __tx_thread_fiq_dont_save_ts ; No, don't save it
;
; _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-; _tx_timer_time_slice = 0;
+; _tx_timer_time_slice = 0;
;
STR r2, [r0, #24] ; Save thread's time-slice
MOV r2, #0 ; Clear value
diff --git a/ports/cortex_r5/ac5/src/tx_thread_fiq_context_save.s b/ports/cortex_r5/ac5/src/tx_thread_fiq_context_save.s
index bc99650a..67bc6290 100644
--- a/ports/cortex_r5/ac5/src/tx_thread_fiq_context_save.s
+++ b/ports/cortex_r5/ac5/src/tx_thread_fiq_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -39,43 +39,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_context_save Cortex-R5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_context_save Cortex-R5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
; VOID _tx_thread_fiq_context_save(VOID)
@@ -90,7 +84,7 @@ _tx_thread_fiq_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -105,7 +99,7 @@ _tx_thread_fiq_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -121,38 +115,38 @@ _tx_thread_fiq_context_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
__tx_thread_fiq_not_nested_save
-; }
+; }
;
; /* Otherwise, not nested, check to see if a thread was running. */
; else if (_tx_thread_current_ptr)
-; {
+; {
;
ADD r2, r2, #1 ; Increment the interrupt counter
STR r2, [r3] ; Store it back in the variable
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
-; ; scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save ; If so, interrupt occurred in
+; ; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, lr} ; Store other registers, Note that we don't
-; ; need to save sl and ip since FIQ has
-; ; copies of these registers. Nested
+; ; need to save sl and ip since FIQ has
+; ; copies of these registers. Nested
; ; interrupt processing does need to save
; ; these registers.
;
; /* Save the current stack pointer in the thread's control block. */
-; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+; _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
;
; /* Switch to the system stack. */
-; sp = _tx_thread_system_stack_ptr;
+; sp = _tx_thread_system_stack_ptr;
;
MOV r10, #0 ; Clear stack limit
@@ -165,7 +159,7 @@ __tx_thread_fiq_not_nested_save
POP {lr} ; Recover ISR lr
ENDIF
- B __tx_fiq_processing_return ; Continue FIQ processing
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
; else
@@ -185,18 +179,18 @@ __tx_thread_fiq_idle_system_save
ENDIF
;
; /* Not much to do here, save the current SPSR and LR for possible
-; use in IRQ interrupted in idle system conditions, and return to
+; use in IRQ interrupted in idle system conditions, and return to
; FIQ interrupt processing. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, lr} ; Store other registers that will get used
-; ; or stripped off the stack in context
-; ; restore
- B __tx_fiq_processing_return ; Continue FIQ processing
+; ; or stripped off the stack in context
+; ; restore
+ B __tx_fiq_processing_return ; Continue FIQ processing
;
; }
-;}
+;}
;
END
diff --git a/ports/cortex_r5/ac5/src/tx_thread_fiq_nesting_end.s b/ports/cortex_r5/ac5/src/tx_thread_fiq_nesting_end.s
index 89e58b50..091737b6 100644
--- a/ports/cortex_r5/ac5/src/tx_thread_fiq_nesting_end.s
+++ b/ports/cortex_r5/ac5/src/tx_thread_fiq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
FIQ_MODE_BITS EQU 0x11 ; FIQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_end Cortex-R5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_end Cortex-R5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-;/* processing from system mode back to FIQ mode prior to the ISR */
-;/* calling _tx_thread_fiq_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+;/* processing from system mode back to FIQ mode prior to the ISR */
+;/* calling _tx_thread_fiq_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_fiq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #FIQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/cortex_r5/ac5/src/tx_thread_fiq_nesting_start.s b/ports/cortex_r5/ac5/src/tx_thread_fiq_nesting_start.s
index 224966a7..d4b870ac 100644
--- a/ports/cortex_r5/ac5/src/tx_thread_fiq_nesting_start.s
+++ b/ports/cortex_r5/ac5/src/tx_thread_fiq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_fiq_nesting_start Cortex-R5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_fiq_nesting_start Cortex-R5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from FIQ mode after */
-;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-;/* processing to the system mode so nested FIQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with FIQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from FIQ mode after */
+;/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+;/* processing to the system mode so nested FIQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with FIQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/cortex_r5/ac5/src/tx_thread_interrupt_control.s b/ports/cortex_r5/ac5/src/tx_thread_interrupt_control.s
index 2a3698d7..97dbf4f7 100644
--- a/ports/cortex_r5/ac5/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_r5/ac5/src/tx_thread_interrupt_control.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -36,42 +36,36 @@ INT_MASK EQU 0x80 ; Interrupt bit mask
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control Cortex-R5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control Cortex-R5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/cortex_r5/ac5/src/tx_thread_interrupt_disable.s b/ports/cortex_r5/ac5/src/tx_thread_interrupt_disable.s
index 7af79f59..bf80f986 100644
--- a/ports/cortex_r5/ac5/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_r5/ac5/src/tx_thread_interrupt_disable.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -29,41 +29,35 @@
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable Cortex-R5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable Cortex-R5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(void)
@@ -80,7 +74,7 @@ _tx_thread_interrupt_disable
IF :DEF:TX_ENABLE_FIQ_SUPPORT
CPSID if ; Disable IRQ and FIQ
ELSE
- CPSID i ; Disable IRQ
+ CPSID i ; Disable IRQ
ENDIF
IF {INTER} = {TRUE}
diff --git a/ports/cortex_r5/ac5/src/tx_thread_interrupt_restore.s b/ports/cortex_r5/ac5/src/tx_thread_interrupt_restore.s
index 61ebae01..9e1bafaf 100644
--- a/ports/cortex_r5/ac5/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_r5/ac5/src/tx_thread_interrupt_restore.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -29,42 +29,36 @@
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore Cortex-R5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore Cortex-R5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function is responsible for restoring interrupts to the state */
;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/cortex_r5/ac5/src/tx_thread_irq_nesting_end.s b/ports/cortex_r5/ac5/src/tx_thread_irq_nesting_end.s
index 5b85a17f..00f1f123 100644
--- a/ports/cortex_r5/ac5/src/tx_thread_irq_nesting_end.s
+++ b/ports/cortex_r5/ac5/src/tx_thread_irq_nesting_end.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -34,56 +34,50 @@ DISABLE_INTS EQU 0xC0 ; Disable IRQ & FIQ interrupts
ELSE
DISABLE_INTS EQU 0x80 ; Disable IRQ interrupts
ENDIF
-MODE_MASK EQU 0x1F ; Mode mask
+MODE_MASK EQU 0x1F ; Mode mask
IRQ_MODE_BITS EQU 0x12 ; IRQ mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end Cortex-R5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end Cortex-R5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
@@ -94,7 +88,7 @@ _tx_thread_irq_nesting_end
MRS r0, CPSR ; Pickup the CPSR
ORR r0, r0, #DISABLE_INTS ; Build disable interrupt value
MSR CPSR_c, r0 ; Disable interrupts
- LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} ; Pickup saved lr (and r1 throw-away for
; 8-byte alignment logic)
BIC r0, r0, #MODE_MASK ; Clear mode bits
ORR r0, r0, #IRQ_MODE_BITS ; Build IRQ mode CPSR
diff --git a/ports/cortex_r5/ac5/src/tx_thread_irq_nesting_start.s b/ports/cortex_r5/ac5/src/tx_thread_irq_nesting_start.s
index f46318ae..819449cc 100644
--- a/ports/cortex_r5/ac5/src/tx_thread_irq_nesting_start.s
+++ b/ports/cortex_r5/ac5/src/tx_thread_irq_nesting_start.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -35,48 +35,42 @@ SYS_MODE_BITS EQU 0x1F ; System mode bits
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start Cortex-R5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start Cortex-R5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/cortex_r5/ac5/src/tx_thread_schedule.s b/ports/cortex_r5/ac5/src/tx_thread_schedule.s
index 0144fb47..b50d0614 100644
--- a/ports/cortex_r5/ac5/src/tx_thread_schedule.s
+++ b/ports/cortex_r5/ac5/src/tx_thread_schedule.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -40,45 +40,39 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule Cortex-R5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule Cortex-R5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
@@ -107,7 +101,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -120,7 +114,7 @@ __tx_thread_schedule_loop
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
;
- LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
STR r0, [r1, #0] ; Setup current thread pointer
;
; /* Increment the run count for this thread. */
@@ -134,7 +128,7 @@ __tx_thread_schedule_loop
; /* Setup time-slice, if present. */
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
;
- LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
+ LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
; variable
LDR sp, [r0, #8] ; Switch stack pointers
STR r3, [r2, #0] ; Setup time-slice
diff --git a/ports/cortex_r5/ac5/src/tx_thread_stack_build.s b/ports/cortex_r5/ac5/src/tx_thread_stack_build.s
index af6a3657..899e6ade 100644
--- a/ports/cortex_r5/ac5/src/tx_thread_stack_build.s
+++ b/ports/cortex_r5/ac5/src/tx_thread_stack_build.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -41,44 +41,38 @@ THUMB_BIT EQU 0x20 ; Thumb-bit
;
;
AREA ||.text||, CODE, READONLY
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build Cortex-R5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build Cortex-R5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
+;/* */
;/* This function builds a stack frame on the supplied thread's stack. */
;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
;/* thread_ptr Pointer to thread control blk */
;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -86,10 +80,10 @@ THUMB_BIT EQU 0x20 ; Thumb-bit
EXPORT _tx_thread_stack_build
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-R5 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports/cortex_r5/ac5/src/tx_thread_system_return.s b/ports/cortex_r5/ac5/src/tx_thread_system_return.s
index 69ed81f1..ac35c95f 100644
--- a/ports/cortex_r5/ac5/src/tx_thread_system_return.s
+++ b/ports/cortex_r5/ac5/src/tx_thread_system_return.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -33,50 +33,44 @@
IMPORT _tx_timer_time_slice
IMPORT _tx_thread_schedule
IF :DEF:TX_ENABLE_EXECUTION_CHANGE_NOTIFY
- IMPORT _tx_execution_thread_exit
+ IMPORT _tx_execution_thread_exit
ENDIF
;
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return Cortex-R5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return Cortex-R5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
@@ -110,7 +104,7 @@ _tx_skip_solicited_vfp_save
MOV r0, #0 ; Build a solicited stack type
STMDB sp!, {r0-r1} ; Save type and CPSR
-;
+;
;
IF :DEF:TX_ENABLE_EXECUTION_CHANGE_NOTIFY
;
diff --git a/ports/cortex_r5/ac5/src/tx_thread_vectored_context_save.s b/ports/cortex_r5/ac5/src/tx_thread_vectored_context_save.s
index c1dad6a9..b1918801 100644
--- a/ports/cortex_r5/ac5/src/tx_thread_vectored_context_save.s
+++ b/ports/cortex_r5/ac5/src/tx_thread_vectored_context_save.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Thread */
;/** */
@@ -38,43 +38,37 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save Cortex-R5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save Cortex-R5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_vectored_context_save(VOID)
@@ -107,7 +101,7 @@ _tx_thread_vectored_context_save
; /* Return to the ISR. */
;
MOV r10, #0 ; Clear stack limit
-
+
IF :DEF:TX_ENABLE_EXECUTION_CHANGE_NOTIFY
;
; /* Call the ISR enter function to indicate an ISR is executing. */
@@ -135,7 +129,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occurred in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -171,7 +165,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports/cortex_r5/ac5/src/tx_timer_interrupt.s b/ports/cortex_r5/ac5/src/tx_timer_interrupt.s
index f2408e30..89bc535c 100644
--- a/ports/cortex_r5/ac5/src/tx_timer_interrupt.s
+++ b/ports/cortex_r5/ac5/src/tx_timer_interrupt.s
@@ -1,18 +1,18 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
;/**************************************************************************/
;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
+;/** */
+;/** ThreadX Component */
;/** */
;/** Timer */
;/** */
@@ -44,46 +44,40 @@
;
AREA ||.text||, CODE, READONLY
PRESERVE8
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt Cortex-R5/AC5 */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt Cortex-R5/AC5 */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -107,7 +101,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -225,13 +219,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports/cortex_r5/ac6/example_build/sample_threadx/.cproject b/ports/cortex_r5/ac6/example_build/sample_threadx/.cproject
index bcac3d15..01a0335e 100644
--- a/ports/cortex_r5/ac6/example_build/sample_threadx/.cproject
+++ b/ports/cortex_r5/ac6/example_build/sample_threadx/.cproject
@@ -1,170 +1,170 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_r5/ac6/example_build/sample_threadx/sample_threadx.c b/ports/cortex_r5/ac6/example_build/sample_threadx/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/cortex_r5/ac6/example_build/sample_threadx/sample_threadx.c
+++ b/ports/cortex_r5/ac6/example_build/sample_threadx/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_r5/ac6/example_build/sample_threadx/sample_threadx.scat b/ports/cortex_r5/ac6/example_build/sample_threadx/sample_threadx.scat
index c13f39f8..4b7265d3 100644
--- a/ports/cortex_r5/ac6/example_build/sample_threadx/sample_threadx.scat
+++ b/ports/cortex_r5/ac6/example_build/sample_threadx/sample_threadx.scat
@@ -1,7 +1,7 @@
;*******************************************************
; Copyright (c) 2011-2017 Arm Limited (or its affiliates). All rights reserved.
; Use, modification and redistribution of this file is subject to your possession of a
-; valid End User License Agreement for the Arm Product of which these examples are part of
+; valid End User License Agreement for the Arm Product of which these examples are part of
; and your compliance with all applicable terms and conditions of such licence agreement.
;*******************************************************
diff --git a/ports/cortex_r5/ac6/example_build/sample_threadx/startup.S b/ports/cortex_r5/ac6/example_build/sample_threadx/startup.S
index 584f08a1..e67cfc98 100644
--- a/ports/cortex_r5/ac6/example_build/sample_threadx/startup.S
+++ b/ports/cortex_r5/ac6/example_build/sample_threadx/startup.S
@@ -3,7 +3,7 @@
//
// Copyright (c) 2006-2018 Arm Limited (or its affiliates). All rights reserved.
// Use, modification and redistribution of this file is subject to your possession of a
-// valid End User License Agreement for the Arm Product of which these examples are part of
+// valid End User License Agreement for the Arm Product of which these examples are part of
// and your compliance with all applicable terms and conditions of such licence agreement.
//----------------------------------------------------------------
@@ -310,7 +310,7 @@ regions_done:
// Enable Branch prediction
//----------------------------------------------------------------
-// In the Cortex-R5, the Z-bit of the SCTLR does not control the program flow prediction.
+// In the Cortex-R5, the Z-bit of the SCTLR does not control the program flow prediction.
// Some control bits in the ACTLR control the program flow and prefetch features instead.
// These are enabled by default, but are shown here for completeness.
diff --git a/ports/cortex_r5/ac6/example_build/sample_threadx/tx_initialize_low_level.S b/ports/cortex_r5/ac6/example_build/sample_threadx/tx_initialize_low_level.S
index 1f80ff96..3913a0cb 100644
--- a/ports/cortex_r5/ac6/example_build/sample_threadx/tx_initialize_low_level.S
+++ b/ports/cortex_r5/ac6/example_build/sample_threadx/tx_initialize_low_level.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Initialize */
@/** */
@@ -59,7 +59,7 @@ SYS_STACK_SIZE = 1024 @ System stack size
.type $_tx_initialize_low_level,function
$_tx_initialize_low_level:
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_initialize_low_level @ Call _tx_initialize_low_level function
@@ -69,45 +69,39 @@ $_tx_initialize_low_level:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_initialize_low_level Cortex-R5/AC6 */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_initialize_low_level Cortex-R5/AC6 */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is responsible for any low-level processor */
-@/* initialization, including setting up interrupt vectors, setting */
-@/* up a periodic timer interrupt source, saving the system stack */
-@/* pointer for use in ISR processing later, and finding the first */
-@/* available RAM memory address for tx_application_define. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* _tx_initialize_kernel_enter ThreadX entry function */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is responsible for any low-level processor */
+@/* initialization, including setting up interrupt vectors, setting */
+@/* up a periodic timer interrupt source, saving the system stack */
+@/* pointer for use in ISR processing later, and finding the first */
+@/* available RAM memory address for tx_application_define. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* _tx_initialize_kernel_enter ThreadX entry function */
@/* */
@/**************************************************************************/
@VOID _tx_initialize_low_level(VOID)
@@ -122,7 +116,7 @@ _tx_initialize_low_level:
@
LDR r1, =Image$$ARM_LIB_STACKHEAP$$ZI$$Limit @ Get pointer to stack area
-#ifdef TX_ENABLE_IRQ_NESTING
+#ifdef TX_ENABLE_IRQ_NESTING
@
@ /* Setup the system mode stack for nested interrupt support */
@
@@ -153,7 +147,7 @@ _tx_initialize_low_level:
MSR CPSR, r0 @ Enter SVC mode
LDR r2, =Image$$ARM_LIB_STACKHEAP$$Base @ Pickup stack bottom
CMP r3, r2 @ Compare the current stack end with the bottom
-_stack_error_loop:
+_stack_error_loop:
BLT _stack_error_loop @ If the IRQ stack exceeds the stack bottom, just sit here!
@
@ /* Save the system stack pointer. */
@@ -214,17 +208,17 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. In
+@ interrupt, and all C scratch registers are available for use. In
@ addition, IRQ interrupts may be re-enabled - with certain restrictions -
@ if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-@ small code sequences where lr is saved before enabling interrupts and
+@ small code sequences where lr is saved before enabling interrupts and
@ restored after interrupts are again disabled. */
@
-@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
@ from IRQ mode with interrupts disabled. This routine switches to the
-@ system mode and returns with IRQ interrupts enabled.
-@
-@ NOTE: It is very important to ensure all IRQ interrupts are cleared
+@ system mode and returns with IRQ interrupts enabled.
+@
+@ NOTE: It is very important to ensure all IRQ interrupts are cleared
@ prior to enabling nested IRQ interrupts. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -238,7 +232,7 @@ __tx_irq_processing_return:
@
@
@ /* If interrupt nesting was started earlier, the end of interrupt nesting
-@ service must be called before returning to _tx_thread_context_restore.
+@ service must be called before returning to _tx_thread_context_restore.
@ This routine returns in processing in IRQ mode with interrupts disabled. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -254,28 +248,28 @@ __tx_irq_processing_return:
@__tx_example_vectored_irq_handler:
@
@
-@ /* Save initial context and call context save to prepare for
+@ /* Save initial context and call context save to prepare for
@ vectored ISR execution. */
@
@ STMDB sp!, {r0-r3} @ Save some scratch registers
@ MRS r0, SPSR @ Pickup saved SPSR
-@ SUB lr, lr, #4 @ Adjust point of interrupt
+@ SUB lr, lr, #4 @ Adjust point of interrupt
@ STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
@ BL _tx_thread_vectored_context_save @ Vectored context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. In
+@ interrupt, and all C scratch registers are available for use. In
@ addition, IRQ interrupts may be re-enabled - with certain restrictions -
@ if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-@ small code sequences where lr is saved before enabling interrupts and
+@ small code sequences where lr is saved before enabling interrupts and
@ restored after interrupts are again disabled. */
@
@
-@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
@ from IRQ mode with interrupts disabled. This routine switches to the
-@ system mode and returns with IRQ interrupts enabled.
-@
-@ NOTE: It is very important to ensure all IRQ interrupts are cleared
+@ system mode and returns with IRQ interrupts enabled.
+@
+@ NOTE: It is very important to ensure all IRQ interrupts are cleared
@ prior to enabling nested IRQ interrupts. */
@#ifdef TX_ENABLE_IRQ_NESTING
@ BL _tx_thread_irq_nesting_start
@@ -284,7 +278,7 @@ __tx_irq_processing_return:
@ /* Application IRQ handlers can be called here! */
@
@ /* If interrupt nesting was started earlier, the end of interrupt nesting
-@ service must be called before returning to _tx_thread_context_restore.
+@ service must be called before returning to _tx_thread_context_restore.
@ This routine returns in processing in IRQ mode with interrupts disabled. */
@#ifdef TX_ENABLE_IRQ_NESTING
@ BL _tx_thread_irq_nesting_end
@@ -306,11 +300,11 @@ __tx_fiq_processing_return:
@ /* At this point execution is still in the FIQ mode. The CPSR, point of
@ interrupt, and all C scratch registers are available for use. */
@
-@ /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+@ /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
@ from FIQ mode with interrupts disabled. This routine switches to the
-@ system mode and returns with FIQ interrupts enabled.
+@ system mode and returns with FIQ interrupts enabled.
@
-@ NOTE: It is very important to ensure all FIQ interrupts are cleared
+@ NOTE: It is very important to ensure all FIQ interrupts are cleared
@ prior to enabling nested FIQ interrupts. */
#ifdef TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/cortex_r5/ac6/example_build/tx/.cproject b/ports/cortex_r5/ac6/example_build/tx/.cproject
index aa051b97..63d5638f 100644
--- a/ports/cortex_r5/ac6/example_build/tx/.cproject
+++ b/ports/cortex_r5/ac6/example_build/tx/.cproject
@@ -1,150 +1,150 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ports/cortex_r5/ac6/inc/tx_port.h b/ports/cortex_r5/ac6/inc/tx_port.h
index 6ac1ade7..360e3178 100644
--- a/ports/cortex_r5/ac6/inc/tx_port.h
+++ b/ports/cortex_r5/ac6/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-R5/AC6 */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-R5/AC6 */
/* 6.1.12 */
/* */
/* AUTHOR */
@@ -32,27 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -65,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -78,7 +67,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -114,12 +103,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -129,8 +118,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -177,7 +166,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -189,13 +178,13 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
-#define TX_THREAD_EXTENSION_2
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -209,11 +198,11 @@ typedef unsigned short USHORT;
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -221,8 +210,8 @@ typedef unsigned short USHORT;
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -249,24 +238,24 @@ typedef unsigned short USHORT;
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
-
+
#if __TARGET_ARCH_ARM > 4
#ifndef __thumb__
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
asm volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) ); \
- b = 31 - b;
+ b = 31 - b;
#endif
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -310,8 +299,8 @@ unsigned int _tx_thread_interrupt_restore(UINT old_posture);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-R5/AC6 Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-R5/AC6 Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_r5/ac6/readme_threadx.txt b/ports/cortex_r5/ac6/readme_threadx.txt
index f2b1b0a4..1efd85af 100644
--- a/ports/cortex_r5/ac6/readme_threadx.txt
+++ b/ports/cortex_r5/ac6/readme_threadx.txt
@@ -1,18 +1,18 @@
- Microsoft's Azure RTOS ThreadX for Cortex-R5
+ Microsoft's Azure RTOS ThreadX for Cortex-R5
Using ARM Compiler 6 & DS
1. Import the ThreadX Projects
-In order to build the ThreadX library and the ThreadX demonstration, first import
-the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
+In order to build the ThreadX library and the ThreadX demonstration, first import
+the 'tx' and 'sample_threadx' projects (located in the "example_build" directory)
into your DS workspace.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply right-click the Eclipse project
-"tx" and then select the "Build Project" button. You should now observe the compilation
+Building the ThreadX library is easy; simply right-click the Eclipse project
+"tx" and then select the "Build Project" button. You should now observe the compilation
and assembly of the ThreadX library. This project build produces the ThreadX
library file tx.a.
@@ -22,44 +22,44 @@ library file tx.a.
The ThreadX demonstration is designed to execute under the DS debugger on the
VE_Cortex-R5 Bare Metal simulator.
-Building the demonstration is easy; simply right-click the Eclipse project
-"sample_threadx" and then select the "Build Project" button. You should now observe
-the compilation and assembly of the ThreadX demonstration. This project build produces
-the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
+Building the demonstration is easy; simply right-click the Eclipse project
+"sample_threadx" and then select the "Build Project" button. You should now observe
+the compilation and assembly of the ThreadX demonstration. This project build produces
+the ThreadX library file sample_threadx.axf. Next, expand the demo ThreadX project folder
in the Project Explorer window, right-click on the 'cortex-r5_tx.launch' file, click
'Debug As', and then click 'cortex-r5_tx' from the submenu. This will cause the
-debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
+debugger to load the sample_threadx.axf ELF file and run to main. You are now ready
to execute the ThreadX demonstration.
4. System Initialization
-The entry point in ThreadX for the Cortex-R5 using ARM tools is at label
-"Vectors". This is defined within startup.S in the sample_threadx project. In addition,
-this is where all static and global pre-set C variable initialization processing
+The entry point in ThreadX for the Cortex-R5 using ARM tools is at label
+"Vectors". This is defined within startup.S in the sample_threadx project. In addition,
+this is where all static and global pre-set C variable initialization processing
takes place.
-This is also where initialization of a periodic timer interrupt source should take
+This is also where initialization of a periodic timer interrupt source should take
place.
-In addition, _tx_initialize_low_level defines the first available address
-for use by the application, which is supplied as the sole input parameter
+In addition, _tx_initialize_low_level defines the first available address
+for use by the application, which is supplied as the sole input parameter
to your application definition function, tx_application_define.
5. Register Usage and Stack Frames
-The AC6 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The AC6 compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -77,52 +77,52 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-R5
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-R5 vectors start at address zero. The demonstration system startup
-reset.S file contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+reset.S file contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
-ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
+ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
nested IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.S:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -130,7 +130,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -143,7 +143,7 @@ __tx_irq_processing_return:
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.S:
.global __tx_irq_example_handler
@@ -153,12 +153,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} @ Save some scratch registers
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
BL _tx_thread_vectored_context_save @ Call the vectored IRQ context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -175,22 +175,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -198,10 +198,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* Enable nested IRQ interrupts. NOTE: Since this service returns
-@ with IRQ interrupts enabled, all IRQ interrupt sources must be
+@ with IRQ interrupts enabled, all IRQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-@
+@
@ /* Application ISR call(s) go here! */
@
@ /* Disable nested IRQ interrupts. The mode is switched back to
@@ -214,12 +214,12 @@ __tx_irq_processing_return:
7.3 FIQ Interrupts
-By default, FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.S.
@@ -228,7 +228,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.S.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.S:
@@ -256,18 +256,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.S. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -283,7 +283,7 @@ __tx_fiq_processing_return:
@ interrupt, and all C scratch registers are available for use. */
@
@ /* Enable nested FIQ interrupts. NOTE: Since this service returns
-@ with FIQ interrupts enabled, all FIQ interrupt sources must be
+@ with FIQ interrupts enabled, all FIQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@
@@ -299,12 +299,12 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
-interrupt source, these services are not functional but the remainder of
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
+interrupt source, these services are not functional but the remainder of
ThreadX will still run.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.S for the demonstration system.
diff --git a/ports/cortex_r5/ac6/src/tx_thread_context_restore.S b/ports/cortex_r5/ac6/src/tx_thread_context_restore.S
index 198d4ad1..da9ae44f 100644
--- a/ports/cortex_r5/ac6/src/tx_thread_context_restore.S
+++ b/ports/cortex_r5/ac6/src/tx_thread_context_restore.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -49,48 +49,42 @@ IRQ_MODE = 0x92 @ Disable IRQ, IRQ mode
@
@/* No 16-bit Thumb mode veneer code is needed for _tx_thread_context_restore
@ since it will never be called 16-bit mode. */
-@
+@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_context_restore Cortex-R5/AC6 */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_context_restore Cortex-R5/AC6 */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function restores the interrupt context if it is processing a */
-@/* nested interrupt. If not, it returns to the interrupt thread if no */
-@/* preemption is necessary. Otherwise, if preemption is necessary or */
-@/* if no thread was running, the function returns to the scheduler. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_schedule Thread scheduling routine */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs Interrupt Service Routines */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function restores the interrupt context if it is processing a */
+@/* nested interrupt. If not, it returns to the interrupt thread if no */
+@/* preemption is necessary. Otherwise, if preemption is necessary or */
+@/* if no thread was running, the function returns to the scheduler. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_schedule Thread scheduling routine */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs Interrupt Service Routines */
@/* */
@/**************************************************************************/
@VOID _tx_thread_context_restore(VOID)
@@ -121,13 +115,13 @@ _tx_thread_context_restore:
LDR r3, =_tx_thread_system_state @ Pickup address of system state variable
LDR r2, [r3] @ Pickup system state
SUB r2, r2, #1 @ Decrement the counter
- STR r2, [r3] @ Store the counter
+ STR r2, [r3] @ Store the counter
CMP r2, #0 @ Was this the first interrupt?
BEQ __tx_thread_not_nested_restore @ If so, not a nested restore
@
@ /* Interrupts are nested. */
@
-@ /* Just recover the saved registers and return to the point of
+@ /* Just recover the saved registers and return to the point of
@ interrupt. */
@
LDMIA sp!, {r0, r10, r12, lr} @ Recover SPSR, POI, and scratch regs
diff --git a/ports/cortex_r5/ac6/src/tx_thread_context_save.S b/ports/cortex_r5/ac6/src/tx_thread_context_save.S
index 26440a92..f0324d69 100644
--- a/ports/cortex_r5/ac6/src/tx_thread_context_save.S
+++ b/ports/cortex_r5/ac6/src/tx_thread_context_save.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -37,47 +37,41 @@
@
@/* No 16-bit Thumb mode veneer code is needed for _tx_thread_context_save
@ since it will never be called 16-bit mode. */
-@
+@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_context_save Cortex-R5/AC6 */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_context_save Cortex-R5/AC6 */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function saves the context of an executing thread in the */
-@/* beginning of interrupt processing. The function also ensures that */
-@/* the system stack is used upon return to the calling ISR. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function saves the context of an executing thread in the */
+@/* beginning of interrupt processing. The function also ensures that */
+@/* the system stack is used upon return to the calling ISR. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_context_save(VOID)
@@ -93,7 +87,7 @@ _tx_thread_context_save:
@ if (_tx_thread_system_state++)
@ {
@
- STMDB sp!, {r0-r3} @ Save some working registers
+ STMDB sp!, {r0-r3} @ Save some working registers
#ifdef TX_ENABLE_FIQ_SUPPORT
CPSID if @ Disable FIQ interrupts
#endif
@@ -111,7 +105,7 @@ _tx_thread_context_save:
@ calling ISR. */
@
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other registers
@
@ /* Return to the ISR. */
@@ -127,7 +121,7 @@ _tx_thread_context_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_irq_processing_return @ Continue IRQ processing
+ B __tx_irq_processing_return @ Continue IRQ processing
@
__tx_thread_not_nested_save:
@ }
@@ -141,13 +135,13 @@ __tx_thread_not_nested_save:
LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread ptr
LDR r0, [r1] @ Pickup current thread pointer
CMP r0, #0 @ Is it NULL?
- BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
@ scheduling loop - nothing needs saving!
@
@ /* Save minimal context of interrupted thread. */
@
MRS r2, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} @ Store other registers
@
@ /* Save the current stack pointer in the thread's control block. */
@@ -167,7 +161,7 @@ __tx_thread_not_nested_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_irq_processing_return @ Continue IRQ processing
+ B __tx_irq_processing_return @ Continue IRQ processing
@
@ }
@ else
@@ -177,7 +171,7 @@ __tx_thread_idle_system_save:
@
@ /* Interrupt occurred in the scheduling loop. */
@
-@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
+@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
@ processing. */
@
MOV r10, #0 @ Clear stack limit
@@ -192,7 +186,7 @@ __tx_thread_idle_system_save:
#endif
ADD sp, sp, #16 @ Recover saved registers
- B __tx_irq_processing_return @ Continue IRQ processing
+ B __tx_irq_processing_return @ Continue IRQ processing
@
@ }
@}
diff --git a/ports/cortex_r5/ac6/src/tx_thread_fiq_context_restore.S b/ports/cortex_r5/ac6/src/tx_thread_fiq_context_restore.S
index 8a46e22c..51fe146b 100644
--- a/ports/cortex_r5/ac6/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_r5/ac6/src/tx_thread_fiq_context_restore.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -32,7 +32,7 @@
@
SVC_MODE = 0xD3 @ SVC mode
FIQ_MODE = 0xD1 @ FIQ mode
-MODE_MASK = 0x1F @ Mode mask
+MODE_MASK = 0x1F @ Mode mask
THUMB_MASK = 0x20 @ Thumb bit mask
IRQ_MODE_BITS = 0x12 @ IRQ mode bits
@
@@ -52,44 +52,38 @@ IRQ_MODE_BITS = 0x12 @ IRQ mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_context_restore Cortex-R5/AC6 */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_context_restore Cortex-R5/AC6 */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function restores the fiq interrupt context when processing a */
-@/* nested interrupt. If not, it returns to the interrupt thread if no */
-@/* preemption is necessary. Otherwise, if preemption is necessary or */
-@/* if no thread was running, the function returns to the scheduler. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_schedule Thread scheduling routine */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* FIQ ISR Interrupt Service Routines */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function restores the fiq interrupt context when processing a */
+@/* nested interrupt. If not, it returns to the interrupt thread if no */
+@/* preemption is necessary. Otherwise, if preemption is necessary or */
+@/* if no thread was running, the function returns to the scheduler. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_schedule Thread scheduling routine */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* FIQ ISR Interrupt Service Routines */
@/* */
@/**************************************************************************/
@VOID _tx_thread_fiq_context_restore(VOID)
@@ -116,13 +110,13 @@ _tx_thread_fiq_context_restore:
LDR r3, =_tx_thread_system_state @ Pickup address of system state variable
LDR r2, [r3] @ Pickup system state
SUB r2, r2, #1 @ Decrement the counter
- STR r2, [r3] @ Store the counter
+ STR r2, [r3] @ Store the counter
CMP r2, #0 @ Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore @ If so, not a nested restore
@
@ /* Interrupts are nested. */
@
-@ /* Just recover the saved registers and return to the point of
+@ /* Just recover the saved registers and return to the point of
@ interrupt. */
@
LDMIA sp!, {r0, r10, r12, lr} @ Recover SPSR, POI, and scratch regs
@@ -210,7 +204,7 @@ __tx_thread_fiq_preempt_restore:
BEQ __tx_thread_fiq_dont_save_ts @ No, don't save it
@
@ _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-@ _tx_timer_time_slice = 0;
+@ _tx_timer_time_slice = 0;
@
STR r2, [r0, #24] @ Save thread's time-slice
MOV r2, #0 @ Clear value
diff --git a/ports/cortex_r5/ac6/src/tx_thread_fiq_context_save.S b/ports/cortex_r5/ac6/src/tx_thread_fiq_context_save.S
index a898aa07..15303740 100644
--- a/ports/cortex_r5/ac6/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_r5/ac6/src/tx_thread_fiq_context_save.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -40,43 +40,37 @@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_context_save Cortex-R5/AC6 */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_context_save Cortex-R5/AC6 */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function saves the context of an executing thread in the */
-@/* beginning of interrupt processing. The function also ensures that */
-@/* the system stack is used upon return to the calling ISR. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function saves the context of an executing thread in the */
+@/* beginning of interrupt processing. The function also ensures that */
+@/* the system stack is used upon return to the calling ISR. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@ VOID _tx_thread_fiq_context_save(VOID)
@@ -92,7 +86,7 @@ _tx_thread_fiq_context_save:
@ if (_tx_thread_system_state++)
@ {
@
- STMDB sp!, {r0-r3} @ Save some working registers
+ STMDB sp!, {r0-r3} @ Save some working registers
LDR r3, =_tx_thread_system_state @ Pickup address of system state variable
LDR r2, [r3] @ Pickup system state
CMP r2, #0 @ Is this the first interrupt?
@@ -107,7 +101,7 @@ _tx_thread_fiq_context_save:
@ calling ISR. */
@
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other registers
@
@ /* Return to the ISR. */
@@ -123,38 +117,38 @@ _tx_thread_fiq_context_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_fiq_processing_return @ Continue FIQ processing
+ B __tx_fiq_processing_return @ Continue FIQ processing
@
__tx_thread_fiq_not_nested_save:
-@ }
+@ }
@
@ /* Otherwise, not nested, check to see if a thread was running. */
@ else if (_tx_thread_current_ptr)
-@ {
+@ {
@
ADD r2, r2, #1 @ Increment the interrupt counter
STR r2, [r3] @ Store it back in the variable
LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread ptr
LDR r0, [r1] @ Pickup current thread pointer
CMP r0, #0 @ Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save @ If so, interrupt occurred in
-@ @ scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save @ If so, interrupt occurred in
+@ @ scheduling loop - nothing needs saving!
@
@ /* Save minimal context of interrupted thread. */
@
MRS r2, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r2, lr} @ Store other registers, Note that we don't
-@ @ need to save sl and ip since FIQ has
-@ @ copies of these registers. Nested
+@ @ need to save sl and ip since FIQ has
+@ @ copies of these registers. Nested
@ @ interrupt processing does need to save
@ @ these registers.
@
@ /* Save the current stack pointer in the thread's control block. */
-@ _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+@ _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
@
@ /* Switch to the system stack. */
-@ sp = _tx_thread_system_stack_ptr;
+@ sp = _tx_thread_system_stack_ptr;
@
MOV r10, #0 @ Clear stack limit
@@ -167,7 +161,7 @@ __tx_thread_fiq_not_nested_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_fiq_processing_return @ Continue FIQ processing
+ B __tx_fiq_processing_return @ Continue FIQ processing
@
@ }
@ else
@@ -187,16 +181,16 @@ __tx_thread_fiq_idle_system_save:
#endif
@
@ /* Not much to do here, save the current SPSR and LR for possible
-@ use in IRQ interrupted in idle system conditions, and return to
+@ use in IRQ interrupted in idle system conditions, and return to
@ FIQ interrupt processing. */
@
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, lr} @ Store other registers that will get used
-@ @ or stripped off the stack in context
-@ @ restore
- B __tx_fiq_processing_return @ Continue FIQ processing
+@ @ or stripped off the stack in context
+@ @ restore
+ B __tx_fiq_processing_return @ Continue FIQ processing
@
@ }
-@}
+@}
diff --git a/ports/cortex_r5/ac6/src/tx_thread_fiq_nesting_end.S b/ports/cortex_r5/ac6/src/tx_thread_fiq_nesting_end.S
index d9d3d30b..9d61bf40 100644
--- a/ports/cortex_r5/ac6/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_r5/ac6/src/tx_thread_fiq_nesting_end.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -34,7 +34,7 @@ DISABLE_INTS = 0xC0 @ Disable IRQ/FIQ interrupts
#else
DISABLE_INTS = 0x80 @ Disable IRQ interrupts
#endif
-MODE_MASK = 0x1F @ Mode mask
+MODE_MASK = 0x1F @ Mode mask
FIQ_MODE_BITS = 0x11 @ FIQ mode bits
@
@
@@ -44,51 +44,45 @@ FIQ_MODE_BITS = 0x11 @ FIQ mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_nesting_end Cortex-R5/AC6 */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_nesting_end Cortex-R5/AC6 */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from FIQ mode after */
-@/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-@/* processing from system mode back to FIQ mode prior to the ISR */
-@/* calling _tx_thread_fiq_context_restore. Note that this function */
-@/* assumes the system stack pointer is in the same position after */
-@/* nesting start function was called. */
-@/* */
-@/* This function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with FIQ interrupts disabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is called by the application from FIQ mode after */
+@/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+@/* processing from system mode back to FIQ mode prior to the ISR */
+@/* calling _tx_thread_fiq_context_restore. Note that this function */
+@/* assumes the system stack pointer is in the same position after */
+@/* nesting start function was called. */
+@/* */
+@/* This function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with FIQ interrupts disabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_fiq_nesting_end(VOID)
@@ -100,7 +94,7 @@ _tx_thread_fiq_nesting_end:
MRS r0, CPSR @ Pickup the CPSR
ORR r0, r0, #DISABLE_INTS @ Build disable interrupt value
MSR CPSR_c, r0 @ Disable interrupts
- LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
@ 8-byte alignment logic)
BIC r0, r0, #MODE_MASK @ Clear mode bits
ORR r0, r0, #FIQ_MODE_BITS @ Build IRQ mode CPSR
diff --git a/ports/cortex_r5/ac6/src/tx_thread_fiq_nesting_start.S b/ports/cortex_r5/ac6/src/tx_thread_fiq_nesting_start.S
index c3045e8c..54d16410 100644
--- a/ports/cortex_r5/ac6/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_r5/ac6/src/tx_thread_fiq_nesting_start.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -40,48 +40,42 @@ SYS_MODE_BITS = 0x1F @ System mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_nesting_start Cortex-R5/AC6 */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_nesting_start Cortex-R5/AC6 */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from FIQ mode after */
-@/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-@/* processing to the system mode so nested FIQ interrupt processing */
-@/* is possible (system mode has its own "lr" register). Note that */
-@/* this function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with FIQ interrupts enabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is called by the application from FIQ mode after */
+@/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+@/* processing to the system mode so nested FIQ interrupt processing */
+@/* is possible (system mode has its own "lr" register). Note that */
+@/* this function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with FIQ interrupts enabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/cortex_r5/ac6/src/tx_thread_interrupt_control.S b/ports/cortex_r5/ac6/src/tx_thread_interrupt_control.S
index e73e4d7c..f99412f2 100644
--- a/ports/cortex_r5/ac6/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_r5/ac6/src/tx_thread_interrupt_control.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -40,7 +40,7 @@ INT_MASK = 0x03F
$_tx_thread_interrupt_control:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_interrupt_control @ Call _tx_thread_interrupt_control function
@@ -50,42 +50,36 @@ $_tx_thread_interrupt_control:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_interrupt_control Cortex-R5/AC6 */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_interrupt_control Cortex-R5/AC6 */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is responsible for changing the interrupt lockout */
-@/* posture of the system. */
-@/* */
-@/* INPUT */
-@/* */
-@/* new_posture New interrupt lockout posture */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* old_posture Old interrupt lockout posture */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* Application Code */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is responsible for changing the interrupt lockout */
+@/* posture of the system. */
+@/* */
+@/* INPUT */
+@/* */
+@/* new_posture New interrupt lockout posture */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* old_posture Old interrupt lockout posture */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* Application Code */
@/* */
@/**************************************************************************/
@UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/cortex_r5/ac6/src/tx_thread_interrupt_disable.S b/ports/cortex_r5/ac6/src/tx_thread_interrupt_disable.S
index 688d243d..1c52ec6f 100644
--- a/ports/cortex_r5/ac6/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_r5/ac6/src/tx_thread_interrupt_disable.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -37,7 +37,7 @@
$_tx_thread_interrupt_disable:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_interrupt_disable @ Call _tx_thread_interrupt_disable function
@@ -47,41 +47,35 @@ $_tx_thread_interrupt_disable:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_interrupt_disable Cortex-R5/AC6 */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_interrupt_disable Cortex-R5/AC6 */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is responsible for disabling interrupts */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* old_posture Old interrupt lockout posture */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* Application Code */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is responsible for disabling interrupts */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* old_posture Old interrupt lockout posture */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* Application Code */
@/* */
@/**************************************************************************/
@UINT _tx_thread_interrupt_disable(void)
@@ -99,7 +93,7 @@ _tx_thread_interrupt_disable:
#ifdef TX_ENABLE_FIQ_SUPPORT
CPSID if @ Disable IRQ and FIQ
#else
- CPSID i @ Disable IRQ
+ CPSID i @ Disable IRQ
#endif
#ifdef __THUMB_INTERWORK
diff --git a/ports/cortex_r5/ac6/src/tx_thread_interrupt_restore.S b/ports/cortex_r5/ac6/src/tx_thread_interrupt_restore.S
index 7872802b..6824ceee 100644
--- a/ports/cortex_r5/ac6/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_r5/ac6/src/tx_thread_interrupt_restore.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -37,7 +37,7 @@
$_tx_thread_interrupt_restore:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_interrupt_restore @ Call _tx_thread_interrupt_restore function
@@ -47,42 +47,36 @@ $_tx_thread_interrupt_restore:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_interrupt_restore Cortex-R5/AC6 */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_interrupt_restore Cortex-R5/AC6 */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
+@/* */
@/* This function is responsible for restoring interrupts to the state */
@/* returned by a previous _tx_thread_interrupt_disable call. */
-@/* */
-@/* INPUT */
-@/* */
-@/* old_posture Old interrupt lockout posture */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* Application Code */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* INPUT */
+@/* */
+@/* old_posture Old interrupt lockout posture */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* Application Code */
@/* */
@/**************************************************************************/
@UINT _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/cortex_r5/ac6/src/tx_thread_irq_nesting_end.S b/ports/cortex_r5/ac6/src/tx_thread_irq_nesting_end.S
index 5d58b2a5..aab78cfd 100644
--- a/ports/cortex_r5/ac6/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_r5/ac6/src/tx_thread_irq_nesting_end.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -34,7 +34,7 @@ DISABLE_INTS = 0xC0 @ Disable IRQ/FIQ interrupts
#else
DISABLE_INTS = 0x80 @ Disable IRQ interrupts
#endif
-MODE_MASK = 0x1F @ Mode mask
+MODE_MASK = 0x1F @ Mode mask
IRQ_MODE_BITS = 0x12 @ IRQ mode bits
@
@
@@ -44,51 +44,45 @@ IRQ_MODE_BITS = 0x12 @ IRQ mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_irq_nesting_end Cortex-R5/AC6 */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_irq_nesting_end Cortex-R5/AC6 */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from IRQ mode after */
-@/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-@/* processing from system mode back to IRQ mode prior to the ISR */
-@/* calling _tx_thread_context_restore. Note that this function */
-@/* assumes the system stack pointer is in the same position after */
-@/* nesting start function was called. */
-@/* */
-@/* This function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with IRQ interrupts disabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is called by the application from IRQ mode after */
+@/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+@/* processing from system mode back to IRQ mode prior to the ISR */
+@/* calling _tx_thread_context_restore. Note that this function */
+@/* assumes the system stack pointer is in the same position after */
+@/* nesting start function was called. */
+@/* */
+@/* This function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with IRQ interrupts disabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_irq_nesting_end(VOID)
@@ -100,7 +94,7 @@ _tx_thread_irq_nesting_end:
MRS r0, CPSR @ Pickup the CPSR
ORR r0, r0, #DISABLE_INTS @ Build disable interrupt value
MSR CPSR_c, r0 @ Disable interrupts
- LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
@ 8-byte alignment logic)
BIC r0, r0, #MODE_MASK @ Clear mode bits
ORR r0, r0, #IRQ_MODE_BITS @ Build IRQ mode CPSR
diff --git a/ports/cortex_r5/ac6/src/tx_thread_irq_nesting_start.S b/ports/cortex_r5/ac6/src/tx_thread_irq_nesting_start.S
index 33aa6f37..7a5cb91b 100644
--- a/ports/cortex_r5/ac6/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_r5/ac6/src/tx_thread_irq_nesting_start.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -40,48 +40,42 @@ SYS_MODE_BITS = 0x1F @ System mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_irq_nesting_start Cortex-R5/AC6 */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_irq_nesting_start Cortex-R5/AC6 */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from IRQ mode after */
-@/* _tx_thread_context_save has been called and switches the IRQ */
-@/* processing to the system mode so nested IRQ interrupt processing */
-@/* is possible (system mode has its own "lr" register). Note that */
-@/* this function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with IRQ interrupts enabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is called by the application from IRQ mode after */
+@/* _tx_thread_context_save has been called and switches the IRQ */
+@/* processing to the system mode so nested IRQ interrupt processing */
+@/* is possible (system mode has its own "lr" register). Note that */
+@/* this function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with IRQ interrupts enabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/cortex_r5/ac6/src/tx_thread_schedule.S b/ports/cortex_r5/ac6/src/tx_thread_schedule.S
index b895b143..dc014e83 100644
--- a/ports/cortex_r5/ac6/src/tx_thread_schedule.S
+++ b/ports/cortex_r5/ac6/src/tx_thread_schedule.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -45,7 +45,7 @@
$_tx_thread_schedule:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_schedule @ Call _tx_thread_schedule function
@@ -55,45 +55,39 @@ $_tx_thread_schedule:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_schedule Cortex-R5/AC6 */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_schedule Cortex-R5/AC6 */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function waits for a thread control block pointer to appear in */
-@/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-@/* in the variable, the corresponding thread is resumed. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* _tx_initialize_kernel_enter ThreadX entry function */
-@/* _tx_thread_system_return Return to system from thread */
-@/* _tx_thread_context_restore Restore thread's context */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function waits for a thread control block pointer to appear in */
+@/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+@/* in the variable, the corresponding thread is resumed. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* _tx_initialize_kernel_enter ThreadX entry function */
+@/* _tx_thread_system_return Return to system from thread */
+@/* _tx_thread_context_restore Restore thread's context */
@/* */
@/**************************************************************************/
@VOID _tx_thread_schedule(VOID)
@@ -123,7 +117,7 @@ __tx_thread_schedule_loop:
@
@ }
@ while(_tx_thread_execute_ptr == TX_NULL);
-@
+@
@ /* Yes! We have a thread to execute. Lockout interrupts and
@ transfer control to it. */
@
@@ -136,7 +130,7 @@ __tx_thread_schedule_loop:
@ /* Setup the current thread pointer. */
@ _tx_thread_current_ptr = _tx_thread_execute_ptr;
@
- LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread
STR r0, [r1] @ Setup current thread pointer
@
@ /* Increment the run count for this thread. */
@@ -150,7 +144,7 @@ __tx_thread_schedule_loop:
@ /* Setup time-slice, if present. */
@ _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
@
- LDR r2, =_tx_timer_time_slice @ Pickup address of time-slice
+ LDR r2, =_tx_timer_time_slice @ Pickup address of time-slice
@ variable
LDR sp, [r0, #8] @ Switch stack pointers
STR r3, [r2] @ Setup time-slice
diff --git a/ports/cortex_r5/ac6/src/tx_thread_stack_build.S b/ports/cortex_r5/ac6/src/tx_thread_stack_build.S
index 2b2de3dd..30dac972 100644
--- a/ports/cortex_r5/ac6/src/tx_thread_stack_build.S
+++ b/ports/cortex_r5/ac6/src/tx_thread_stack_build.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -48,7 +48,7 @@ CPSR_MASK = 0x9F @ Mask initial CPSR, IRQ interru
.type $_tx_thread_stack_build,function
$_tx_thread_stack_build:
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_stack_build @ Call _tx_thread_stack_build function
@@ -58,44 +58,38 @@ $_tx_thread_stack_build:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_stack_build Cortex-R5/AC6 */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_stack_build Cortex-R5/AC6 */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
+@/* */
@/* This function builds a stack frame on the supplied thread's stack. */
@/* The stack frame results in a fake interrupt return to the supplied */
-@/* function pointer. */
-@/* */
-@/* INPUT */
-@/* */
+@/* function pointer. */
+@/* */
+@/* INPUT */
+@/* */
@/* thread_ptr Pointer to thread control blk */
@/* function_ptr Pointer to return function */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* _tx_thread_create Create thread service */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* _tx_thread_create Create thread service */
@/* */
@/**************************************************************************/
@VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -104,10 +98,10 @@ $_tx_thread_stack_build:
.type _tx_thread_stack_build,function
_tx_thread_stack_build:
@
-@
+@
@ /* Build a fake interrupt frame. The form of the fake interrupt stack
@ on the ARM9 should look like the following after it is built:
-@
+@
@ Stack Top: 1 Interrupt stack frame type
@ CPSR Initial value for CPSR
@ a1 (r0) Initial value for a1
diff --git a/ports/cortex_r5/ac6/src/tx_thread_system_return.S b/ports/cortex_r5/ac6/src/tx_thread_system_return.S
index 3ca9650e..50e5d2e2 100644
--- a/ports/cortex_r5/ac6/src/tx_thread_system_return.S
+++ b/ports/cortex_r5/ac6/src/tx_thread_system_return.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -47,7 +47,7 @@
$_tx_thread_system_return:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_system_return @ Call _tx_thread_system_return function
@@ -57,44 +57,38 @@ $_tx_thread_system_return:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_system_return Cortex-R5/AC6 */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_system_return Cortex-R5/AC6 */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is target processor specific. It is used to transfer */
-@/* control from a thread back to the ThreadX system. Only a */
-@/* minimal context is saved since the compiler assumes temp registers */
-@/* are going to get slicked by a function call anyway. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_schedule Thread scheduling loop */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ThreadX components */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is target processor specific. It is used to transfer */
+@/* control from a thread back to the ThreadX system. Only a */
+@/* minimal context is saved since the compiler assumes temp registers */
+@/* are going to get slicked by a function call anyway. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_schedule Thread scheduling loop */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ThreadX components */
@/* */
@/**************************************************************************/
@VOID _tx_thread_system_return(VOID)
@@ -129,7 +123,7 @@ _tx_skip_solicited_vfp_save:
@
MOV r0, #0 @ Build a solicited stack type
STMDB sp!, {r0-r1} @ Save type and CPSR
-@
+@
@
#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
@
diff --git a/ports/cortex_r5/ac6/src/tx_thread_vectored_context_save.S b/ports/cortex_r5/ac6/src/tx_thread_vectored_context_save.S
index aa5bc2f3..b79d8792 100644
--- a/ports/cortex_r5/ac6/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_r5/ac6/src/tx_thread_vectored_context_save.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -36,47 +36,41 @@
@
@/* No 16-bit Thumb mode veneer code is needed for _tx_thread_vectored_context_save
@ since it will never be called 16-bit mode. */
-@
+@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_vectored_context_save Cortex-R5/AC6 */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_vectored_context_save Cortex-R5/AC6 */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function saves the context of an executing thread in the */
-@/* beginning of interrupt processing. The function also ensures that */
-@/* the system stack is used upon return to the calling ISR. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function saves the context of an executing thread in the */
+@/* beginning of interrupt processing. The function also ensures that */
+@/* the system stack is used upon return to the calling ISR. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_vectored_context_save(VOID)
@@ -134,7 +128,7 @@ __tx_thread_not_nested_save:
LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread ptr
LDR r0, [r1, #0] @ Pickup current thread pointer
CMP r0, #0 @ Is it NULL?
- BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
@ scheduling loop - nothing needs saving!
@
@ /* Note: Minimal context of interrupted thread is already saved. */
@@ -166,7 +160,7 @@ __tx_thread_idle_system_save:
@
@ /* Interrupt occurred in the scheduling loop. */
@
-@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
+@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
@ processing. */
@
MOV r10, #0 @ Clear stack limit
diff --git a/ports/cortex_r5/ac6/src/tx_timer_interrupt.S b/ports/cortex_r5/ac6/src/tx_timer_interrupt.S
index 0261bddc..5bab06c0 100644
--- a/ports/cortex_r5/ac6/src/tx_timer_interrupt.S
+++ b/ports/cortex_r5/ac6/src/tx_timer_interrupt.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Timer */
@/** */
@@ -55,7 +55,7 @@
.type $_tx_timer_interrupt,function
$_tx_timer_interrupt:
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_timer_interrupt @ Call _tx_timer_interrupt function
@@ -65,46 +65,40 @@ $_tx_timer_interrupt:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_timer_interrupt Cortex-R5/AC6 */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_timer_interrupt Cortex-R5/AC6 */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function processes the hardware timer interrupt. This */
-@/* processing includes incrementing the system clock and checking for */
-@/* time slice and/or timer expiration. If either is found, the */
-@/* interrupt context save/restore functions are called along with the */
-@/* expiration functions. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_time_slice Time slice interrupted thread */
-@/* _tx_timer_expiration_process Timer expiration processing */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* interrupt vector */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function processes the hardware timer interrupt. This */
+@/* processing includes incrementing the system clock and checking for */
+@/* time slice and/or timer expiration. If either is found, the */
+@/* interrupt context save/restore functions are called along with the */
+@/* expiration functions. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_time_slice Time slice interrupted thread */
+@/* _tx_timer_expiration_process Timer expiration processing */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* interrupt vector */
@/* */
@/**************************************************************************/
@VOID _tx_timer_interrupt(VOID)
@@ -129,7 +123,7 @@ _tx_timer_interrupt:
@ if (_tx_timer_time_slice)
@ {
@
- LDR r3, =_tx_timer_time_slice @ Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice @ Pickup address of time-slice
LDR r2, [r3] @ Pickup time-slice
CMP r2, #0 @ Is it non-active?
BEQ __tx_timer_no_time_slice @ Yes, skip time-slice processing
@@ -247,7 +241,7 @@ __tx_timer_dont_activate:
@ if (_tx_timer_expired_time_slice)
@ {
@
- LDR r3, =_tx_timer_expired_time_slice @ Pickup address of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice @ Pickup address of time-slice expired
LDR r2, [r3] @ Pickup the actual flag
CMP r2, #0 @ See if the flag is set
BEQ __tx_timer_not_ts_expiration @ No, skip time-slice processing
diff --git a/ports/cortex_r5/ghs/example_build/tx_initialize_low_level.arm b/ports/cortex_r5/ghs/example_build/tx_initialize_low_level.arm
index 296a427d..e3dc99a5 100644
--- a/ports/cortex_r5/ghs/example_build/tx_initialize_low_level.arm
+++ b/ports/cortex_r5/ghs/example_build/tx_initialize_low_level.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r5/ghs/inc/tx_el.h b/ports/cortex_r5/ghs/inc/tx_el.h
index b8926921..72e5bbe3 100644
--- a/ports/cortex_r5/ghs/inc/tx_el.h
+++ b/ports/cortex_r5/ghs/inc/tx_el.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,12 +37,6 @@
/* EventAnalyzer. It is assumed that tx_api.h and tx_port.h have */
/* already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_EL_H
diff --git a/ports/cortex_r5/ghs/inc/tx_port.h b/ports/cortex_r5/ghs/inc/tx_port.h
index 596a8e07..5b435fcb 100644
--- a/ports/cortex_r5/ghs/inc/tx_port.h
+++ b/ports/cortex_r5/ghs/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -394,7 +386,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-R5/Green Hills Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-R5/Green Hills Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_r5/ghs/readme_threadx.txt b/ports/cortex_r5/ghs/readme_threadx.txt
index 62383547..ac06719a 100644
--- a/ports/cortex_r5/ghs/readme_threadx.txt
+++ b/ports/cortex_r5/ghs/readme_threadx.txt
@@ -1,19 +1,19 @@
- Microsoft's Azure RTOS ThreadX for Cortex-R5
+ Microsoft's Azure RTOS ThreadX for Cortex-R5
Using the Green Hills Software Tools
1. Open the ThreadX Project Workspace
-In order to build the ThreadX library and the ThreadX demonstration first load
-the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
-"example_build" directory.
+In order to build the ThreadX library and the ThreadX demonstration first load
+the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
+"example_build" directory.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply select the MULTI project file
-tx.gpj and then select the build button. You should now observe the
-compilation and assembly of the ThreadX library. This project build produces
+Building the ThreadX library is easy; simply select the MULTI project file
+tx.gpj and then select the build button. You should now observe the
+compilation and assembly of the ThreadX library. This project build produces
the ThreadX library file tx.a.
@@ -21,55 +21,55 @@ the ThreadX library file tx.a.
The ThreadX demonstration is designed to execute under the MULTI environment
on the Green Hills Cortex-R5 simulator. The instructions that follow describe
-how to get the ThreadX evaluation running under the MULTI Cortex-R5 simulation
+how to get the ThreadX evaluation running under the MULTI Cortex-R5 simulation
environment.
-Building the demonstration is easy; simply select the MULTI project file
-sample_threadx.gpj. At this point, select the "Project Build" button and observe
-the compilation, assembly, and linkage of the ThreadX demonstration application.
+Building the demonstration is easy; simply select the MULTI project file
+sample_threadx.gpj. At this point, select the "Project Build" button and observe
+the compilation, assembly, and linkage of the ThreadX demonstration application.
-After the demonstration is built, invoke the MULTI ARM simulator by selecting
-the simulator connection from within the sample_threadx.con connection file.
-Once connected to the simulator, select the "Debug" button. You should now
-observe the main function of sample_threadx.c.
+After the demonstration is built, invoke the MULTI ARM simulator by selecting
+the simulator connection from within the sample_threadx.con connection file.
+Once connected to the simulator, select the "Debug" button. You should now
+observe the main function of sample_threadx.c.
At this point, you should setup a simulated timer interrupt for ThreadX
by entering "timer 9999 irq" in the "target" window of the debugger.
-You are now ready to execute the ThreadX demonstration system. Select
-breakpoints and data watches to observe the execution of the sample_threadx.c
+You are now ready to execute the ThreadX demonstration system. Select
+breakpoints and data watches to observe the execution of the sample_threadx.c
application.
4. EventAnalyzer Demonstration
-To build a demonstration system that also logs events for the MULTI EventAnalyzer,
-perform the same steps as the regular demo, except build the ThreadX library with
-txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
-The resulting image will log all system events, which can then be displayed by the
+To build a demonstration system that also logs events for the MULTI EventAnalyzer,
+perform the same steps as the regular demo, except build the ThreadX library with
+txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
+The resulting image will log all system events, which can then be displayed by the
MULTI EventAnalyzer.
5. System Initialization
-The system entry point using the Green Hills tools is at the label _start.
-This is defined within the crt0.arm file supplied by Green Hills. In addition,
-this is where all static and global preset C variable initialization
+The system entry point using the Green Hills tools is at the label _start.
+This is defined within the crt0.arm file supplied by Green Hills. In addition,
+this is where all static and global preset C variable initialization
processing is called from.
After the Green Hills startup function returns, ThreadX initialization is
called. The main initialization function is _tx_initialize_low_level and
-is located in the file tx_initialize_low_level.arm. This function is responsible
-for setting up various system data structures, interrupt vectors, and the
+is located in the file tx_initialize_low_level.arm. This function is responsible
+for setting up various system data structures, interrupt vectors, and the
periodic timer interrupt source of ThreadX.
-In addition, _tx_initialize_low_level determines where the first available
+In addition, _tx_initialize_low_level determines where the first available
RAM memory address is located. This address is supplied to tx_application_define.
-By default, the first available RAM memory address is assumed to start at the
-beginning of the ThreadX section .free_mem. If changes are made to the
-sample_threadx.ld file, the .free_mem section should remain the last allocated
-section in the main RAM area. The starting address of this section is passed
+By default, the first available RAM memory address is assumed to start at the
+beginning of the ThreadX section .free_mem. If changes are made to the
+sample_threadx.ld file, the .free_mem section should remain the last allocated
+section in the main RAM area. The starting address of this section is passed
to tx_application_define.
@@ -87,27 +87,27 @@ The following defines and their associated action are as follows:
TX_ENABLE_FIQ_NESTING If defined, this brings in special FIQ
interrupt nesting logic into the ThreadX
library. This define should be applied
- to the entire ThreadX library and the
+ to the entire ThreadX library and the
define TX_ENABLE_FIQ_SUPPORT should also
be defined.
TX_ENABLE_FIQ_SUPPORT If defined, this brings in FIQ context
save and restore logic necessary for
applications to call ThreadX services from
- FIQ interrupt handlers. This define
- should be applied to the entire ThreadX
+ FIQ interrupt handlers. This define
+ should be applied to the entire ThreadX
library.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 4 in the "ThreadX User Guide"
+ Chapter 4 in the "ThreadX User Guide"
for more details.
TX_ENABLE_EVENT_LOGGING This define enables event logging for any
or all of the ThreadX source code. If this
- option is used anywhere, the tx_initialize_high_level.c
+ option is used anywhere, the tx_initialize_high_level.c
file must be compiled with it as well, since this
is where the event log is initialized.
@@ -119,121 +119,121 @@ The following defines and their associated action are as follows:
If this is enabled, run-time filtering logic
is added to the event logging code.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
7. Register Usage and Stack Frames
-The Green Hills compiler assumes that registers r0-r3 (a1-a4) and r12 (ip)
-are scratch registers for each function. All other registers used by a C
-function must be preserved by the function. ThreadX takes advantage of this
-in situations where a context switch happens as a result of making a ThreadX
-service call (which is itself a C function). In such cases, the saved
+The Green Hills compiler assumes that registers r0-r3 (a1-a4) and r12 (ip)
+are scratch registers for each function. All other registers used by a C
+function must be preserved by the function. ThreadX takes advantage of this
+in situations where a context switch happens as a result of making a ThreadX
+service call (which is itself a C function). In such cases, the saved
context of a thread is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -251,40 +251,40 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
8. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make ThreadX run faster, you can change the tx.gpj project
-to disable debug information and enable the desired optimizations.
+to disable debug information and enable the desired optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined before tx_api.h is included.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined before tx_api.h is included.
9. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-R5
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
9.1 Vector Area
The Cortex-R5 vectors start at address zero. The demonstration system reset.arm
-file contains the reset section (which contains all the ARM vectors) and is
+file contains the reset section (which contains all the ARM vectors) and is
typically loaded at address zero. On actual hardware platforms, this section
-might have to be copied to address 0.
+might have to be copied to address 0.
9.2 IRQ ISRs
@@ -294,13 +294,13 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
9.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.arm:
.globl __tx_irq_handler
- .globl __tx_irq_processing_return
+ .globl __tx_irq_processing_return
__tx_irq_handler:
/* Jump to context save to save system context. */
@@ -308,7 +308,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
/* At this point execution is still in the IRQ mode. The CPSR, point of
- interrupt, and all C scratch registers are available for use. Note
+ interrupt, and all C scratch registers are available for use. Note
that IRQ interrupts are still disabled upon return from the context
save function. */
@@ -321,7 +321,7 @@ __tx_irq_processing_return:
9.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.arm:
.globl __tx_irq_example_handler
@@ -331,12 +331,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} # Save some scratch registers
MRS r0, SPSR # Pickup saved SPSR
- SUB lr, lr, #4 # Adjust point of interrupt
+ SUB lr, lr, #4 # Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} # Store other scratch registers
BL _tx_thread_vectored_context_save # Call the vectored IRQ context save
/* At this point execution is still in the IRQ mode. The CPSR, point of
- interrupt, and all C scratch registers are available for use. Note
+ interrupt, and all C scratch registers are available for use. Note
that IRQ interrupts are still disabled upon return from the context
save function. */
@@ -353,22 +353,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.arm. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables nesting
-by disabling IRQ interrupts and switching back to IRQ mode in preparation for
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.arm. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables nesting
+by disabling IRQ interrupts and switching back to IRQ mode in preparation for
the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in the
+The following is an example of enabling IRQ nested interrupts in the
typical IRQ handler:
.globl __tx_irq_handler
- .globl __tx_irq_processing_return
+ .globl __tx_irq_processing_return
__tx_irq_handler:
/* Jump to context save to save system context. */
@@ -376,10 +376,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
/* Enable nested IRQ interrupts. NOTE: Since this service returns
- with IRQ interrupts enabled, all IRQ interrupt sources must be
+ with IRQ interrupts enabled, all IRQ interrupt sources must be
cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-
+
/* Application ISR call(s) go here! */
/* Disable nested IRQ interrupts. The mode is switched back to
@@ -392,9 +392,9 @@ __tx_irq_processing_return:
9.3 FIQ Interrupts
-By default, Cortex-R5 FIQ interrupts are left completely enabled by ThreadX.
-Of course, this means that the application is fully responsible for
-saving/restoring any registers used in the FIQ ISR processing. In addition,
+By default, Cortex-R5 FIQ interrupts are left completely enabled by ThreadX.
+Of course, this means that the application is fully responsible for
+saving/restoring any registers used in the FIQ ISR processing. In addition,
no ThreadX service calls are allowed from the default FIQ ISRs. The default
FIQ interrupt shell is located in tx_initialize_low_level.arm.
@@ -403,7 +403,7 @@ FIQ interrupt shell is located in tx_initialize_low_level.arm.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.arm:
@@ -431,18 +431,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.arm. When nested FIQ interrupts are no longer
-required, calling the _tx_thread_fiq_nesting_end service disables nesting by
-disabling FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.arm. When nested FIQ interrupts are no longer
+required, calling the _tx_thread_fiq_nesting_end service disables nesting by
+disabling FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -458,7 +458,7 @@ __tx_fiq_processing_return:
interrupt, and all C scratch registers are available for use. */
/* Enable nested FIQ interrupts. NOTE: Since this service returns
- with FIQ interrupts enabled, all FIQ interrupt sources must be
+ with FIQ interrupts enabled, all FIQ interrupt sources must be
cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@@ -475,29 +475,29 @@ __tx_fiq_processing_return:
10. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.arm.
11. Thumb/Cortex-R5 Mixed Mode
-By default, ThreadX is setup for running in Cortex-R5 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
+By default, ThreadX is setup for running in Cortex-R5 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
ThreadX file and/or the application in Thumb mode. The only exception
-to this is the file tx_thread_shell_entry.c. This file must always be
+to this is the file tx_thread_shell_entry.c. This file must always be
built in 32-bit mode.
12. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
@@ -520,7 +520,7 @@ information associated with this specific port of ThreadX:
04-02-2021 Release 6.1.6 changes:
tx_port.h Updated macro definition
-05/19/2020 Initial ThreadX version of Cortex-R5/Green Hills port.
+05/19/2020 Initial ThreadX version of Cortex-R5/Green Hills port.
Copyright(c) 1996-2020 Microsoft Corporation
diff --git a/ports/cortex_r5/ghs/src/tx_el.c b/ports/cortex_r5/ghs/src/tx_el.c
index 365622cd..b5d3b8b7 100644
--- a/ports/cortex_r5/ghs/src/tx_el.c
+++ b/ports/cortex_r5/ghs/src/tx_el.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -82,12 +83,6 @@ UINT _tx_thread_interrupt_control(UINT new_posture);
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_el_initialize(VOID)
{
diff --git a/ports/cortex_r5/ghs/src/tx_thread_context_restore.arm b/ports/cortex_r5/ghs/src/tx_thread_context_restore.arm
index 724b4995..b103b804 100644
--- a/ports/cortex_r5/ghs/src/tx_thread_context_restore.arm
+++ b/ports/cortex_r5/ghs/src/tx_thread_context_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r5/ghs/src/tx_thread_context_save.arm b/ports/cortex_r5/ghs/src/tx_thread_context_save.arm
index 408ad512..29a95aae 100644
--- a/ports/cortex_r5/ghs/src/tx_thread_context_save.arm
+++ b/ports/cortex_r5/ghs/src/tx_thread_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r5/ghs/src/tx_thread_fiq_context_restore.arm b/ports/cortex_r5/ghs/src/tx_thread_fiq_context_restore.arm
index e1e917a2..4287f779 100644
--- a/ports/cortex_r5/ghs/src/tx_thread_fiq_context_restore.arm
+++ b/ports/cortex_r5/ghs/src/tx_thread_fiq_context_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r5/ghs/src/tx_thread_fiq_context_save.arm b/ports/cortex_r5/ghs/src/tx_thread_fiq_context_save.arm
index 166a9898..28725995 100644
--- a/ports/cortex_r5/ghs/src/tx_thread_fiq_context_save.arm
+++ b/ports/cortex_r5/ghs/src/tx_thread_fiq_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r5/ghs/src/tx_thread_fiq_nesting_end.arm b/ports/cortex_r5/ghs/src/tx_thread_fiq_nesting_end.arm
index c00013a3..8e2dcd91 100644
--- a/ports/cortex_r5/ghs/src/tx_thread_fiq_nesting_end.arm
+++ b/ports/cortex_r5/ghs/src/tx_thread_fiq_nesting_end.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r5/ghs/src/tx_thread_fiq_nesting_start.arm b/ports/cortex_r5/ghs/src/tx_thread_fiq_nesting_start.arm
index 0ab401e4..b83c3661 100644
--- a/ports/cortex_r5/ghs/src/tx_thread_fiq_nesting_start.arm
+++ b/ports/cortex_r5/ghs/src/tx_thread_fiq_nesting_start.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r5/ghs/src/tx_thread_interrupt_control.arm b/ports/cortex_r5/ghs/src/tx_thread_interrupt_control.arm
index 66670a6b..a38ad2b5 100644
--- a/ports/cortex_r5/ghs/src/tx_thread_interrupt_control.arm
+++ b/ports/cortex_r5/ghs/src/tx_thread_interrupt_control.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r5/ghs/src/tx_thread_interrupt_disable.arm b/ports/cortex_r5/ghs/src/tx_thread_interrupt_disable.arm
index c632e920..bea8c467 100644
--- a/ports/cortex_r5/ghs/src/tx_thread_interrupt_disable.arm
+++ b/ports/cortex_r5/ghs/src/tx_thread_interrupt_disable.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r5/ghs/src/tx_thread_interrupt_restore.arm b/ports/cortex_r5/ghs/src/tx_thread_interrupt_restore.arm
index cf8d3220..1e3de8d8 100644
--- a/ports/cortex_r5/ghs/src/tx_thread_interrupt_restore.arm
+++ b/ports/cortex_r5/ghs/src/tx_thread_interrupt_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r5/ghs/src/tx_thread_irq_nesting_end.arm b/ports/cortex_r5/ghs/src/tx_thread_irq_nesting_end.arm
index 34d15f49..a8085f71 100644
--- a/ports/cortex_r5/ghs/src/tx_thread_irq_nesting_end.arm
+++ b/ports/cortex_r5/ghs/src/tx_thread_irq_nesting_end.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r5/ghs/src/tx_thread_irq_nesting_start.arm b/ports/cortex_r5/ghs/src/tx_thread_irq_nesting_start.arm
index 5fa03cea..86bca486 100644
--- a/ports/cortex_r5/ghs/src/tx_thread_irq_nesting_start.arm
+++ b/ports/cortex_r5/ghs/src/tx_thread_irq_nesting_start.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r5/ghs/src/tx_thread_schedule.arm b/ports/cortex_r5/ghs/src/tx_thread_schedule.arm
index 50ea6b47..e0548e7f 100644
--- a/ports/cortex_r5/ghs/src/tx_thread_schedule.arm
+++ b/ports/cortex_r5/ghs/src/tx_thread_schedule.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r5/ghs/src/tx_thread_stack_build.arm b/ports/cortex_r5/ghs/src/tx_thread_stack_build.arm
index 373990dc..eaad8d16 100644
--- a/ports/cortex_r5/ghs/src/tx_thread_stack_build.arm
+++ b/ports/cortex_r5/ghs/src/tx_thread_stack_build.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r5/ghs/src/tx_thread_system_return.arm b/ports/cortex_r5/ghs/src/tx_thread_system_return.arm
index b9b3c0bd..488b9363 100644
--- a/ports/cortex_r5/ghs/src/tx_thread_system_return.arm
+++ b/ports/cortex_r5/ghs/src/tx_thread_system_return.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r5/ghs/src/tx_thread_vectored_context_save.arm b/ports/cortex_r5/ghs/src/tx_thread_vectored_context_save.arm
index 117ab499..11bca1b9 100644
--- a/ports/cortex_r5/ghs/src/tx_thread_vectored_context_save.arm
+++ b/ports/cortex_r5/ghs/src/tx_thread_vectored_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r5/ghs/src/tx_timer_interrupt.arm b/ports/cortex_r5/ghs/src/tx_timer_interrupt.arm
index c9125dca..5b3a4e3e 100644
--- a/ports/cortex_r5/ghs/src/tx_timer_interrupt.arm
+++ b/ports/cortex_r5/ghs/src/tx_timer_interrupt.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r5/gnu/example_build/crt0.S b/ports/cortex_r5/gnu/example_build/crt0.S
index aa0f3239..56b6c958 100644
--- a/ports/cortex_r5/gnu/example_build/crt0.S
+++ b/ports/cortex_r5/gnu/example_build/crt0.S
@@ -26,13 +26,13 @@ _mainCRTStartup:
mov a2, #0 /* Second arg: fill value */
mov fp, a2 /* Null frame pointer */
mov r7, a2 /* Null frame pointer for Thumb */
-
- ldr a1, .LC1 /* First arg: start of memory block */
- ldr a3, .LC2
- sub a3, a3, a1 /* Third arg: length of block */
-
-
+ ldr a1, .LC1 /* First arg: start of memory block */
+ ldr a3, .LC2
+ sub a3, a3, a1 /* Third arg: length of block */
+
+
+
bl memset
mov r0, #0 /* no arguments */
mov r1, #0 /* no argv either */
@@ -48,15 +48,15 @@ _mainCRTStartup:
/* bl init */
mov r0, r4
mov r1, r5
-#endif
+#endif
bl main
bl exit /* Should not return. */
-
- /* For Thumb, constants must be after the code since only
+
+ /* For Thumb, constants must be after the code since only
positive offsets are supported for PC relative addresses. */
-
+
.align 0
.LC0:
.LC1:
diff --git a/ports/cortex_r5/gnu/example_build/reset.S b/ports/cortex_r5/gnu/example_build/reset.S
index a11c826a..5d05258b 100644
--- a/ports/cortex_r5/gnu/example_build/reset.S
+++ b/ports/cortex_r5/gnu/example_build/reset.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Initialize */
@/** */
@@ -65,11 +65,11 @@ SWI:
.word __tx_swi_interrupt @ Software interrupt handler
PREFETCH:
.word __tx_prefetch_handler @ Prefetch exception handler
-ABORT:
+ABORT:
.word __tx_abort_handler @ Abort exception handler
-RESERVED:
+RESERVED:
.word __tx_reserved_handler @ Reserved exception handler
-IRQ:
+IRQ:
.word __tx_irq_handler @ IRQ interrupt handler
FIQ:
.word __tx_fiq_handler @ FIQ interrupt handler
diff --git a/ports/cortex_r5/gnu/example_build/sample_threadx.c b/ports/cortex_r5/gnu/example_build/sample_threadx.c
index 418ec634..8c61de06 100644
--- a/ports/cortex_r5/gnu/example_build/sample_threadx.c
+++ b/ports/cortex_r5/gnu/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -242,11 +242,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -305,7 +305,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -358,7 +358,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_r5/gnu/example_build/sample_threadx.ld b/ports/cortex_r5/gnu/example_build/sample_threadx.ld
index 3dea4e1c..e940b2b8 100644
--- a/ports/cortex_r5/gnu/example_build/sample_threadx.ld
+++ b/ports/cortex_r5/gnu/example_build/sample_threadx.ld
@@ -7,7 +7,7 @@ OUTPUT_ARCH(arm)
SECTIONS
{
. = 0x00000000;
-
+
.vectors : {reset.o(.text) }
/* Read-only sections, merged into text segment: */
@@ -94,8 +94,8 @@ SECTIONS
*(.gnu.linkonce.t*)
*(.glue_7t) *(.glue_7)
} =0
- .init :
- {
+ .init :
+ {
KEEP (*(.init))
} =0
_etext = .;
@@ -120,7 +120,7 @@ SECTIONS
.data1 : { *(.data1) }
.eh_frame : { KEEP (*(.eh_frame)) }
.gcc_except_table : { *(.gcc_except_table) }
- .ctors :
+ .ctors :
{
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
@@ -153,9 +153,9 @@ SECTIONS
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata :
+ .sdata :
{
- *(.sdata)
+ *(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
}
@@ -191,7 +191,7 @@ SECTIONS
_stack_bottom = ABSOLUTE(.) ;
- /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
+ /* Allocate room for stack. This must be big enough for the IRQ, FIQ, and
SYS stack if nested interrupts are enabled. */
. = ALIGN(8) ;
. += 4096 ;
diff --git a/ports/cortex_r5/gnu/example_build/tx_initialize_low_level.S b/ports/cortex_r5/gnu/example_build/tx_initialize_low_level.S
index a3471277..b51eaeba 100644
--- a/ports/cortex_r5/gnu/example_build/tx_initialize_low_level.S
+++ b/ports/cortex_r5/gnu/example_build/tx_initialize_low_level.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Initialize */
@/** */
@@ -62,7 +62,7 @@ SYS_STACK_SIZE = 1024 @ System stack size
.type $_tx_initialize_low_level,function
$_tx_initialize_low_level:
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_initialize_low_level @ Call _tx_initialize_low_level function
@@ -72,45 +72,39 @@ $_tx_initialize_low_level:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_initialize_low_level Cortex-R5/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_initialize_low_level Cortex-R5/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is responsible for any low-level processor */
-@/* initialization, including setting up interrupt vectors, setting */
-@/* up a periodic timer interrupt source, saving the system stack */
-@/* pointer for use in ISR processing later, and finding the first */
-@/* available RAM memory address for tx_application_define. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* _tx_initialize_kernel_enter ThreadX entry function */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is responsible for any low-level processor */
+@/* initialization, including setting up interrupt vectors, setting */
+@/* up a periodic timer interrupt source, saving the system stack */
+@/* pointer for use in ISR processing later, and finding the first */
+@/* available RAM memory address for tx_application_define. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* _tx_initialize_kernel_enter ThreadX entry function */
@/* */
@/**************************************************************************/
@VOID _tx_initialize_low_level(VOID)
@@ -125,7 +119,7 @@ _tx_initialize_low_level:
@
LDR r1, =_sp @ Get pointer to stack area
-#ifdef TX_ENABLE_IRQ_NESTING
+#ifdef TX_ENABLE_IRQ_NESTING
@
@ /* Setup the system mode stack for nested interrupt support */
@
@@ -156,7 +150,7 @@ _tx_initialize_low_level:
MSR CPSR, r0 @ Enter SVC mode
LDR r2, =_stack_bottom @ Pickup stack bottom
CMP r3, r2 @ Compare the current stack end with the bottom
-_stack_error_loop:
+_stack_error_loop:
BLT _stack_error_loop @ If the IRQ stack exceeds the stack bottom, just sit here!
@
@ /* Save the system stack pointer. */
@@ -208,7 +202,7 @@ __tx_reserved_handler:
B __tx_reserved_handler @ Reserved exception handler
@
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -216,17 +210,17 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. In
+@ interrupt, and all C scratch registers are available for use. In
@ addition, IRQ interrupts may be re-enabled - with certain restrictions -
@ if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-@ small code sequences where lr is saved before enabling interrupts and
+@ small code sequences where lr is saved before enabling interrupts and
@ restored after interrupts are again disabled. */
@
-@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
@ from IRQ mode with interrupts disabled. This routine switches to the
-@ system mode and returns with IRQ interrupts enabled.
-@
-@ NOTE: It is very important to ensure all IRQ interrupts are cleared
+@ system mode and returns with IRQ interrupts enabled.
+@
+@ NOTE: It is very important to ensure all IRQ interrupts are cleared
@ prior to enabling nested IRQ interrupts. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -240,7 +234,7 @@ __tx_irq_processing_return:
@
@
@ /* If interrupt nesting was started earlier, the end of interrupt nesting
-@ service must be called before returning to _tx_thread_context_restore.
+@ service must be called before returning to _tx_thread_context_restore.
@ This routine returns in processing in IRQ mode with interrupts disabled. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -256,28 +250,28 @@ __tx_irq_processing_return:
@__tx_example_vectored_irq_handler:
@
@
-@ /* Save initial context and call context save to prepare for
+@ /* Save initial context and call context save to prepare for
@ vectored ISR execution. */
@
@ STMDB sp!, {r0-r3} @ Save some scratch registers
@ MRS r0, SPSR @ Pickup saved SPSR
-@ SUB lr, lr, #4 @ Adjust point of interrupt
+@ SUB lr, lr, #4 @ Adjust point of interrupt
@ STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
@ BL _tx_thread_vectored_context_save @ Vectored context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. In
+@ interrupt, and all C scratch registers are available for use. In
@ addition, IRQ interrupts may be re-enabled - with certain restrictions -
@ if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-@ small code sequences where lr is saved before enabling interrupts and
+@ small code sequences where lr is saved before enabling interrupts and
@ restored after interrupts are again disabled. */
@
@
-@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+@ /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
@ from IRQ mode with interrupts disabled. This routine switches to the
-@ system mode and returns with IRQ interrupts enabled.
-@
-@ NOTE: It is very important to ensure all IRQ interrupts are cleared
+@ system mode and returns with IRQ interrupts enabled.
+@
+@ NOTE: It is very important to ensure all IRQ interrupts are cleared
@ prior to enabling nested IRQ interrupts. */
@#ifdef TX_ENABLE_IRQ_NESTING
@ BL _tx_thread_irq_nesting_start
@@ -286,7 +280,7 @@ __tx_irq_processing_return:
@ /* Application IRQ handlers can be called here! */
@
@ /* If interrupt nesting was started earlier, the end of interrupt nesting
-@ service must be called before returning to _tx_thread_context_restore.
+@ service must be called before returning to _tx_thread_context_restore.
@ This routine returns in processing in IRQ mode with interrupts disabled. */
@#ifdef TX_ENABLE_IRQ_NESTING
@ BL _tx_thread_irq_nesting_end
@@ -308,11 +302,11 @@ __tx_fiq_processing_return:
@ /* At this point execution is still in the FIQ mode. The CPSR, point of
@ interrupt, and all C scratch registers are available for use. */
@
-@ /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
+@ /* Interrupt nesting is allowed after calling _tx_thread_fiq_nesting_start
@ from FIQ mode with interrupts disabled. This routine switches to the
-@ system mode and returns with FIQ interrupts enabled.
+@ system mode and returns with FIQ interrupts enabled.
@
-@ NOTE: It is very important to ensure all FIQ interrupts are cleared
+@ NOTE: It is very important to ensure all FIQ interrupts are cleared
@ prior to enabling nested FIQ interrupts. */
#ifdef TX_ENABLE_FIQ_NESTING
BL _tx_thread_fiq_nesting_start
diff --git a/ports/cortex_r5/gnu/inc/tx_port.h b/ports/cortex_r5/gnu/inc/tx_port.h
index 4d11417e..0a09f9ea 100644
--- a/ports/cortex_r5/gnu/inc/tx_port.h
+++ b/ports/cortex_r5/gnu/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-R5/GNU */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-R5/GNU */
/* 6.1.12 */
/* */
/* AUTHOR */
@@ -32,27 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
-/* 07-29-2022 Scott Larson Updated comments, removed */
-/* unneeded temp variable, */
-/* resulting in version 6.1.12 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -65,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -78,7 +67,7 @@
#include
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -114,12 +103,12 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#ifdef TX_ENABLE_FIQ_SUPPORT
#define TX_INT_DISABLE 0xC0 /* Disable IRQ & FIQ interrupts */
@@ -129,8 +118,8 @@ typedef unsigned short USHORT;
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -177,7 +166,7 @@ typedef unsigned short USHORT;
#define TX_INLINE_INITIALIZATION
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -189,13 +178,13 @@ typedef unsigned short USHORT;
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
-#define TX_THREAD_EXTENSION_2
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -209,11 +198,11 @@ typedef unsigned short USHORT;
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -221,8 +210,8 @@ typedef unsigned short USHORT;
tx_thread_shell_entry, and tx_thread_terminate. */
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -249,24 +238,24 @@ typedef unsigned short USHORT;
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
-
+
#if __TARGET_ARCH_ARM > 4
#ifndef __thumb__
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
asm volatile (" CLZ %0,%1 ": "=r" (b) : "r" (m) ); \
- b = 31 - b;
+ b = 31 - b;
#endif
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
@@ -310,8 +299,8 @@ unsigned int _tx_thread_interrupt_restore(UINT old_posture);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-R5/GNU Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-R5/GNU Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_r5/gnu/readme_threadx.txt b/ports/cortex_r5/gnu/readme_threadx.txt
index a9a28305..bc806c75 100644
--- a/ports/cortex_r5/gnu/readme_threadx.txt
+++ b/ports/cortex_r5/gnu/readme_threadx.txt
@@ -1,55 +1,55 @@
- Microsoft's Azure RTOS ThreadX for Cortex-R5
+ Microsoft's Azure RTOS ThreadX for Cortex-R5
Using the GNU Tools
1. Building the ThreadX run-time Library
-First make sure you are in the "example_build" directory. Also, make sure that
-you have setup your path and other environment variables necessary for the GNU
-development environment.
+First make sure you are in the "example_build" directory. Also, make sure that
+you have setup your path and other environment variables necessary for the GNU
+development environment.
-At this point you may run the build_threadx.bat batch file. This will build the
-ThreadX run-time environment in the "example_build" directory.
+At this point you may run the build_threadx.bat batch file. This will build the
+ThreadX run-time environment in the "example_build" directory.
-You should observe assembly and compilation of a series of ThreadX source
-files. At the end of the batch file, they are all combined into the
-run-time library file: tx.a. This file must be linked with your
+You should observe assembly and compilation of a series of ThreadX source
+files. At the end of the batch file, they are all combined into the
+run-time library file: tx.a. This file must be linked with your
application in order to use ThreadX.
2. Demonstration System
-Building the demonstration is easy; simply execute the build_threadx_sample.bat
-batch file while inside the "example_build" directory.
+Building the demonstration is easy; simply execute the build_threadx_sample.bat
+batch file while inside the "example_build" directory.
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with TX.A. The resulting file DEMO is a binary file
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with TX.A. The resulting file DEMO is a binary file
that can be downloaded and executed.
3. System Initialization
-The entry point in ThreadX for the Cortex-R5 using GNU tools is at label _start.
+The entry point in ThreadX for the Cortex-R5 using GNU tools is at label _start.
This is defined within the modified version of the GNU startup code - crt0.S.
-The ThreadX tx_initialize_low_level.S file is responsible for setting up various
-system data structures, the interrupt vectors, and a periodic timer interrupt source.
-By default, the vector area is defined to be located at the "__vectors" label,
-which is defined in reset.S. This area is typically located at 0. In situations
-where this is impossible, the vectors at the "__vectors" label should be copied
+The ThreadX tx_initialize_low_level.S file is responsible for setting up various
+system data structures, the interrupt vectors, and a periodic timer interrupt source.
+By default, the vector area is defined to be located at the "__vectors" label,
+which is defined in reset.S. This area is typically located at 0. In situations
+where this is impossible, the vectors at the "__vectors" label should be copied
to address 0.
-This is also where initialization of a periodic timer interrupt source should take
+This is also where initialization of a periodic timer interrupt source should take
place.
-In addition, _tx_initialize_low_level defines the first available address
-for use by the application, which is supplied as the sole input parameter
+In addition, _tx_initialize_low_level defines the first available address
+for use by the application, which is supplied as the sole input parameter
to your application definition function, tx_application_define.
4. Assembler / Compiler Switches
-The following are compiler switches used in building the demonstration
+The following are compiler switches used in building the demonstration
system:
Compiler/Assembler Meaning
@@ -73,164 +73,164 @@ Application Defines ( -D option)
ThreadX assembly files. If used,
it should be used on all assembly
files and the generic C source of
- ThreadX should be compiled with
+ ThreadX should be compiled with
TX_ENABLE_FIQ_SUPPORT defined as well.
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S.
TX_ENABLE_FIQ_NESTING This assembler define enables FIQ
- nested support. If FIQ nested
+ nested support. If FIQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.S. In addition,
IRQ nesting should also be enabled.
TX_ENABLE_FIQ_SUPPORT This compiler define enables FIQ
interrupt handling in the ThreadX
- generic C source. This define
+ generic C source. This define
should also be used in conjunction
with the corresponding assembler
- define.
+ define.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
5. Register Usage and Stack Frames
-The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
-registers for each function. All other registers used by a C function must
-be preserved by the function. ThreadX takes advantage of this in situations
-where a context switch happens as a result of making a ThreadX service call
-(which is itself a C function). In such cases, the saved context of a thread
+The GNU compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are scratch
+registers for each function. All other registers used by a C function must
+be preserved by the function. ThreadX takes advantage of this in situations
+where a context switch happens as a result of making a ThreadX service call
+(which is itself a C function). In such cases, the saved context of a thread
is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -248,52 +248,52 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-R5
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-R5 vectors start at address zero. The demonstration system startup
-reset.S file contains the vectors and is loaded at address zero. On actual
-hardware platforms, this area might have to be copied to address 0.
+reset.S file contains the vectors and is loaded at address zero. On actual
+hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
-ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
+ThreadX fully manages standard and vectored IRQ interrupts. ThreadX also supports
nested IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.S:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -301,7 +301,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -314,7 +314,7 @@ __tx_irq_processing_return:
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.S:
.global __tx_irq_example_handler
@@ -324,12 +324,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} @ Save some scratch registers
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other scratch registers
BL _tx_thread_vectored_context_save @ Call the vectored IRQ context save
@
@ /* At this point execution is still in the IRQ mode. The CPSR, point of
-@ interrupt, and all C scratch registers are available for use. Note
+@ interrupt, and all C scratch registers are available for use. Note
@ that IRQ interrupts are still disabled upon return from the context
@ save function. */
@
@@ -346,22 +346,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.S. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
.global __tx_irq_handler
- .global __tx_irq_processing_return
+ .global __tx_irq_processing_return
__tx_irq_handler:
@
@ /* Jump to context save to save system context. */
@@ -369,10 +369,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
@
@ /* Enable nested IRQ interrupts. NOTE: Since this service returns
-@ with IRQ interrupts enabled, all IRQ interrupt sources must be
+@ with IRQ interrupts enabled, all IRQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-@
+@
@ /* Application ISR call(s) go here! */
@
@ /* Disable nested IRQ interrupts. The mode is switched back to
@@ -385,12 +385,12 @@ __tx_irq_processing_return:
7.3 FIQ Interrupts
-By default, FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of each thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of each thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.S.
@@ -399,7 +399,7 @@ from default FIQ ISRs, which is located in tx_initialize_low_level.S.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.S:
@@ -427,18 +427,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
+The SYS mode stack is used during the SYS mode operation, which was
setup in tx_initialize_low_level.S. When nested FIQ interrupts are no longer required,
calling the _tx_thread_fiq_nesting_end service disables nesting by disabling
-FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -454,7 +454,7 @@ __tx_fiq_processing_return:
@ interrupt, and all C scratch registers are available for use. */
@
@ /* Enable nested FIQ interrupts. NOTE: Since this service returns
-@ with FIQ interrupts enabled, all FIQ interrupt sources must be
+@ with FIQ interrupts enabled, all FIQ interrupt sources must be
@ cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@
@@ -470,12 +470,12 @@ __tx_fiq_processing_return:
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
-interrupt source, these services are not functional but the remainder of
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
+interrupt source, these services are not functional but the remainder of
ThreadX will still run.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.S for the demonstration system.
diff --git a/ports/cortex_r5/gnu/src/tx_thread_context_restore.S b/ports/cortex_r5/gnu/src/tx_thread_context_restore.S
index 4f3721cb..c8c28acb 100644
--- a/ports/cortex_r5/gnu/src/tx_thread_context_restore.S
+++ b/ports/cortex_r5/gnu/src/tx_thread_context_restore.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -43,48 +43,42 @@ IRQ_MODE = 0x92 @ Disable IRQ, IRQ mode
@
@/* No 16-bit Thumb mode veneer code is needed for _tx_thread_context_restore
@ since it will never be called 16-bit mode. */
-@
+@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_context_restore Cortex-R5/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_context_restore Cortex-R5/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function restores the interrupt context if it is processing a */
-@/* nested interrupt. If not, it returns to the interrupt thread if no */
-@/* preemption is necessary. Otherwise, if preemption is necessary or */
-@/* if no thread was running, the function returns to the scheduler. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_schedule Thread scheduling routine */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs Interrupt Service Routines */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function restores the interrupt context if it is processing a */
+@/* nested interrupt. If not, it returns to the interrupt thread if no */
+@/* preemption is necessary. Otherwise, if preemption is necessary or */
+@/* if no thread was running, the function returns to the scheduler. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_schedule Thread scheduling routine */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs Interrupt Service Routines */
@/* */
@/**************************************************************************/
@VOID _tx_thread_context_restore(VOID)
@@ -115,13 +109,13 @@ _tx_thread_context_restore:
LDR r3, =_tx_thread_system_state @ Pickup address of system state variable
LDR r2, [r3] @ Pickup system state
SUB r2, r2, #1 @ Decrement the counter
- STR r2, [r3] @ Store the counter
+ STR r2, [r3] @ Store the counter
CMP r2, #0 @ Was this the first interrupt?
BEQ __tx_thread_not_nested_restore @ If so, not a nested restore
@
@ /* Interrupts are nested. */
@
-@ /* Just recover the saved registers and return to the point of
+@ /* Just recover the saved registers and return to the point of
@ interrupt. */
@
LDMIA sp!, {r0, r10, r12, lr} @ Recover SPSR, POI, and scratch regs
diff --git a/ports/cortex_r5/gnu/src/tx_thread_context_save.S b/ports/cortex_r5/gnu/src/tx_thread_context_save.S
index 8806203d..12434186 100644
--- a/ports/cortex_r5/gnu/src/tx_thread_context_save.S
+++ b/ports/cortex_r5/gnu/src/tx_thread_context_save.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -30,47 +30,41 @@
@
@/* No 16-bit Thumb mode veneer code is needed for _tx_thread_context_save
@ since it will never be called 16-bit mode. */
-@
+@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_context_save Cortex-R5/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_context_save Cortex-R5/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function saves the context of an executing thread in the */
-@/* beginning of interrupt processing. The function also ensures that */
-@/* the system stack is used upon return to the calling ISR. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function saves the context of an executing thread in the */
+@/* beginning of interrupt processing. The function also ensures that */
+@/* the system stack is used upon return to the calling ISR. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_context_save(VOID)
@@ -86,7 +80,7 @@ _tx_thread_context_save:
@ if (_tx_thread_system_state++)
@ {
@
- STMDB sp!, {r0-r3} @ Save some working registers
+ STMDB sp!, {r0-r3} @ Save some working registers
#ifdef TX_ENABLE_FIQ_SUPPORT
CPSID if @ Disable FIQ interrupts
#endif
@@ -104,7 +98,7 @@ _tx_thread_context_save:
@ calling ISR. */
@
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other registers
@
@ /* Return to the ISR. */
@@ -120,7 +114,7 @@ _tx_thread_context_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_irq_processing_return @ Continue IRQ processing
+ B __tx_irq_processing_return @ Continue IRQ processing
@
__tx_thread_not_nested_save:
@ }
@@ -134,13 +128,13 @@ __tx_thread_not_nested_save:
LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread ptr
LDR r0, [r1] @ Pickup current thread pointer
CMP r0, #0 @ Is it NULL?
- BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
@ scheduling loop - nothing needs saving!
@
@ /* Save minimal context of interrupted thread. */
@
MRS r2, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} @ Store other registers
@
@ /* Save the current stack pointer in the thread's control block. */
@@ -160,7 +154,7 @@ __tx_thread_not_nested_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_irq_processing_return @ Continue IRQ processing
+ B __tx_irq_processing_return @ Continue IRQ processing
@
@ }
@ else
@@ -170,7 +164,7 @@ __tx_thread_idle_system_save:
@
@ /* Interrupt occurred in the scheduling loop. */
@
-@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
+@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
@ processing. */
@
MOV r10, #0 @ Clear stack limit
@@ -185,7 +179,7 @@ __tx_thread_idle_system_save:
#endif
ADD sp, sp, #16 @ Recover saved registers
- B __tx_irq_processing_return @ Continue IRQ processing
+ B __tx_irq_processing_return @ Continue IRQ processing
@
@ }
@}
diff --git a/ports/cortex_r5/gnu/src/tx_thread_fiq_context_restore.S b/ports/cortex_r5/gnu/src/tx_thread_fiq_context_restore.S
index 5d1c2cc8..5ebe4ac4 100644
--- a/ports/cortex_r5/gnu/src/tx_thread_fiq_context_restore.S
+++ b/ports/cortex_r5/gnu/src/tx_thread_fiq_context_restore.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -24,7 +24,7 @@
SVC_MODE = 0xD3 @ SVC mode
FIQ_MODE = 0xD1 @ FIQ mode
-MODE_MASK = 0x1F @ Mode mask
+MODE_MASK = 0x1F @ Mode mask
THUMB_MASK = 0x20 @ Thumb bit mask
IRQ_MODE_BITS = 0x12 @ IRQ mode bits
@
@@ -45,44 +45,38 @@ IRQ_MODE_BITS = 0x12 @ IRQ mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_context_restore Cortex-R5/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_context_restore Cortex-R5/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function restores the fiq interrupt context when processing a */
-@/* nested interrupt. If not, it returns to the interrupt thread if no */
-@/* preemption is necessary. Otherwise, if preemption is necessary or */
-@/* if no thread was running, the function returns to the scheduler. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_schedule Thread scheduling routine */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* FIQ ISR Interrupt Service Routines */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function restores the fiq interrupt context when processing a */
+@/* nested interrupt. If not, it returns to the interrupt thread if no */
+@/* preemption is necessary. Otherwise, if preemption is necessary or */
+@/* if no thread was running, the function returns to the scheduler. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_schedule Thread scheduling routine */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* FIQ ISR Interrupt Service Routines */
@/* */
@/**************************************************************************/
@VOID _tx_thread_fiq_context_restore(VOID)
@@ -109,13 +103,13 @@ _tx_thread_fiq_context_restore:
LDR r3, =_tx_thread_system_state @ Pickup address of system state variable
LDR r2, [r3] @ Pickup system state
SUB r2, r2, #1 @ Decrement the counter
- STR r2, [r3] @ Store the counter
+ STR r2, [r3] @ Store the counter
CMP r2, #0 @ Was this the first interrupt?
BEQ __tx_thread_fiq_not_nested_restore @ If so, not a nested restore
@
@ /* Interrupts are nested. */
@
-@ /* Just recover the saved registers and return to the point of
+@ /* Just recover the saved registers and return to the point of
@ interrupt. */
@
LDMIA sp!, {r0, r10, r12, lr} @ Recover SPSR, POI, and scratch regs
@@ -203,7 +197,7 @@ __tx_thread_fiq_preempt_restore:
BEQ __tx_thread_fiq_dont_save_ts @ No, don't save it
@
@ _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
-@ _tx_timer_time_slice = 0;
+@ _tx_timer_time_slice = 0;
@
STR r2, [r0, #24] @ Save thread's time-slice
MOV r2, #0 @ Clear value
diff --git a/ports/cortex_r5/gnu/src/tx_thread_fiq_context_save.S b/ports/cortex_r5/gnu/src/tx_thread_fiq_context_save.S
index 6c94dc91..ccd30f3d 100644
--- a/ports/cortex_r5/gnu/src/tx_thread_fiq_context_save.S
+++ b/ports/cortex_r5/gnu/src/tx_thread_fiq_context_save.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -34,43 +34,37 @@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_context_save Cortex-R5/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_context_save Cortex-R5/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function saves the context of an executing thread in the */
-@/* beginning of interrupt processing. The function also ensures that */
-@/* the system stack is used upon return to the calling ISR. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function saves the context of an executing thread in the */
+@/* beginning of interrupt processing. The function also ensures that */
+@/* the system stack is used upon return to the calling ISR. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@ VOID _tx_thread_fiq_context_save(VOID)
@@ -86,7 +80,7 @@ _tx_thread_fiq_context_save:
@ if (_tx_thread_system_state++)
@ {
@
- STMDB sp!, {r0-r3} @ Save some working registers
+ STMDB sp!, {r0-r3} @ Save some working registers
LDR r3, =_tx_thread_system_state @ Pickup address of system state variable
LDR r2, [r3] @ Pickup system state
CMP r2, #0 @ Is this the first interrupt?
@@ -101,7 +95,7 @@ _tx_thread_fiq_context_save:
@ calling ISR. */
@
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} @ Store other registers
@
@ /* Return to the ISR. */
@@ -117,38 +111,38 @@ _tx_thread_fiq_context_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_fiq_processing_return @ Continue FIQ processing
+ B __tx_fiq_processing_return @ Continue FIQ processing
@
__tx_thread_fiq_not_nested_save:
-@ }
+@ }
@
@ /* Otherwise, not nested, check to see if a thread was running. */
@ else if (_tx_thread_current_ptr)
-@ {
+@ {
@
ADD r2, r2, #1 @ Increment the interrupt counter
STR r2, [r3] @ Store it back in the variable
LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread ptr
LDR r0, [r1] @ Pickup current thread pointer
CMP r0, #0 @ Is it NULL?
- BEQ __tx_thread_fiq_idle_system_save @ If so, interrupt occurred in
-@ @ scheduling loop - nothing needs saving!
+ BEQ __tx_thread_fiq_idle_system_save @ If so, interrupt occurred in
+@ @ scheduling loop - nothing needs saving!
@
@ /* Save minimal context of interrupted thread. */
@
MRS r2, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r2, lr} @ Store other registers, Note that we don't
-@ @ need to save sl and ip since FIQ has
-@ @ copies of these registers. Nested
+@ @ need to save sl and ip since FIQ has
+@ @ copies of these registers. Nested
@ @ interrupt processing does need to save
@ @ these registers.
@
@ /* Save the current stack pointer in the thread's control block. */
-@ _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+@ _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
@
@ /* Switch to the system stack. */
-@ sp = _tx_thread_system_stack_ptr;
+@ sp = _tx_thread_system_stack_ptr;
@
MOV r10, #0 @ Clear stack limit
@@ -161,7 +155,7 @@ __tx_thread_fiq_not_nested_save:
POP {lr} @ Recover ISR lr
#endif
- B __tx_fiq_processing_return @ Continue FIQ processing
+ B __tx_fiq_processing_return @ Continue FIQ processing
@
@ }
@ else
@@ -181,16 +175,16 @@ __tx_thread_fiq_idle_system_save:
#endif
@
@ /* Not much to do here, save the current SPSR and LR for possible
-@ use in IRQ interrupted in idle system conditions, and return to
+@ use in IRQ interrupted in idle system conditions, and return to
@ FIQ interrupt processing. */
@
MRS r0, SPSR @ Pickup saved SPSR
- SUB lr, lr, #4 @ Adjust point of interrupt
+ SUB lr, lr, #4 @ Adjust point of interrupt
STMDB sp!, {r0, lr} @ Store other registers that will get used
-@ @ or stripped off the stack in context
-@ @ restore
- B __tx_fiq_processing_return @ Continue FIQ processing
+@ @ or stripped off the stack in context
+@ @ restore
+ B __tx_fiq_processing_return @ Continue FIQ processing
@
@ }
-@}
+@}
diff --git a/ports/cortex_r5/gnu/src/tx_thread_fiq_nesting_end.S b/ports/cortex_r5/gnu/src/tx_thread_fiq_nesting_end.S
index 752d6e63..4f9e04e3 100644
--- a/ports/cortex_r5/gnu/src/tx_thread_fiq_nesting_end.S
+++ b/ports/cortex_r5/gnu/src/tx_thread_fiq_nesting_end.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -27,7 +27,7 @@ DISABLE_INTS = 0xC0 @ Disable IRQ/FIQ interrupts
#else
DISABLE_INTS = 0x80 @ Disable IRQ interrupts
#endif
-MODE_MASK = 0x1F @ Mode mask
+MODE_MASK = 0x1F @ Mode mask
FIQ_MODE_BITS = 0x11 @ FIQ mode bits
@
@
@@ -37,51 +37,45 @@ FIQ_MODE_BITS = 0x11 @ FIQ mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_nesting_end Cortex-R5/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_nesting_end Cortex-R5/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from FIQ mode after */
-@/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
-@/* processing from system mode back to FIQ mode prior to the ISR */
-@/* calling _tx_thread_fiq_context_restore. Note that this function */
-@/* assumes the system stack pointer is in the same position after */
-@/* nesting start function was called. */
-@/* */
-@/* This function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with FIQ interrupts disabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is called by the application from FIQ mode after */
+@/* _tx_thread_fiq_nesting_start has been called and switches the FIQ */
+@/* processing from system mode back to FIQ mode prior to the ISR */
+@/* calling _tx_thread_fiq_context_restore. Note that this function */
+@/* assumes the system stack pointer is in the same position after */
+@/* nesting start function was called. */
+@/* */
+@/* This function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with FIQ interrupts disabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_fiq_nesting_end(VOID)
@@ -93,7 +87,7 @@ _tx_thread_fiq_nesting_end:
MRS r0, CPSR @ Pickup the CPSR
ORR r0, r0, #DISABLE_INTS @ Build disable interrupt value
MSR CPSR_c, r0 @ Disable interrupts
- LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
@ 8-byte alignment logic)
BIC r0, r0, #MODE_MASK @ Clear mode bits
ORR r0, r0, #FIQ_MODE_BITS @ Build IRQ mode CPSR
diff --git a/ports/cortex_r5/gnu/src/tx_thread_fiq_nesting_start.S b/ports/cortex_r5/gnu/src/tx_thread_fiq_nesting_start.S
index f013cc3a..58eddaf4 100644
--- a/ports/cortex_r5/gnu/src/tx_thread_fiq_nesting_start.S
+++ b/ports/cortex_r5/gnu/src/tx_thread_fiq_nesting_start.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -33,48 +33,42 @@ SYS_MODE_BITS = 0x1F @ System mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_fiq_nesting_start Cortex-R5/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_fiq_nesting_start Cortex-R5/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from FIQ mode after */
-@/* _tx_thread_fiq_context_save has been called and switches the FIQ */
-@/* processing to the system mode so nested FIQ interrupt processing */
-@/* is possible (system mode has its own "lr" register). Note that */
-@/* this function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with FIQ interrupts enabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is called by the application from FIQ mode after */
+@/* _tx_thread_fiq_context_save has been called and switches the FIQ */
+@/* processing to the system mode so nested FIQ interrupt processing */
+@/* is possible (system mode has its own "lr" register). Note that */
+@/* this function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with FIQ interrupts enabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_fiq_nesting_start(VOID)
diff --git a/ports/cortex_r5/gnu/src/tx_thread_interrupt_control.S b/ports/cortex_r5/gnu/src/tx_thread_interrupt_control.S
index 7ef4c98d..babf7690 100644
--- a/ports/cortex_r5/gnu/src/tx_thread_interrupt_control.S
+++ b/ports/cortex_r5/gnu/src/tx_thread_interrupt_control.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -35,7 +35,7 @@ INT_MASK = 0x03F
$_tx_thread_interrupt_control:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_interrupt_control @ Call _tx_thread_interrupt_control function
@@ -45,42 +45,36 @@ $_tx_thread_interrupt_control:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_interrupt_control Cortex-R5/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_interrupt_control Cortex-R5/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is responsible for changing the interrupt lockout */
-@/* posture of the system. */
-@/* */
-@/* INPUT */
-@/* */
-@/* new_posture New interrupt lockout posture */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* old_posture Old interrupt lockout posture */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* Application Code */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is responsible for changing the interrupt lockout */
+@/* posture of the system. */
+@/* */
+@/* INPUT */
+@/* */
+@/* new_posture New interrupt lockout posture */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* old_posture Old interrupt lockout posture */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* Application Code */
@/* */
@/**************************************************************************/
@UINT _tx_thread_interrupt_control(UINT new_posture)
diff --git a/ports/cortex_r5/gnu/src/tx_thread_interrupt_disable.S b/ports/cortex_r5/gnu/src/tx_thread_interrupt_disable.S
index 00b10b7d..98daf99e 100644
--- a/ports/cortex_r5/gnu/src/tx_thread_interrupt_disable.S
+++ b/ports/cortex_r5/gnu/src/tx_thread_interrupt_disable.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -31,7 +31,7 @@
$_tx_thread_interrupt_disable:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_interrupt_disable @ Call _tx_thread_interrupt_disable function
@@ -41,41 +41,35 @@ $_tx_thread_interrupt_disable:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_interrupt_disable Cortex-R5/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_interrupt_disable Cortex-R5/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is responsible for disabling interrupts */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* old_posture Old interrupt lockout posture */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* Application Code */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is responsible for disabling interrupts */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* old_posture Old interrupt lockout posture */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* Application Code */
@/* */
@/**************************************************************************/
@UINT _tx_thread_interrupt_disable(void)
@@ -93,7 +87,7 @@ _tx_thread_interrupt_disable:
#ifdef TX_ENABLE_FIQ_SUPPORT
CPSID if @ Disable IRQ and FIQ
#else
- CPSID i @ Disable IRQ
+ CPSID i @ Disable IRQ
#endif
#ifdef __THUMB_INTERWORK
diff --git a/ports/cortex_r5/gnu/src/tx_thread_interrupt_restore.S b/ports/cortex_r5/gnu/src/tx_thread_interrupt_restore.S
index 8e510f15..44134fa4 100644
--- a/ports/cortex_r5/gnu/src/tx_thread_interrupt_restore.S
+++ b/ports/cortex_r5/gnu/src/tx_thread_interrupt_restore.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -31,7 +31,7 @@
$_tx_thread_interrupt_restore:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_interrupt_restore @ Call _tx_thread_interrupt_restore function
@@ -41,42 +41,36 @@ $_tx_thread_interrupt_restore:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_interrupt_restore Cortex-R5/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_interrupt_restore Cortex-R5/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
+@/* */
@/* This function is responsible for restoring interrupts to the state */
@/* returned by a previous _tx_thread_interrupt_disable call. */
-@/* */
-@/* INPUT */
-@/* */
-@/* old_posture Old interrupt lockout posture */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* Application Code */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* INPUT */
+@/* */
+@/* old_posture Old interrupt lockout posture */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* Application Code */
@/* */
@/**************************************************************************/
@UINT _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/cortex_r5/gnu/src/tx_thread_irq_nesting_end.S b/ports/cortex_r5/gnu/src/tx_thread_irq_nesting_end.S
index 61edbd15..5099bf15 100644
--- a/ports/cortex_r5/gnu/src/tx_thread_irq_nesting_end.S
+++ b/ports/cortex_r5/gnu/src/tx_thread_irq_nesting_end.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -27,7 +27,7 @@ DISABLE_INTS = 0xC0 @ Disable IRQ/FIQ interrupts
#else
DISABLE_INTS = 0x80 @ Disable IRQ interrupts
#endif
-MODE_MASK = 0x1F @ Mode mask
+MODE_MASK = 0x1F @ Mode mask
IRQ_MODE_BITS = 0x12 @ IRQ mode bits
@
@
@@ -37,51 +37,45 @@ IRQ_MODE_BITS = 0x12 @ IRQ mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_irq_nesting_end Cortex-R5/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_irq_nesting_end Cortex-R5/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from IRQ mode after */
-@/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-@/* processing from system mode back to IRQ mode prior to the ISR */
-@/* calling _tx_thread_context_restore. Note that this function */
-@/* assumes the system stack pointer is in the same position after */
-@/* nesting start function was called. */
-@/* */
-@/* This function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with IRQ interrupts disabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is called by the application from IRQ mode after */
+@/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+@/* processing from system mode back to IRQ mode prior to the ISR */
+@/* calling _tx_thread_context_restore. Note that this function */
+@/* assumes the system stack pointer is in the same position after */
+@/* nesting start function was called. */
+@/* */
+@/* This function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with IRQ interrupts disabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_irq_nesting_end(VOID)
@@ -93,7 +87,7 @@ _tx_thread_irq_nesting_end:
MRS r0, CPSR @ Pickup the CPSR
ORR r0, r0, #DISABLE_INTS @ Build disable interrupt value
MSR CPSR_c, r0 @ Disable interrupts
- LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
+ LDMIA sp!, {r1, lr} @ Pickup saved lr (and r1 throw-away for
@ 8-byte alignment logic)
BIC r0, r0, #MODE_MASK @ Clear mode bits
ORR r0, r0, #IRQ_MODE_BITS @ Build IRQ mode CPSR
diff --git a/ports/cortex_r5/gnu/src/tx_thread_irq_nesting_start.S b/ports/cortex_r5/gnu/src/tx_thread_irq_nesting_start.S
index b547290c..2fb5733f 100644
--- a/ports/cortex_r5/gnu/src/tx_thread_irq_nesting_start.S
+++ b/ports/cortex_r5/gnu/src/tx_thread_irq_nesting_start.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -33,48 +33,42 @@ SYS_MODE_BITS = 0x1F @ System mode bits
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_irq_nesting_start Cortex-R5/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_irq_nesting_start Cortex-R5/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is called by the application from IRQ mode after */
-@/* _tx_thread_context_save has been called and switches the IRQ */
-@/* processing to the system mode so nested IRQ interrupt processing */
-@/* is possible (system mode has its own "lr" register). Note that */
-@/* this function assumes that the system mode stack pointer was setup */
-@/* during low-level initialization (tx_initialize_low_level.s). */
-@/* */
-@/* This function returns with IRQ interrupts enabled. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is called by the application from IRQ mode after */
+@/* _tx_thread_context_save has been called and switches the IRQ */
+@/* processing to the system mode so nested IRQ interrupt processing */
+@/* is possible (system mode has its own "lr" register). Note that */
+@/* this function assumes that the system mode stack pointer was setup */
+@/* during low-level initialization (tx_initialize_low_level.s). */
+@/* */
+@/* This function returns with IRQ interrupts enabled. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/cortex_r5/gnu/src/tx_thread_schedule.S b/ports/cortex_r5/gnu/src/tx_thread_schedule.S
index 011af480..e19265f5 100644
--- a/ports/cortex_r5/gnu/src/tx_thread_schedule.S
+++ b/ports/cortex_r5/gnu/src/tx_thread_schedule.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -38,7 +38,7 @@
$_tx_thread_schedule:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_schedule @ Call _tx_thread_schedule function
@@ -48,45 +48,39 @@ $_tx_thread_schedule:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_schedule Cortex-R5/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_schedule Cortex-R5/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function waits for a thread control block pointer to appear in */
-@/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-@/* in the variable, the corresponding thread is resumed. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* _tx_initialize_kernel_enter ThreadX entry function */
-@/* _tx_thread_system_return Return to system from thread */
-@/* _tx_thread_context_restore Restore thread's context */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function waits for a thread control block pointer to appear in */
+@/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+@/* in the variable, the corresponding thread is resumed. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* _tx_initialize_kernel_enter ThreadX entry function */
+@/* _tx_thread_system_return Return to system from thread */
+@/* _tx_thread_context_restore Restore thread's context */
@/* */
@/**************************************************************************/
@VOID _tx_thread_schedule(VOID)
@@ -116,7 +110,7 @@ __tx_thread_schedule_loop:
@
@ }
@ while(_tx_thread_execute_ptr == TX_NULL);
-@
+@
@ /* Yes! We have a thread to execute. Lockout interrupts and
@ transfer control to it. */
@
@@ -129,7 +123,7 @@ __tx_thread_schedule_loop:
@ /* Setup the current thread pointer. */
@ _tx_thread_current_ptr = _tx_thread_execute_ptr;
@
- LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread
STR r0, [r1] @ Setup current thread pointer
@
@ /* Increment the run count for this thread. */
@@ -143,7 +137,7 @@ __tx_thread_schedule_loop:
@ /* Setup time-slice, if present. */
@ _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
@
- LDR r2, =_tx_timer_time_slice @ Pickup address of time-slice
+ LDR r2, =_tx_timer_time_slice @ Pickup address of time-slice
@ variable
LDR sp, [r0, #8] @ Switch stack pointers
STR r3, [r2] @ Setup time-slice
diff --git a/ports/cortex_r5/gnu/src/tx_thread_stack_build.S b/ports/cortex_r5/gnu/src/tx_thread_stack_build.S
index 0bcc63ed..f586573b 100644
--- a/ports/cortex_r5/gnu/src/tx_thread_stack_build.S
+++ b/ports/cortex_r5/gnu/src/tx_thread_stack_build.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -42,7 +42,7 @@ CPSR_MASK = 0x9F @ Mask initial CPSR, IRQ interru
.type $_tx_thread_stack_build,function
$_tx_thread_stack_build:
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_stack_build @ Call _tx_thread_stack_build function
@@ -52,44 +52,38 @@ $_tx_thread_stack_build:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_stack_build Cortex-R5/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_stack_build Cortex-R5/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
+@/* */
@/* This function builds a stack frame on the supplied thread's stack. */
@/* The stack frame results in a fake interrupt return to the supplied */
-@/* function pointer. */
-@/* */
-@/* INPUT */
-@/* */
+@/* function pointer. */
+@/* */
+@/* INPUT */
+@/* */
@/* thread_ptr Pointer to thread control blk */
@/* function_ptr Pointer to return function */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* _tx_thread_create Create thread service */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* _tx_thread_create Create thread service */
@/* */
@/**************************************************************************/
@VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -98,10 +92,10 @@ $_tx_thread_stack_build:
.type _tx_thread_stack_build,function
_tx_thread_stack_build:
@
-@
+@
@ /* Build a fake interrupt frame. The form of the fake interrupt stack
@ on the ARM9 should look like the following after it is built:
-@
+@
@ Stack Top: 1 Interrupt stack frame type
@ CPSR Initial value for CPSR
@ a1 (r0) Initial value for a1
diff --git a/ports/cortex_r5/gnu/src/tx_thread_system_return.S b/ports/cortex_r5/gnu/src/tx_thread_system_return.S
index 77cf89d5..0144b037 100644
--- a/ports/cortex_r5/gnu/src/tx_thread_system_return.S
+++ b/ports/cortex_r5/gnu/src/tx_thread_system_return.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -42,7 +42,7 @@
$_tx_thread_system_return:
.thumb
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_thread_system_return @ Call _tx_thread_system_return function
@@ -52,44 +52,38 @@ $_tx_thread_system_return:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_system_return Cortex-R5/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_system_return Cortex-R5/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function is target processor specific. It is used to transfer */
-@/* control from a thread back to the ThreadX system. Only a */
-@/* minimal context is saved since the compiler assumes temp registers */
-@/* are going to get slicked by a function call anyway. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_schedule Thread scheduling loop */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ThreadX components */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function is target processor specific. It is used to transfer */
+@/* control from a thread back to the ThreadX system. Only a */
+@/* minimal context is saved since the compiler assumes temp registers */
+@/* are going to get slicked by a function call anyway. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_schedule Thread scheduling loop */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ThreadX components */
@/* */
@/**************************************************************************/
@VOID _tx_thread_system_return(VOID)
@@ -124,7 +118,7 @@ _tx_skip_solicited_vfp_save:
@
MOV r0, #0 @ Build a solicited stack type
STMDB sp!, {r0-r1} @ Save type and CPSR
-@
+@
@
#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
@
diff --git a/ports/cortex_r5/gnu/src/tx_thread_vectored_context_save.S b/ports/cortex_r5/gnu/src/tx_thread_vectored_context_save.S
index 96e58d4f..e985f24f 100644
--- a/ports/cortex_r5/gnu/src/tx_thread_vectored_context_save.S
+++ b/ports/cortex_r5/gnu/src/tx_thread_vectored_context_save.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Thread */
@/** */
@@ -30,47 +30,41 @@
@
@/* No 16-bit Thumb mode veneer code is needed for _tx_thread_vectored_context_save
@ since it will never be called 16-bit mode. */
-@
+@
.arm
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_thread_vectored_context_save Cortex-R5/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_thread_vectored_context_save Cortex-R5/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function saves the context of an executing thread in the */
-@/* beginning of interrupt processing. The function also ensures that */
-@/* the system stack is used upon return to the calling ISR. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* None */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* ISRs */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function saves the context of an executing thread in the */
+@/* beginning of interrupt processing. The function also ensures that */
+@/* the system stack is used upon return to the calling ISR. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* None */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* ISRs */
@/* */
@/**************************************************************************/
@VOID _tx_thread_vectored_context_save(VOID)
@@ -128,7 +122,7 @@ __tx_thread_not_nested_save:
LDR r1, =_tx_thread_current_ptr @ Pickup address of current thread ptr
LDR r0, [r1, #0] @ Pickup current thread pointer
CMP r0, #0 @ Is it NULL?
- BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
+ BEQ __tx_thread_idle_system_save @ If so, interrupt occurred in
@ scheduling loop - nothing needs saving!
@
@ /* Note: Minimal context of interrupted thread is already saved. */
@@ -160,7 +154,7 @@ __tx_thread_idle_system_save:
@
@ /* Interrupt occurred in the scheduling loop. */
@
-@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
+@ /* Not much to do here, just adjust the stack pointer, and return to IRQ
@ processing. */
@
MOV r10, #0 @ Clear stack limit
diff --git a/ports/cortex_r5/gnu/src/tx_timer_interrupt.S b/ports/cortex_r5/gnu/src/tx_timer_interrupt.S
index b5d2553a..87715017 100644
--- a/ports/cortex_r5/gnu/src/tx_timer_interrupt.S
+++ b/ports/cortex_r5/gnu/src/tx_timer_interrupt.S
@@ -1,18 +1,18 @@
@/***************************************************************************
-@ * Copyright (c) 2024 Microsoft Corporation
-@ *
+@ * Copyright (c) 2024 Microsoft Corporation
+@ *
@ * This program and the accompanying materials are made available under the
@ * terms of the MIT License which is available at
@ * https://opensource.org/licenses/MIT.
-@ *
+@ *
@ * SPDX-License-Identifier: MIT
@ **************************************************************************/
@
@
@/**************************************************************************/
@/**************************************************************************/
-@/** */
-@/** ThreadX Component */
+@/** */
+@/** ThreadX Component */
@/** */
@/** Timer */
@/** */
@@ -48,7 +48,7 @@
.type $_tx_timer_interrupt,function
$_tx_timer_interrupt:
BX pc @ Switch to 32-bit mode
- NOP @
+ NOP @
.arm
STMFD sp!, {lr} @ Save return address
BL _tx_timer_interrupt @ Call _tx_timer_interrupt function
@@ -58,46 +58,40 @@ $_tx_timer_interrupt:
@
.text
.align 2
-@/**************************************************************************/
-@/* */
-@/* FUNCTION RELEASE */
-@/* */
-@/* _tx_timer_interrupt Cortex-R5/GNU */
+@/**************************************************************************/
+@/* */
+@/* FUNCTION RELEASE */
+@/* */
+@/* _tx_timer_interrupt Cortex-R5/GNU */
@/* 6.1 */
@/* AUTHOR */
@/* */
@/* William E. Lamie, Microsoft Corporation */
@/* */
@/* DESCRIPTION */
-@/* */
-@/* This function processes the hardware timer interrupt. This */
-@/* processing includes incrementing the system clock and checking for */
-@/* time slice and/or timer expiration. If either is found, the */
-@/* interrupt context save/restore functions are called along with the */
-@/* expiration functions. */
-@/* */
-@/* INPUT */
-@/* */
-@/* None */
-@/* */
-@/* OUTPUT */
-@/* */
-@/* None */
-@/* */
-@/* CALLS */
-@/* */
-@/* _tx_thread_time_slice Time slice interrupted thread */
-@/* _tx_timer_expiration_process Timer expiration processing */
-@/* */
-@/* CALLED BY */
-@/* */
-@/* interrupt vector */
-@/* */
-@/* RELEASE HISTORY */
-@/* */
-@/* DATE NAME DESCRIPTION */
@/* */
-@/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+@/* This function processes the hardware timer interrupt. This */
+@/* processing includes incrementing the system clock and checking for */
+@/* time slice and/or timer expiration. If either is found, the */
+@/* interrupt context save/restore functions are called along with the */
+@/* expiration functions. */
+@/* */
+@/* INPUT */
+@/* */
+@/* None */
+@/* */
+@/* OUTPUT */
+@/* */
+@/* None */
+@/* */
+@/* CALLS */
+@/* */
+@/* _tx_thread_time_slice Time slice interrupted thread */
+@/* _tx_timer_expiration_process Timer expiration processing */
+@/* */
+@/* CALLED BY */
+@/* */
+@/* interrupt vector */
@/* */
@/**************************************************************************/
@VOID _tx_timer_interrupt(VOID)
@@ -122,7 +116,7 @@ _tx_timer_interrupt:
@ if (_tx_timer_time_slice)
@ {
@
- LDR r3, =_tx_timer_time_slice @ Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice @ Pickup address of time-slice
LDR r2, [r3] @ Pickup time-slice
CMP r2, #0 @ Is it non-active?
BEQ __tx_timer_no_time_slice @ Yes, skip time-slice processing
@@ -240,7 +234,7 @@ __tx_timer_dont_activate:
@ if (_tx_timer_expired_time_slice)
@ {
@
- LDR r3, =_tx_timer_expired_time_slice @ Pickup address of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice @ Pickup address of time-slice expired
LDR r2, [r3] @ Pickup the actual flag
CMP r2, #0 @ See if the flag is set
BEQ __tx_timer_not_ts_expiration @ No, skip time-slice processing
diff --git a/ports/cortex_r5/iar/example_build/sample_threadx.c b/ports/cortex_r5/iar/example_build/sample_threadx.c
index 983109cc..ca92ff86 100644
--- a/ports/cortex_r5/iar/example_build/sample_threadx.c
+++ b/ports/cortex_r5/iar/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -63,7 +63,7 @@ void thread_6_and_7_entry(ULONG thread_input);
int main()
{
-
+
/* Enter the ThreadX kernel. */
tx_kernel_enter();
}
@@ -87,42 +87,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -130,23 +130,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -249,11 +249,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -312,7 +312,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -365,7 +365,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/cortex_r5/iar/example_build/tx_initialize_low_level.s b/ports/cortex_r5/iar/example_build/tx_initialize_low_level.s
index 745a9d19..680aeb6d 100644
--- a/ports/cortex_r5/iar/example_build/tx_initialize_low_level.s
+++ b/ports/cortex_r5/iar/example_build/tx_initialize_low_level.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Initialize */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Initialize */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -52,7 +52,7 @@ SVC_MODE DEFINE 0x13 ; SVC mode
;
;
;
-;/* Define the FREE_MEM segment that will specify where free memory is
+;/* Define the FREE_MEM segment that will specify where free memory is
; defined. This must also be located in at the end of other RAM segments
; in the linker control file. The value of this segment is what is passed
; to tx_application_define. */
@@ -65,45 +65,39 @@ __tx_free_memory_start
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_initialize_low_level Cortex-R5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_initialize_low_level Cortex-R5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for any low-level processor */
-;/* initialization, including setting up interrupt vectors, setting */
-;/* up a periodic timer interrupt source, saving the system stack */
-;/* pointer for use in ISR processing later, and finding the first */
-;/* available RAM memory address for tx_application_define. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for any low-level processor */
+;/* initialization, including setting up interrupt vectors, setting */
+;/* up a periodic timer interrupt source, saving the system stack */
+;/* pointer for use in ISR processing later, and finding the first */
+;/* available RAM memory address for tx_application_define. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
;/* */
;/**************************************************************************/
;VOID _tx_initialize_low_level(VOID)
@@ -135,7 +129,7 @@ _tx_initialize_low_level
;
LDR r2, =_tx_initialize_unused_memory ; Pickup unused memory ptr address
STR r0, [r2, #0] ; Save first free memory address
-;
+;
; /* Setup Timer for periodic interrupts. */
;
; /* Done, return to caller. */
@@ -183,17 +177,17 @@ IRQ_Handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_start
@@ -208,7 +202,7 @@ __tx_irq_processing_return
; /* Application IRQ handlers can be called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
#ifdef TX_ENABLE_IRQ_NESTING
BL _tx_thread_irq_nesting_end
@@ -227,22 +221,22 @@ __tx_irq_processing_return
; /* Jump to context save to save system context. */
; STMDB sp!, {r0-r3} ; Save some scratch registers
; MRS r0, SPSR ; Pickup saved SPSR
-; SUB lr, lr, #4 ; Adjust point of interrupt
+; SUB lr, lr, #4 ; Adjust point of interrupt
; STMDB sp!, {r0, r10, r12, lr} ; Store other registers
; BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. In
+; interrupt, and all C scratch registers are available for use. In
; addition, IRQ interrupts may be re-enabled - with certain restrictions -
; if nested IRQ interrupts are desired. Interrupts may be re-enabled over
-; small code sequences where lr is saved before enabling interrupts and
+; small code sequences where lr is saved before enabling interrupts and
; restored after interrupts are again disabled. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_start
@@ -251,7 +245,7 @@ __tx_irq_processing_return
; /* Application IRQ handler is called here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;#ifdef TX_ENABLE_IRQ_NESTING
; BL _tx_thread_irq_nesting_end
diff --git a/ports/cortex_r5/iar/inc/tx_port.h b/ports/cortex_r5/iar/inc/tx_port.h
index 77aa6468..eb5e46d9 100644
--- a/ports/cortex_r5/iar/inc/tx_port.h
+++ b/ports/cortex_r5/iar/inc/tx_port.h
@@ -1,17 +1,18 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
+/** */
/** ThreadX Component */
/** */
/** Port Specific */
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Cortex-R5/IAR */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Cortex-R5/IAR */
/* 6.1.6 */
/* */
/* AUTHOR */
@@ -32,24 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 04-02-2021 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.6 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -62,7 +54,7 @@
#ifdef TX_INCLUDE_USER_DEFINE_FILE
-/* Yes, include the user defines in tx_user.h. The defines in this file may
+/* Yes, include the user defines in tx_user.h. The defines in this file may
alternately be defined on the command line. */
#include "tx_user.h"
@@ -79,7 +71,7 @@
#endif
-/* Define ThreadX basic types for this port. */
+/* Define ThreadX basic types for this port. */
#define VOID void
typedef char CHAR;
@@ -115,19 +107,19 @@ typedef unsigned short USHORT;
#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
#endif
-#ifndef TX_TIMER_THREAD_PRIORITY
-#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
#endif
-/* Define various constants for the ThreadX ARM port. */
+/* Define various constants for the ThreadX ARM port. */
#define TX_INT_DISABLE 0x80 /* Disable IRQ interrupts */
#define TX_INT_ENABLE 0x00 /* Enable IRQ interrupts */
-/* Define the clock source for trace event entry time stamp. The following two item are port specific.
- For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
source constants would be:
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
@@ -172,7 +164,7 @@ ULONG _tx_misra_time_stamp_get(VOID);
#endif
-/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
define is negated, thereby forcing the stack fill which is necessary for the stack checking
@@ -186,18 +178,18 @@ ULONG _tx_misra_time_stamp_get(VOID);
/* Define the TX_THREAD control block extensions for this port. The main reason
- for the multiple macros is so that backward compatibility can be maintained with
+ for the multiple macros is so that backward compatibility can be maintained with
existing ThreadX kernel awareness modules. */
-#define TX_THREAD_EXTENSION_0
-#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable; \
- VOID *tx_thread_iar_tls_pointer;
+ VOID *tx_thread_iar_tls_pointer;
#else
#define TX_THREAD_EXTENSION_2 ULONG tx_thread_vfp_enable;
#endif
-#define TX_THREAD_EXTENSION_3
+#define TX_THREAD_EXTENSION_3
/* Define the port extensions of the remaining ThreadX objects. */
@@ -211,11 +203,11 @@ ULONG _tx_misra_time_stamp_get(VOID);
#define TX_TIMER_EXTENSION
-/* Define the user extension field of the thread control block. Nothing
+/* Define the user extension field of the thread control block. Nothing
additional is needed for this port so it is defined as white space. */
#ifndef TX_THREAD_USER_EXTENSION
-#define TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
#endif
@@ -225,23 +217,23 @@ ULONG _tx_misra_time_stamp_get(VOID);
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#if (__VER__ < 8000000)
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = _tx_iar_create_per_thread_tls_area();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {_tx_iar_destroy_per_thread_tls_area(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
-#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
+#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#endif
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
@@ -269,8 +261,8 @@ void __iar_Initlocks(void);
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
-/* Determine if the ARM architecture has the CLZ instruction. This is available on
- architectures v5 and above. If available, redefine the macro for calculating the
+/* Determine if the ARM architecture has the CLZ instruction. This is available on
+ architectures v5 and above. If available, redefine the macro for calculating the
lowest bit set. */
#ifndef TX_DISABLE_INLINE
@@ -281,22 +273,22 @@ void __iar_Initlocks(void);
#define TX_LOWEST_SET_BIT_CALCULATE(m, b) m = m & ((ULONG) (-((LONG) m))); \
b = (UINT) __CLZ(m); \
- b = 31 - b;
+ b = 31 - b;
#endif
#endif
#endif
-/* Define ThreadX interrupt lockout and restore macros for protection on
- access of critical kernel information. The restore interrupt macro must
- restore the interrupt posture of the running thread prior to the value
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
present prior to the disable macro. In most cases, the save area macro
is used to define a local function save area for the disable and restore
macros. */
/* First, check and see what mode the file is being compiled in. The IAR compiler
- defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
+ defines __CPU_MODE__ to 1, if the Thumb mode is present, and 2 if ARM 32-bit mode
is present. If ARM 32-bit mode is present, the fast CPSR manipulation macros
are available. Otherwise, if Thumb mode is present, we must use function calls. */
@@ -365,8 +357,8 @@ void tx_thread_vfp_disable(void);
/* Define the version ID of ThreadX. This may be utilized by the application. */
#ifdef TX_THREAD_INIT
-CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-R5/IAR Version 6.4.1 *";
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-R5/IAR Version 6.5.0.202601 *";
#else
#ifdef TX_MISRA_ENABLE
extern CHAR _tx_version_id[100];
diff --git a/ports/cortex_r5/iar/readme_threadx.txt b/ports/cortex_r5/iar/readme_threadx.txt
index fd6174a7..4d1b8b55 100644
--- a/ports/cortex_r5/iar/readme_threadx.txt
+++ b/ports/cortex_r5/iar/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Cortex-R5
+ Microsoft's Azure RTOS ThreadX for Cortex-R5
Thumb & 32-bit Mode
@@ -7,10 +7,10 @@
1. Building the ThreadX run-time Library
Building the ThreadX library is easy. First, open the Azure RTOS workspace
-azure_rtos.eww. Next, make the TX project the "active project" in the
-IAR Embedded Workbench and select the "Make" button. You should observe
-assembly and compilation of a series of ThreadX source files. This
-results in the ThreadX run-time library file tx.a, which is needed by
+azure_rtos.eww. Next, make the TX project the "active project" in the
+IAR Embedded Workbench and select the "Make" button. You should observe
+assembly and compilation of a series of ThreadX source files. This
+results in the ThreadX run-time library file tx.a, which is needed by
the application.
@@ -20,47 +20,47 @@ The ThreadX demonstration is designed to execute under the IAR
Windows-based Cortex-R5 simulator.
Building the demonstration is easy; simply make the sample_threadx.ewp project
-the "active project" in the IAR Embedded Workbench and select the
+the "active project" in the IAR Embedded Workbench and select the
"Make" button.
-You should observe the compilation of sample_threadx.c (which is the demonstration
+You should observe the compilation of sample_threadx.c (which is the demonstration
application) and linking with tx.a. The resulting file sample_threadx.out is a
binary file that can be downloaded and executed on IAR's Cortex-R5 simulator.
3. System Initialization
-The entry point in ThreadX for the Cortex-R5 using IAR tools is at label
-?cstartup. This is defined within the IAR compiler's startup code. In
-addition, this is where all static and global preset C variable
+The entry point in ThreadX for the Cortex-R5 using IAR tools is at label
+?cstartup. This is defined within the IAR compiler's startup code. In
+addition, this is where all static and global preset C variable
initialization processing takes place.
-The ThreadX tx_initialize_low_level.s file is responsible for setting up
-various system data structures, and a periodic timer interrupt source.
+The ThreadX tx_initialize_low_level.s file is responsible for setting up
+various system data structures, and a periodic timer interrupt source.
By default, the vector area is defined at the top of cstartup.s, which is
-a slightly modified from the base IAR file.
+a slightly modified from the base IAR file.
The _tx_initialize_low_level function inside of tx_initialize_low_level.s
-also determines the first available address for use by the application, which
-is supplied as the sole input parameter to your application definition function,
-tx_application_define. To accomplish this, a section is created in
-tx_initialize_low_level.s called FREE_MEM, which must be located after all
+also determines the first available address for use by the application, which
+is supplied as the sole input parameter to your application definition function,
+tx_application_define. To accomplish this, a section is created in
+tx_initialize_low_level.s called FREE_MEM, which must be located after all
other RAM sections in memory.
4. Register Usage and Stack Frames
-The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
-scratch registers for each function. All other registers used by a C function
-must be preserved by the function. ThreadX takes advantage of this in
-situations where a context switch happens as a result of making a ThreadX
-service call (which is itself a C function). In such cases, the saved
+The IAR ARM compiler assumes that registers r0-r3 (a1-a4) and r12 (ip) are
+scratch registers for each function. All other registers used by a C function
+must be preserved by the function. ThreadX takes advantage of this in
+situations where a context switch happens as a result of making a ThreadX
+service call (which is itself a C function). In such cases, the saved
context of a thread is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -78,12 +78,12 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
5. Conditional Compilation Switches
@@ -92,159 +92,159 @@ The following are conditional compilation options for building the ThreadX libra
and application:
TX_ENABLE_IRQ_NESTING This assembler define enables IRQ
- nested support. If IRQ nested
+ nested support. If IRQ nested
interrupt support is needed, this
- define should be applied to
+ define should be applied to
tx_initialize_low_level.s.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 2 in the "ThreadX User Guide"
+ Chapter 2 in the "ThreadX User Guide"
for more details.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
TX_ENABLE_EVENT_TRACE Defined, this option enables the internal ThreadX trace
feature. The trace buffer is supplied at a later time
via an application call to tx_trace_enable.
- TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
- This define is only pertinent if the ThreadX library is
+ TX_TRACE_TIME_SOURCE This defines the time-stamp source for event tracing.
+ This define is only pertinent if the ThreadX library is
built with TX_ENABLE_EVENT_TRACE defined.
- TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
- time-stamp source defined previously. If the time-stamp
- source is 16-bits, this value should be 0xFFFF. Alternatively,
- if the time-stamp source is 32-bits, this value should be
- 0xFFFFFFFF. This define is only pertinent if the ThreadX
+ TX_TRACE_TIME_MASK This defines the number of valid bits in the event trace
+ time-stamp source defined previously. If the time-stamp
+ source is 16-bits, this value should be 0xFFFF. Alternatively,
+ if the time-stamp source is 32-bits, this value should be
+ 0xFFFFFFFF. This define is only pertinent if the ThreadX
library is built with TX_ENABLE_EVENT_TRACE defined.
6. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make it run faster, you can change the ThreadX library
-project to enable various compiler optimizations.
+project to enable various compiler optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined.
7. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-R5
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
7.1 Vector Area
The Cortex-R5 vectors start at address zero. The demonstration system startup
-cstartup.s file contains the vectors and is loaded at address zero.
-On actual hardware platforms, this area might have to be copied to address 0.
+cstartup.s file contains the vectors and is loaded at address zero.
+On actual hardware platforms, this area might have to be copied to address 0.
7.2 IRQ ISRs
@@ -255,12 +255,12 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
7.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.s:
PUBLIC __tx_irq_handler
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -268,7 +268,7 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -281,7 +281,7 @@ __tx_irq_processing_return
7.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.s:
@@ -292,12 +292,12 @@ __tx_example_vectored_irq_handler
; /* Jump to context save to save system context. */
STMDB sp!, {r0-r3} ; Save some scratch registers
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
BL _tx_thread_vectored_context_save
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
@@ -314,24 +314,24 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables
-nesting by disabling IRQ interrupts and switching back to IRQ mode in
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.s. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables
+nesting by disabling IRQ interrupts and switching back to IRQ mode in
preparation for the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in a standard
+The following is an example of enabling IRQ nested interrupts in a standard
IRQ handler:
RSEG .text:CODE:NOROOT(2)
PUBLIC __tx_irq_handler
RSEG .text:CODE:NOROOT(2)
- PUBLIC __tx_irq_processing_return
+ PUBLIC __tx_irq_processing_return
__tx_irq_handler
;
; /* Jump to context save to save system context. */
@@ -339,15 +339,15 @@ __tx_irq_handler
__tx_irq_processing_return
;
; /* At this point execution is still in the IRQ mode. The CPSR, point of
-; interrupt, and all C scratch registers are available for use. Note
+; interrupt, and all C scratch registers are available for use. Note
; that IRQ interrupts are still disabled upon return from the context
; save function. */
;
-; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
+; /* Interrupt nesting is allowed after calling _tx_thread_irq_nesting_start
; from IRQ mode with interrupts disabled. This routine switches to the
-; system mode and returns with IRQ interrupts enabled.
-;
-; NOTE: It is very important to ensure all IRQ interrupts are cleared
+; system mode and returns with IRQ interrupts enabled.
+;
+; NOTE: It is very important to ensure all IRQ interrupts are cleared
; prior to enabling nested IRQ interrupts. */
;
BL _tx_thread_irq_nesting_start
@@ -355,7 +355,7 @@ __tx_irq_processing_return
; /* Application ISR dispatch call goes here! */
;
; /* If interrupt nesting was started earlier, the end of interrupt nesting
-; service must be called before returning to _tx_thread_context_restore.
+; service must be called before returning to _tx_thread_context_restore.
; This routine returns in processing in IRQ mode with interrupts disabled. */
;
BL _tx_thread_irq_nesting_end
@@ -366,12 +366,12 @@ __tx_irq_processing_return
7.3 FIQ Interrupts
-By default, Cortex-R5 FIQ interrupts are left alone by ThreadX. Of course, this
-means that the application is fully responsible for enabling the FIQ interrupt
-and saving/restoring any registers used in the FIQ ISR processing. To globally
-enable FIQ interrupts, the application should enable FIQ interrupts at the
-beginning of a thread or before any threads are created in tx_application_define.
-In addition, the application must ensure that no ThreadX service calls are made
+By default, Cortex-R5 FIQ interrupts are left alone by ThreadX. Of course, this
+means that the application is fully responsible for enabling the FIQ interrupt
+and saving/restoring any registers used in the FIQ ISR processing. To globally
+enable FIQ interrupts, the application should enable FIQ interrupts at the
+beginning of a thread or before any threads are created in tx_application_define.
+In addition, the application must ensure that no ThreadX service calls are made
from default FIQ ISRs, which is located in tx_initialize_low_level.s.
@@ -383,21 +383,21 @@ cannot be disabled. The hardware does not support nested FIQ interrupts.
8. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
+To add the timer interrupt processing, simply make a call to _tx_timer_interrupt
in the IRQ processing.
9. Thumb/Cortex-R5 Mixed Mode
-By default, ThreadX is setup for running in Cortex-R5 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
+By default, ThreadX is setup for running in Cortex-R5 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
ThreadX file and/or the application in Thumb mode. The only exception
-to this is the file tx_thread_shell_entry.c. This file must always be
+to this is the file tx_thread_shell_entry.c. This file must always be
built in 32-bit mode.
diff --git a/ports/cortex_r5/iar/src/tx_iar.c b/ports/cortex_r5/iar/src/tx_iar.c
index a37231c8..238b485e 100644
--- a/ports/cortex_r5/iar/src/tx_iar.c
+++ b/ports/cortex_r5/iar/src/tx_iar.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** IAR Multithreaded Library Support */
/** */
@@ -37,31 +38,31 @@
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) __iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
- thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
+ thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL;
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION __iar_dlib_perthread_access(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
@@ -90,7 +91,7 @@ void _DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp)
{
char _DLIB_TLS_MEMORY *p = 0;
-
+
/* Is there a current thread? */
if (_tx_thread_current_ptr)
p = (char _DLIB_TLS_MEMORY *) _tx_thread_current_ptr -> tx_thread_iar_tls_pointer;
@@ -117,19 +118,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -138,35 +139,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -185,25 +186,25 @@ void __iar_system_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -215,25 +216,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -267,19 +268,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -288,35 +289,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -335,25 +336,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -365,25 +366,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -404,17 +405,17 @@ UINT status;
#include "tx_thread.h"
#include "tx_mutex.h"
-/* This implementation requires that the following macros are defined in the
+/* This implementation requires that the following macros are defined in the
tx_port.h file and is included with the following code segments:
-
+
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
#include
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
+#define TX_THREAD_EXTENSION_2 VOID *tx_thread_iar_tls_pointer;
#else
-#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_2
#endif
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
@@ -422,24 +423,24 @@ void *_tx_iar_create_per_thread_tls_area(void);
void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr);
void __iar_Initlocks(void);
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr) thread_ptr -> tx_thread_iar_tls_pointer = __iar_dlib_perthread_allocate();
#define TX_THREAD_DELETE_EXTENSION(thread_ptr) do {__iar_dlib_perthread_deallocate(thread_ptr -> tx_thread_iar_tls_pointer); \
thread_ptr -> tx_thread_iar_tls_pointer = TX_NULL; } while(0);
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION do {__iar_Initlocks();} while(0);
#else
-#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
-#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#endif
- This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
- application.
+ This should be done automatically if TX_ENABLE_IAR_LIBRARY_SUPPORT is defined while building the ThreadX library and the
+ application.
Finally, the project options General Options -> Library Configuration should have the "Enable thread support in library" box selected.
*/
#ifdef TX_ENABLE_IAR_LIBRARY_SUPPORT
-#include
+#include
void * __aeabi_read_tp();
@@ -456,7 +457,7 @@ void * __aeabi_read_tp(void)
TX_THREAD *thread_ptr = _tx_thread_current_ptr;
if (thread_ptr)
{
- p = thread_ptr->tx_thread_iar_tls_pointer;
+ p = thread_ptr->tx_thread_iar_tls_pointer;
}
else
{
@@ -469,9 +470,9 @@ void * __aeabi_read_tp(void)
void* _tx_iar_create_per_thread_tls_area()
{
- UINT tls_size = __iar_tls_size();
-
- /* Get memory for TLS. */
+ UINT tls_size = __iar_tls_size();
+
+ /* Get memory for TLS. */
void *p = malloc(tls_size);
/* Initialize TLS-area and run constructors for objects in TLS */
@@ -483,7 +484,7 @@ void _tx_iar_destroy_per_thread_tls_area(void *tls_ptr)
{
/* Destroy objects living in TLS */
__call_thread_dtors();
- free(tls_ptr);
+ free(tls_ptr);
}
#ifndef _MAX_LOCK
@@ -517,19 +518,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_system_lock_mutexes[__tx_iar_system_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_system_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_system_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -538,35 +539,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_system_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR System Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_system_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -582,28 +583,28 @@ void __iar_system_Mtxdst(__iar_Rmtx *m)
void __iar_system_Mtxlock(__iar_Rmtx *m)
{
if (*m)
- {
+ {
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -616,25 +617,25 @@ void __iar_system_Mtxunlock(__iar_Rmtx *m)
{
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_system_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_system_lock_isr_caller++;
}
@@ -675,19 +676,19 @@ TX_MUTEX *mutex_ptr;
/* Setup a pointer to the start of the next free mutex. */
mutex_ptr = &__tx_iar_file_lock_mutexes[__tx_iar_file_lock_next_free_mutex++];
-
+
/* Check for wrap-around on the next free mutex. */
if (__tx_iar_file_lock_next_free_mutex >= _MAX_LOCK)
{
-
+
/* Yes, set the free index back to 0. */
__tx_iar_file_lock_next_free_mutex = 0;
}
-
+
/* Is this mutex free? */
if (mutex_ptr -> tx_mutex_id != TX_MUTEX_ID)
{
-
+
/* Yes, this mutex is free, get out of the loop! */
break;
}
@@ -696,35 +697,35 @@ TX_MUTEX *mutex_ptr;
/* Determine if a free mutex was found. */
if (i >= _MAX_LOCK)
{
-
+
/* Error! No more free mutexes! */
-
+
/* Increment the no mutexes error counter. */
__tx_iar_file_lock_no_mutexes++;
-
+
/* Set return pointer to NULL. */
*m = TX_NULL;
-
+
/* Return. */
return;
}
-
+
/* Now create the ThreadX mutex for the IAR library. */
status = _tx_mutex_create(mutex_ptr, "IAR File Library Lock", TX_NO_INHERIT);
-
+
/* Determine if the creation was successful. */
if (status == TX_SUCCESS)
{
-
+
/* Yes, successful creation, return mutex pointer. */
*m = (VOID *) mutex_ptr;
}
else
{
-
+
/* Increment the internal error counter. */
__tx_iar_file_lock_internal_errors++;
-
+
/* Return a NULL pointer to indicate an error. */
*m = TX_NULL;
}
@@ -743,25 +744,25 @@ void __iar_file_Mtxlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex locks are only available from initialization and
+ /* Determine the caller's context. Mutex locks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Get the mutex. */
status = _tx_mutex_get((TX_MUTEX *) *m, TX_WAIT_FOREVER);
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
@@ -773,25 +774,25 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m)
UINT status;
- /* Determine the caller's context. Mutex unlocks are only available from initialization and
+ /* Determine the caller's context. Mutex unlocks are only available from initialization and
threads. */
if ((_tx_thread_system_state == 0) || (_tx_thread_system_state >= TX_INITIALIZE_IN_PROGRESS))
{
-
+
/* Release the mutex. */
status = _tx_mutex_put((TX_MUTEX *) *m);
-
+
/* Check the status of the mutex release. */
if (status)
{
-
+
/* Internal error, increment the counter. */
__tx_iar_file_lock_internal_errors++;
}
}
else
{
-
+
/* Increment the ISR caller error. */
__tx_iar_file_lock_isr_caller++;
}
diff --git a/ports/cortex_r5/iar/src/tx_thread_context_restore.s b/ports/cortex_r5/iar/src/tx_thread_context_restore.s
index 62f098eb..a035dc5e 100644
--- a/ports/cortex_r5/iar/src/tx_thread_context_restore.s
+++ b/ports/cortex_r5/iar/src/tx_thread_context_restore.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -47,44 +47,38 @@ THUMB_MASK DEFINE 0x20 ; Thumb bit mask
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_restore Cortex-R5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_restore Cortex-R5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function restores the interrupt context if it is processing a */
-;/* nested interrupt. If not, it returns to the interrupt thread if no */
-;/* preemption is necessary. Otherwise, if preemption is necessary or */
-;/* if no thread was running, the function returns to the scheduler. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling routine */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs Interrupt Service Routines */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function restores the interrupt context if it is processing a */
+;/* nested interrupt. If not, it returns to the interrupt thread if no */
+;/* preemption is necessary. Otherwise, if preemption is necessary or */
+;/* if no thread was running, the function returns to the scheduler. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling routine */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs Interrupt Service Routines */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_restore(VOID)
@@ -112,13 +106,13 @@ _tx_thread_context_restore
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3] ; Pickup system state
SUB r2, r2, #1 ; Decrement the counter
- STR r2, [r3] ; Store the counter
+ STR r2, [r3] ; Store the counter
CMP r2, #0 ; Was this the first interrupt?
BEQ __tx_thread_not_nested_restore ; If so, not a nested restore
;
; /* Interrupts are nested. */
;
-; /* Just recover the saved registers and return to the point of
+; /* Just recover the saved registers and return to the point of
; interrupt. */
;
LDMIA sp!, {r0, r10, r12, lr} ; Recover SPSR, POI, and scratch regs
@@ -181,7 +175,7 @@ __tx_thread_preempt_restore
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
-
+
#ifdef __ARMVFP__
LDR r2, [r0, #144] ; Pickup the VFP enabled flag
CMP r2, #0 ; Is the VFP enabled?
@@ -191,7 +185,7 @@ __tx_thread_preempt_restore
VSTMDB sp!, {D0-D15} ; Save D0-D15
_tx_skip_irq_vfp_save
#endif
-
+
MOV r3, #1 ; Build interrupt stack type
STMDB sp!, {r3, r4} ; Save interrupt stack type and SPSR
STR sp, [r0, #8] ; Save stack pointer in thread control
@@ -237,7 +231,7 @@ __tx_thread_idle_system_restore
; /* Just return back to the scheduler! */
;
CPS #SVC_MODE ; Enter SVC mode
-
+
B _tx_thread_schedule ; Return to scheduler
;}
;
diff --git a/ports/cortex_r5/iar/src/tx_thread_context_save.s b/ports/cortex_r5/iar/src/tx_thread_context_save.s
index ce3a27d7..acd05d0a 100644
--- a/ports/cortex_r5/iar/src/tx_thread_context_save.s
+++ b/ports/cortex_r5/iar/src/tx_thread_context_save.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -36,43 +36,37 @@
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_context_save Cortex-R5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_context_save Cortex-R5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_context_save(VOID)
@@ -89,7 +83,7 @@ _tx_thread_context_save
; if (_tx_thread_system_state++)
; {
;
- STMDB sp!, {r0-r3} ; Save some working registers
+ STMDB sp!, {r0-r3} ; Save some working registers
LDR r3, =_tx_thread_system_state ; Pickup address of system state var
LDR r2, [r3, #0] ; Pickup system state
CMP r2, #0 ; Is this the first interrupt?
@@ -104,7 +98,7 @@ _tx_thread_context_save
; calling ISR. */
;
MRS r0, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} ; Store other registers
;
; /* Return to the ISR. */
@@ -120,7 +114,7 @@ _tx_thread_context_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
__tx_thread_not_nested_save
; }
@@ -134,13 +128,13 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
; scheduling loop - nothing needs saving!
;
; /* Save minimal context of interrupted thread. */
;
MRS r2, SPSR ; Pickup saved SPSR
- SUB lr, lr, #4 ; Adjust point of interrupt
+ SUB lr, lr, #4 ; Adjust point of interrupt
STMDB sp!, {r2, r10, r12, lr} ; Store other registers
;
; /* Save the current stack pointer in the thread's control block. */
@@ -160,7 +154,7 @@ __tx_thread_not_nested_save
POP {lr} ; Recover ISR lr
#endif
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
; else
@@ -170,7 +164,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
@@ -185,7 +179,7 @@ __tx_thread_idle_system_save
#endif
ADD sp, sp, #16 ; Recover saved registers
- B __tx_irq_processing_return ; Continue IRQ processing
+ B __tx_irq_processing_return ; Continue IRQ processing
;
; }
;}
diff --git a/ports/cortex_r5/iar/src/tx_thread_interrupt_control.s b/ports/cortex_r5/iar/src/tx_thread_interrupt_control.s
index 6a7768c9..423ba167 100644
--- a/ports/cortex_r5/iar/src/tx_thread_interrupt_control.s
+++ b/ports/cortex_r5/iar/src/tx_thread_interrupt_control.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;#define TX_SOURCE_CODE
;
@@ -32,42 +32,36 @@
INT_MASK DEFINE 0x80 ; Interrupt bit mask
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_control Cortex-R5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_control Cortex-R5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for changing the interrupt lockout */
-;/* posture of the system. */
-;/* */
-;/* INPUT */
-;/* */
-;/* new_posture New interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for changing the interrupt lockout */
+;/* posture of the system. */
+;/* */
+;/* INPUT */
+;/* */
+;/* new_posture New interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_control(UINT new_posture)
@@ -87,7 +81,7 @@ _tx_thread_interrupt_control
;
MSR CPSR_cxsf, r1 ; Setup new CPSR
AND r0, r3, #INT_MASK ; Return previous interrupt mask
-
+
BX lr ; Return to caller
;
;}
diff --git a/ports/cortex_r5/iar/src/tx_thread_interrupt_disable.s b/ports/cortex_r5/iar/src/tx_thread_interrupt_disable.s
index 687a56e6..c7520107 100644
--- a/ports/cortex_r5/iar/src/tx_thread_interrupt_disable.s
+++ b/ports/cortex_r5/iar/src/tx_thread_interrupt_disable.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;#define TX_SOURCE_CODE
;
@@ -32,41 +32,35 @@ DISABLE_INTS DEFINE 0x80 ; IRQ interrupts disabled
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_disable Cortex-R5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_disable Cortex-R5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for disabling interrupts */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for disabling interrupts */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;UINT _tx_thread_interrupt_disable(VOID)
diff --git a/ports/cortex_r5/iar/src/tx_thread_interrupt_restore.s b/ports/cortex_r5/iar/src/tx_thread_interrupt_restore.s
index 3a60ca6d..def631f2 100644
--- a/ports/cortex_r5/iar/src/tx_thread_interrupt_restore.s
+++ b/ports/cortex_r5/iar/src/tx_thread_interrupt_restore.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;#define TX_SOURCE_CODE
;
@@ -28,42 +28,36 @@
;#include "tx_thread.h"
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_interrupt_restore Cortex-R5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_interrupt_restore Cortex-R5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is responsible for restoring interrupts to the state */
-;/* returned by a previous _tx_thread_interrupt_disable call. */
-;/* */
-;/* INPUT */
-;/* */
-;/* old_posture Old interrupt lockout posture */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* Application Code */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is responsible for restoring interrupts to the state */
+;/* returned by a previous _tx_thread_interrupt_disable call. */
+;/* */
+;/* INPUT */
+;/* */
+;/* old_posture Old interrupt lockout posture */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* Application Code */
;/* */
;/**************************************************************************/
;void _tx_thread_interrupt_restore(UINT old_posture)
diff --git a/ports/cortex_r5/iar/src/tx_thread_irq_nesting_end.s b/ports/cortex_r5/iar/src/tx_thread_irq_nesting_end.s
index f2153ae6..b6a9908f 100644
--- a/ports/cortex_r5/iar/src/tx_thread_irq_nesting_end.s
+++ b/ports/cortex_r5/iar/src/tx_thread_irq_nesting_end.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -33,51 +33,45 @@
IRQ_MODE DEFINE 0x12 ; IRQ mode
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_end Cortex-R5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_end Cortex-R5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
-;/* processing from system mode back to IRQ mode prior to the ISR */
-;/* calling _tx_thread_context_restore. Note that this function */
-;/* assumes the system stack pointer is in the same position after */
-;/* nesting start function was called. */
-;/* */
-;/* This function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts disabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_irq_nesting_start has been called and switches the IRQ */
+;/* processing from system mode back to IRQ mode prior to the ISR */
+;/* calling _tx_thread_context_restore. Note that this function */
+;/* assumes the system stack pointer is in the same position after */
+;/* nesting start function was called. */
+;/* */
+;/* This function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts disabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_end(VOID)
diff --git a/ports/cortex_r5/iar/src/tx_thread_irq_nesting_start.s b/ports/cortex_r5/iar/src/tx_thread_irq_nesting_start.s
index e81f900a..29137f8a 100644
--- a/ports/cortex_r5/iar/src/tx_thread_irq_nesting_start.s
+++ b/ports/cortex_r5/iar/src/tx_thread_irq_nesting_start.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -33,48 +33,42 @@
SYS_MODE DEFINE 0x1F ; System mode
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_irq_nesting_start Cortex-R5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_irq_nesting_start Cortex-R5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is called by the application from IRQ mode after */
-;/* _tx_thread_context_save has been called and switches the IRQ */
-;/* processing to the system mode so nested IRQ interrupt processing */
-;/* is possible (system mode has its own "lr" register). Note that */
-;/* this function assumes that the system mode stack pointer was setup */
-;/* during low-level initialization (tx_initialize_low_level.s). */
-;/* */
-;/* This function returns with IRQ interrupts enabled. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is called by the application from IRQ mode after */
+;/* _tx_thread_context_save has been called and switches the IRQ */
+;/* processing to the system mode so nested IRQ interrupt processing */
+;/* is possible (system mode has its own "lr" register). Note that */
+;/* this function assumes that the system mode stack pointer was setup */
+;/* during low-level initialization (tx_initialize_low_level.s). */
+;/* */
+;/* This function returns with IRQ interrupts enabled. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_irq_nesting_start(VOID)
diff --git a/ports/cortex_r5/iar/src/tx_thread_schedule.s b/ports/cortex_r5/iar/src/tx_thread_schedule.s
index fc88ce8f..4152a2cb 100644
--- a/ports/cortex_r5/iar/src/tx_thread_schedule.s
+++ b/ports/cortex_r5/iar/src/tx_thread_schedule.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -37,45 +37,39 @@
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_schedule Cortex-R5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_schedule Cortex-R5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function waits for a thread control block pointer to appear in */
-;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
-;/* in the variable, the corresponding thread is resumed. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_initialize_kernel_enter ThreadX entry function */
-;/* _tx_thread_system_return Return to system from thread */
-;/* _tx_thread_context_restore Restore thread's context */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function waits for a thread control block pointer to appear in */
+;/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+;/* in the variable, the corresponding thread is resumed. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_initialize_kernel_enter ThreadX entry function */
+;/* _tx_thread_system_return Return to system from thread */
+;/* _tx_thread_context_restore Restore thread's context */
;/* */
;/**************************************************************************/
;VOID _tx_thread_schedule(VOID)
@@ -104,7 +98,7 @@ __tx_thread_schedule_loop
;
; }
; while(_tx_thread_execute_ptr == TX_NULL);
-;
+;
; /* Yes! We have a thread to execute. Lockout interrupts and
; transfer control to it. */
;
@@ -113,7 +107,7 @@ __tx_thread_schedule_loop
; /* Setup the current thread pointer. */
; _tx_thread_current_ptr = _tx_thread_execute_ptr;
;
- LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
+ LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread
STR r0, [r1, #0] ; Setup current thread pointer
;
; /* Increment the run count for this thread. */
@@ -127,7 +121,7 @@ __tx_thread_schedule_loop
; /* Setup time-slice, if present. */
; _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
;
- LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
+ LDR r2, =_tx_timer_time_slice ; Pickup address of time slice
; variable
LDR sp, [r0, #8] ; Switch stack pointers
STR r3, [r2, #0] ; Setup time-slice
@@ -184,7 +178,7 @@ _tx_skip_solicited_vfp_restore:
#ifdef __ARMVFP__
PUBLIC tx_thread_vfp_enable
CODE32
-tx_thread_vfp_enable??rA
+tx_thread_vfp_enable??rA
tx_thread_vfp_enable
MRS r2, CPSR ; Pickup the CPSR
CPSID i ; Disable IRQ interrupts
@@ -200,7 +194,7 @@ __tx_no_thread_to_enable:
PUBLIC tx_thread_vfp_disable
CODE32
-tx_thread_vfp_disable??rA
+tx_thread_vfp_disable??rA
tx_thread_vfp_disable
MRS r2, CPSR ; Pickup the CPSR
CPSID i ; Disable IRQ interrupts
diff --git a/ports/cortex_r5/iar/src/tx_thread_stack_build.s b/ports/cortex_r5/iar/src/tx_thread_stack_build.s
index 3b9dbc49..264ee4c3 100644
--- a/ports/cortex_r5/iar/src/tx_thread_stack_build.s
+++ b/ports/cortex_r5/iar/src/tx_thread_stack_build.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -33,58 +33,52 @@ SVC_MODE DEFINE 0x13 ; SVC mode
CPSR_MASK DEFINE 0x9F ; Mask initial CPSR, IRQ ints enabled
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_stack_build Cortex-R5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_stack_build Cortex-R5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function builds a stack frame on the supplied thread's stack. */
-;/* The stack frame results in a fake interrupt return to the supplied */
-;/* function pointer. */
-;/* */
-;/* INPUT */
-;/* */
-;/* thread_ptr Pointer to thread control blk */
-;/* function_ptr Pointer to return function */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* _tx_thread_create Create thread service */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function builds a stack frame on the supplied thread's stack. */
+;/* The stack frame results in a fake interrupt return to the supplied */
+;/* function pointer. */
+;/* */
+;/* INPUT */
+;/* */
+;/* thread_ptr Pointer to thread control blk */
+;/* function_ptr Pointer to return function */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* _tx_thread_create Create thread service */
;/* */
;/**************************************************************************/
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
;{
RSEG .text:CODE:NOROOT(2)
PUBLIC _tx_thread_stack_build
-
+
ARM
_tx_thread_stack_build
;
-;
+;
; /* Build a fake interrupt frame. The form of the fake interrupt stack
; on the Cortex-R5 should look like the following after it is built:
-;
+;
; Stack Top: 1 Interrupt stack frame type
; CPSR Initial value for CPSR
; a1 (r0) Initial value for a1
diff --git a/ports/cortex_r5/iar/src/tx_thread_system_return.s b/ports/cortex_r5/iar/src/tx_thread_system_return.s
index 58e5d072..6ceabc46 100644
--- a/ports/cortex_r5/iar/src/tx_thread_system_return.s
+++ b/ports/cortex_r5/iar/src/tx_thread_system_return.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;#define TX_SOURCE_CODE
;
@@ -37,44 +37,38 @@
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_system_return Cortex-R5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_system_return Cortex-R5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function is target processor specific. It is used to transfer */
-;/* control from a thread back to the ThreadX system. Only a */
-;/* minimal context is saved since the compiler assumes temp registers */
-;/* are going to get slicked by a function call anyway. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_thread_schedule Thread scheduling loop */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ThreadX components */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function is target processor specific. It is used to transfer */
+;/* control from a thread back to the ThreadX system. Only a */
+;/* minimal context is saved since the compiler assumes temp registers */
+;/* are going to get slicked by a function call anyway. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_thread_schedule Thread scheduling loop */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ThreadX components */
;/* */
;/**************************************************************************/
;VOID _tx_thread_system_return(VOID)
@@ -107,7 +101,7 @@ _tx_skip_solicited_vfp_save:
MOV r0, #0 ; Build a solicited stack type
STMDB sp!, {r0-r1} ; Save type and CPSR
-;
+;
;
#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
;
diff --git a/ports/cortex_r5/iar/src/tx_thread_vectored_context_save.s b/ports/cortex_r5/iar/src/tx_thread_vectored_context_save.s
index 4029bbb4..3a5ed54a 100644
--- a/ports/cortex_r5/iar/src/tx_thread_vectored_context_save.s
+++ b/ports/cortex_r5/iar/src/tx_thread_vectored_context_save.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Thread */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Thread */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;
;#define TX_SOURCE_CODE
@@ -35,43 +35,37 @@
EXTERN _tx_execution_isr_enter
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_thread_vectored_context_save Cortex-R5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_thread_vectored_context_save Cortex-R5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function saves the context of an executing thread in the */
-;/* beginning of interrupt processing. The function also ensures that */
-;/* the system stack is used upon return to the calling ISR. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* None */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* ISRs */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function saves the context of an executing thread in the */
+;/* beginning of interrupt processing. The function also ensures that */
+;/* the system stack is used upon return to the calling ISR. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* None */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* ISRs */
;/* */
;/**************************************************************************/
;VOID _tx_thread_vectored_context_save(VOID)
@@ -128,7 +122,7 @@ __tx_thread_not_nested_save
LDR r1, =_tx_thread_current_ptr ; Pickup address of current thread ptr
LDR r0, [r1, #0] ; Pickup current thread pointer
CMP r0, #0 ; Is it NULL?
- BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
+ BEQ __tx_thread_idle_system_save ; If so, interrupt occured in
; scheduling loop - nothing needs saving!
;
; /* Note: Minimal context of interrupted thread is already saved. */
@@ -160,7 +154,7 @@ __tx_thread_idle_system_save
;
; /* Interrupt occurred in the scheduling loop. */
;
-; /* Not much to do here, just adjust the stack pointer, and return to IRQ
+; /* Not much to do here, just adjust the stack pointer, and return to IRQ
; processing. */
;
MOV r10, #0 ; Clear stack limit
diff --git a/ports/cortex_r5/iar/src/tx_timer_interrupt.s b/ports/cortex_r5/iar/src/tx_timer_interrupt.s
index 85274fa2..b3935abc 100644
--- a/ports/cortex_r5/iar/src/tx_timer_interrupt.s
+++ b/ports/cortex_r5/iar/src/tx_timer_interrupt.s
@@ -1,23 +1,23 @@
;/***************************************************************************
-; * Copyright (c) 2024 Microsoft Corporation
-; *
+; * Copyright (c) 2024 Microsoft Corporation
+; *
; * This program and the accompanying materials are made available under the
; * terms of the MIT License which is available at
; * https://opensource.org/licenses/MIT.
-; *
+; *
; * SPDX-License-Identifier: MIT
; **************************************************************************/
;
;
-;/**************************************************************************/
-;/**************************************************************************/
-;/** */
-;/** ThreadX Component */
-;/** */
-;/** Timer */
-;/** */
-;/**************************************************************************/
-;/**************************************************************************/
+;/**************************************************************************/
+;/**************************************************************************/
+;/** */
+;/** ThreadX Component */
+;/** */
+;/** Timer */
+;/** */
+;/**************************************************************************/
+;/**************************************************************************/
;
;#define TX_SOURCE_CODE
;
@@ -43,46 +43,40 @@
;
;
;
-;/**************************************************************************/
-;/* */
-;/* FUNCTION RELEASE */
-;/* */
-;/* _tx_timer_interrupt Cortex-R5/IAR */
+;/**************************************************************************/
+;/* */
+;/* FUNCTION RELEASE */
+;/* */
+;/* _tx_timer_interrupt Cortex-R5/IAR */
;/* 6.1 */
;/* AUTHOR */
;/* */
;/* William E. Lamie, Microsoft Corporation */
;/* */
;/* DESCRIPTION */
-;/* */
-;/* This function processes the hardware timer interrupt. This */
-;/* processing includes incrementing the system clock and checking for */
-;/* time slice and/or timer expiration. If either is found, the */
-;/* interrupt context save/restore functions are called along with the */
-;/* expiration functions. */
-;/* */
-;/* INPUT */
-;/* */
-;/* None */
-;/* */
-;/* OUTPUT */
-;/* */
-;/* None */
-;/* */
-;/* CALLS */
-;/* */
-;/* _tx_timer_expiration_process Timer expiration processing */
-;/* _tx_thread_time_slice Time-slice interrupted thread */
-;/* */
-;/* CALLED BY */
-;/* */
-;/* interrupt vector */
-;/* */
-;/* RELEASE HISTORY */
-;/* */
-;/* DATE NAME DESCRIPTION */
;/* */
-;/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+;/* This function processes the hardware timer interrupt. This */
+;/* processing includes incrementing the system clock and checking for */
+;/* time slice and/or timer expiration. If either is found, the */
+;/* interrupt context save/restore functions are called along with the */
+;/* expiration functions. */
+;/* */
+;/* INPUT */
+;/* */
+;/* None */
+;/* */
+;/* OUTPUT */
+;/* */
+;/* None */
+;/* */
+;/* CALLS */
+;/* */
+;/* _tx_timer_expiration_process Timer expiration processing */
+;/* _tx_thread_time_slice Time-slice interrupted thread */
+;/* */
+;/* CALLED BY */
+;/* */
+;/* interrupt vector */
;/* */
;/**************************************************************************/
;VOID _tx_timer_interrupt(VOID)
@@ -108,7 +102,7 @@ _tx_timer_interrupt
; if (_tx_timer_time_slice)
; {
;
- LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
+ LDR r3, =_tx_timer_time_slice ; Pickup address of time-slice
LDR r2, [r3, #0] ; Pickup time-slice
CMP r2, #0 ; Is it non-active?
BEQ __tx_timer_no_time_slice ; Yes, skip time-slice processing
@@ -226,13 +220,13 @@ __tx_timer_dont_activate
; if (_tx_timer_expired_time_slice)
; {
;
- LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
+ LDR r3, =_tx_timer_expired_time_slice ; Pickup addr of time-slice expired
LDR r2, [r3, #0] ; Pickup the actual flag
CMP r2, #0 ; See if the flag is set
BEQ __tx_timer_not_ts_expiration ; No, skip time-slice processing
;
; /* Time slice interrupted thread. */
-; _tx_thread_time_slice();
+; _tx_thread_time_slice();
BL _tx_thread_time_slice ; Call time-slice processing
;
diff --git a/ports/cortex_r7/ghs/example_build/tx_initialize_low_level.arm b/ports/cortex_r7/ghs/example_build/tx_initialize_low_level.arm
index a8cbf83a..c3b9f420 100644
--- a/ports/cortex_r7/ghs/example_build/tx_initialize_low_level.arm
+++ b/ports/cortex_r7/ghs/example_build/tx_initialize_low_level.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r7/ghs/inc/tx_el.h b/ports/cortex_r7/ghs/inc/tx_el.h
index b8926921..72e5bbe3 100644
--- a/ports/cortex_r7/ghs/inc/tx_el.h
+++ b/ports/cortex_r7/ghs/inc/tx_el.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -36,12 +37,6 @@
/* EventAnalyzer. It is assumed that tx_api.h and tx_port.h have */
/* already been included. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
#ifndef TX_EL_H
diff --git a/ports/cortex_r7/ghs/inc/tx_port.h b/ports/cortex_r7/ghs/inc/tx_port.h
index 30f86c92..11e05937 100644
--- a/ports/cortex_r7/ghs/inc/tx_port.h
+++ b/ports/cortex_r7/ghs/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -42,15 +43,6 @@
/* own special types that can be mapped to actual data types by this */
/* file to guarantee consistency in the interface and functionality. */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 01-31-2022 Bhupendra Naphade Modified comment(s),updated */
-/* macro definition, */
-/* resulting in version 6.1.10 */
-/* */
/**************************************************************************/
#ifndef TX_PORT_H
@@ -394,7 +386,7 @@ void tx_thread_vfp_disable(void);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) 2024 Microsoft Corporation. * ThreadX Cortex-R7/Green Hills Version 6.4.1 *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX Cortex-R7/Green Hills Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/cortex_r7/ghs/readme_threadx.txt b/ports/cortex_r7/ghs/readme_threadx.txt
index 6f498f11..427d29f3 100644
--- a/ports/cortex_r7/ghs/readme_threadx.txt
+++ b/ports/cortex_r7/ghs/readme_threadx.txt
@@ -1,19 +1,19 @@
- Microsoft's Azure RTOS ThreadX for Cortex-R7
+ Microsoft's Azure RTOS ThreadX for Cortex-R7
Using the Green Hills Software Tools
1. Open the ThreadX Project Workspace
-In order to build the ThreadX library and the ThreadX demonstration first load
-the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
-"example_build" directory.
+In order to build the ThreadX library and the ThreadX demonstration first load
+the Azure RTOS Workspace azure_rtos_workspace.gpj, which is located inside the
+"example_build" directory.
2. Building the ThreadX run-time Library
-Building the ThreadX library is easy; simply select the MULTI project file
-tx.gpj and then select the build button. You should now observe the
-compilation and assembly of the ThreadX library. This project build produces
+Building the ThreadX library is easy; simply select the MULTI project file
+tx.gpj and then select the build button. You should now observe the
+compilation and assembly of the ThreadX library. This project build produces
the ThreadX library file tx.a.
@@ -21,55 +21,55 @@ the ThreadX library file tx.a.
The ThreadX demonstration is designed to execute under the MULTI environment
on the Green Hills Cortex-R7 simulator. The instructions that follow describe
-how to get the ThreadX evaluation running under the MULTI Cortex-R7 simulation
+how to get the ThreadX evaluation running under the MULTI Cortex-R7 simulation
environment.
-Building the demonstration is easy; simply select the MULTI project file
-sample_threadx.gpj. At this point, select the "Project Build" button and observe
-the compilation, assembly, and linkage of the ThreadX demonstration application.
+Building the demonstration is easy; simply select the MULTI project file
+sample_threadx.gpj. At this point, select the "Project Build" button and observe
+the compilation, assembly, and linkage of the ThreadX demonstration application.
-After the demonstration is built, invoke the MULTI ARM simulator by selecting
-the simulator connection from within the sample_threadx.con connection file.
-Once connected to the simulator, select the "Debug" button. You should now
-observe the main function of sample_threadx.c.
+After the demonstration is built, invoke the MULTI ARM simulator by selecting
+the simulator connection from within the sample_threadx.con connection file.
+Once connected to the simulator, select the "Debug" button. You should now
+observe the main function of sample_threadx.c.
At this point, you should setup a simulated timer interrupt for ThreadX
by entering "timer 9999 irq" in the "target" window of the debugger.
-You are now ready to execute the ThreadX demonstration system. Select
-breakpoints and data watches to observe the execution of the sample_threadx.c
+You are now ready to execute the ThreadX demonstration system. Select
+breakpoints and data watches to observe the execution of the sample_threadx.c
application.
4. EventAnalyzer Demonstration
-To build a demonstration system that also logs events for the MULTI EventAnalyzer,
-perform the same steps as the regular demo, except build the ThreadX library with
-txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
-The resulting image will log all system events, which can then be displayed by the
+To build a demonstration system that also logs events for the MULTI EventAnalyzer,
+perform the same steps as the regular demo, except build the ThreadX library with
+txe.gpj file and use the sample_threadx_el.gpj build file to build the demonstration.
+The resulting image will log all system events, which can then be displayed by the
MULTI EventAnalyzer.
5. System Initialization
-The system entry point using the Green Hills tools is at the label _start.
-This is defined within the crt0.arm file supplied by Green Hills. In addition,
-this is where all static and global preset C variable initialization
+The system entry point using the Green Hills tools is at the label _start.
+This is defined within the crt0.arm file supplied by Green Hills. In addition,
+this is where all static and global preset C variable initialization
processing is called from.
After the Green Hills startup function returns, ThreadX initialization is
called. The main initialization function is _tx_initialize_low_level and
-is located in the file tx_initialize_low_level.arm. This function is responsible
-for setting up various system data structures, interrupt vectors, and the
+is located in the file tx_initialize_low_level.arm. This function is responsible
+for setting up various system data structures, interrupt vectors, and the
periodic timer interrupt source of ThreadX.
-In addition, _tx_initialize_low_level determines where the first available
+In addition, _tx_initialize_low_level determines where the first available
RAM memory address is located. This address is supplied to tx_application_define.
-By default, the first available RAM memory address is assumed to start at the
-beginning of the ThreadX section .free_mem. If changes are made to the
-sample_threadx.ld file, the .free_mem section should remain the last allocated
-section in the main RAM area. The starting address of this section is passed
+By default, the first available RAM memory address is assumed to start at the
+beginning of the ThreadX section .free_mem. If changes are made to the
+sample_threadx.ld file, the .free_mem section should remain the last allocated
+section in the main RAM area. The starting address of this section is passed
to tx_application_define.
@@ -87,27 +87,27 @@ The following defines and their associated action are as follows:
TX_ENABLE_FIQ_NESTING If defined, this brings in special FIQ
interrupt nesting logic into the ThreadX
library. This define should be applied
- to the entire ThreadX library and the
+ to the entire ThreadX library and the
define TX_ENABLE_FIQ_SUPPORT should also
be defined.
TX_ENABLE_FIQ_SUPPORT If defined, this brings in FIQ context
save and restore logic necessary for
applications to call ThreadX services from
- FIQ interrupt handlers. This define
- should be applied to the entire ThreadX
+ FIQ interrupt handlers. This define
+ should be applied to the entire ThreadX
library.
TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included,
this define causes basic ThreadX error
checking to be disabled. Please see
- Chapter 4 in the "ThreadX User Guide"
+ Chapter 4 in the "ThreadX User Guide"
for more details.
TX_ENABLE_EVENT_LOGGING This define enables event logging for any
or all of the ThreadX source code. If this
- option is used anywhere, the tx_initialize_high_level.c
+ option is used anywhere, the tx_initialize_high_level.c
file must be compiled with it as well, since this
is where the event log is initialized.
@@ -119,121 +119,121 @@ The following defines and their associated action are as follows:
If this is enabled, run-time filtering logic
is added to the event logging code.
- TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
- Legal values range from 32 through
- 1024 (inclusive) and MUST be evenly divisible
- by 32. Increasing the number of priority levels
- supported increases the RAM usage by 128 bytes
- for every group of 32 priorities. However, there
- is only a negligible effect on performance. By
+ TX_MAX_PRIORITIES Defines the priority levels for ThreadX.
+ Legal values range from 32 through
+ 1024 (inclusive) and MUST be evenly divisible
+ by 32. Increasing the number of priority levels
+ supported increases the RAM usage by 128 bytes
+ for every group of 32 priorities. However, there
+ is only a negligible effect on performance. By
default, this value is set to 32 priority levels.
- TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
- used for error checking when threads are created.
- The default value is port-specific and is found
+ TX_MINIMUM_STACK Defines the minimum stack size (in bytes). It is
+ used for error checking when threads are created.
+ The default value is port-specific and is found
in tx_port.h.
- TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
- ThreadX timer thread. This thread processes all
- thread sleep requests as well as all service call
- timeouts. In addition, all application timer callback
- routines are invoked from this context. The default
+ TX_TIMER_THREAD_STACK_SIZE Defines the stack size (in bytes) of the internal
+ ThreadX timer thread. This thread processes all
+ thread sleep requests as well as all service call
+ timeouts. In addition, all application timer callback
+ routines are invoked from this context. The default
value is port-specific and is found in tx_port.h.
- TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
- thread. The default value is priority 0 - the highest
- priority in ThreadX. The default value is defined
+ TX_TIMER_THREAD_PRIORITY Defines the priority of the internal ThreadX timer
+ thread. The default value is priority 0 - the highest
+ priority in ThreadX. The default value is defined
in tx_port.h.
- TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
- timer thread for ThreadX. This results in improved
- performance on timer events and smaller RAM requirements
- because the timer stack and control block are no
- longer needed. However, using this option moves all
- the timer expiration processing to the timer ISR level.
+ TX_TIMER_PROCESS_IN_ISR Defined, this option eliminates the internal system
+ timer thread for ThreadX. This results in improved
+ performance on timer events and smaller RAM requirements
+ because the timer stack and control block are no
+ longer needed. However, using this option moves all
+ the timer expiration processing to the timer ISR level.
By default, this option is not defined.
- TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
- timers in-line instead of using a function call. This
- improves performance but slightly increases code size.
+ TX_REACTIVATE_INLINE Defined, this option performs reactivation of ThreadX
+ timers in-line instead of using a function call. This
+ improves performance but slightly increases code size.
By default, this option is not defined.
- TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
- thread's stack is disabled. By default, this option is
+ TX_DISABLE_STACK_FILLING Defined, placing the 0xEF value in each byte of each
+ thread's stack is disabled. By default, this option is
not defined.
- TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
- which includes analysis of how much stack has been used and
- examination of data pattern "fences" before and after the
- stack area. If a stack error is detected, the registered
- application stack error handler is called. This option does
- result in slightly increased overhead and code size. Please
- review the tx_thread_stack_error_notify API for more information.
+ TX_ENABLE_STACK_CHECKING Defined, this option enables ThreadX run-time stack checking,
+ which includes analysis of how much stack has been used and
+ examination of data pattern "fences" before and after the
+ stack area. If a stack error is detected, the registered
+ application stack error handler is called. This option does
+ result in slightly increased overhead and code size. Please
+ review the tx_thread_stack_error_notify API for more information.
By default, this option is not defined.
- TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
- and slightly reduces code size and improves performance. Of course,
- the preemption-threshold capabilities are no longer available.
+ TX_DISABLE_PREEMPTION_THRESHOLD Defined, this option disables the preemption-threshold feature
+ and slightly reduces code size and improves performance. Of course,
+ the preemption-threshold capabilities are no longer available.
By default, this option is not defined.
- TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
- global C data structures to zero. This should only be used if
- the compiler's initialization code sets all un-initialized
- C global data to zero. Using this option slightly reduces
- code size and improves performance during initialization.
+ TX_DISABLE_REDUNDANT_CLEARING Defined, this option removes the logic for initializing ThreadX
+ global C data structures to zero. This should only be used if
+ the compiler's initialization code sets all un-initialized
+ C global data to zero. Using this option slightly reduces
+ code size and improves performance during initialization.
By default, this option is not defined.
- TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
- ThreadX objects. Using this option slightly reduces code size
+ TX_DISABLE_NOTIFY_CALLBACKS Defined, this option disables the notify callbacks for various
+ ThreadX objects. Using this option slightly reduces code size
and improves performance.
- TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on block pools. By default, this option is
+ TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on block pools. By default, this option is
not defined.
- TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on byte pools. By default, this option is
+ TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on byte pools. By default, this option is
not defined.
- TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on event flags groups. By default, this option
+ TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on event flags groups. By default, this option
is not defined.
- TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on mutexes. By default, this option is
+ TX_MUTEX_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on mutexes. By default, this option is
not defined.
- TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on queues. By default, this option is
+ TX_QUEUE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on queues. By default, this option is
not defined.
- TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on semaphores. By default, this option is
+ TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on semaphores. By default, this option is
not defined.
- TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on threads. By default, this option is
+ TX_THREAD_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on threads. By default, this option is
not defined.
- TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
- information on timers. By default, this option is
+ TX_TIMER_ENABLE_PERFORMANCE_INFO Defined, this option enables the gathering of performance
+ information on timers. By default, this option is
not defined.
7. Register Usage and Stack Frames
-The Green Hills compiler assumes that registers r0-r3 (a1-a4) and r12 (ip)
-are scratch registers for each function. All other registers used by a C
-function must be preserved by the function. ThreadX takes advantage of this
-in situations where a context switch happens as a result of making a ThreadX
-service call (which is itself a C function). In such cases, the saved
+The Green Hills compiler assumes that registers r0-r3 (a1-a4) and r12 (ip)
+are scratch registers for each function. All other registers used by a C
+function must be preserved by the function. ThreadX takes advantage of this
+in situations where a context switch happens as a result of making a ThreadX
+service call (which is itself a C function). In such cases, the saved
context of a thread is only the non-scratch registers.
The following defines the saved context stack frames for context switches
that occur as a result of interrupt handling or from thread-level API calls.
All suspended threads have one of these two types of stack frames. The top
-of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
+of the suspended thread's stack is pointed to by tx_thread_stack_ptr in the
associated thread control block TX_THREAD.
@@ -251,40 +251,40 @@ associated thread control block TX_THREAD.
0x20 r6 (v3) r10 (v7)
0x24 r7 (v4) r11 (fp)
0x28 r8 (v5) r14 (lr)
- 0x2C r9 (v6)
- 0x30 r10 (v7)
- 0x34 r11 (fp)
- 0x38 r12 (ip)
+ 0x2C r9 (v6)
+ 0x30 r10 (v7)
+ 0x34 r11 (fp)
+ 0x38 r12 (ip)
0x3C r14 (lr)
- 0x40 PC
+ 0x40 PC
8. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
performance. To make ThreadX run faster, you can change the tx.gpj project
-to disable debug information and enable the desired optimizations.
+to disable debug information and enable the desired optimizations.
-In addition, you can eliminate the ThreadX basic API error checking by
-compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
-defined before tx_api.h is included.
+In addition, you can eliminate the ThreadX basic API error checking by
+compiling your application code with the symbol TX_DISABLE_ERROR_CHECKING
+defined before tx_api.h is included.
9. Interrupt Handling
ThreadX provides complete and high-performance interrupt handling for Cortex-R7
-targets. There are a certain set of requirements that are defined in the
+targets. There are a certain set of requirements that are defined in the
following sub-sections:
9.1 Vector Area
The Cortex-R7 vectors start at address zero. The demonstration system reset.arm
-file contains the reset section (which contains all the ARM vectors) and is
+file contains the reset section (which contains all the ARM vectors) and is
typically loaded at address zero. On actual hardware platforms, this section
-might have to be copied to address 0.
+might have to be copied to address 0.
9.2 IRQ ISRs
@@ -294,13 +294,13 @@ IRQ interrupts. The following sub-sections define the IRQ capabilities.
9.2.1 Standard IRQ ISRs
-The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
-interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
+The standard ARM IRQ mechanism has a single interrupt vector at address 0x18. This IRQ
+interrupt is managed by the __tx_irq_handler code in tx_initialize_low_level. The following
is the default IRQ handler defined in tx_initialize_low_level.arm:
.globl __tx_irq_handler
- .globl __tx_irq_processing_return
+ .globl __tx_irq_processing_return
__tx_irq_handler:
/* Jump to context save to save system context. */
@@ -308,7 +308,7 @@ __tx_irq_handler:
__tx_irq_processing_return:
/* At this point execution is still in the IRQ mode. The CPSR, point of
- interrupt, and all C scratch registers are available for use. Note
+ interrupt, and all C scratch registers are available for use. Note
that IRQ interrupts are still disabled upon return from the context
save function. */
@@ -321,7 +321,7 @@ __tx_irq_processing_return:
9.2.2 Vectored IRQ ISRs
The vectored ARM IRQ mechanism has multiple interrupt vectors at addresses specified
-by the particular implementation. The following is an example IRQ handler defined in
+by the particular implementation. The following is an example IRQ handler defined in
tx_initialize_low_level.arm:
.globl __tx_irq_example_handler
@@ -331,12 +331,12 @@ __tx_irq_example_handler:
STMDB sp!, {r0-r3} # Save some scratch registers
MRS r0, SPSR # Pickup saved SPSR
- SUB lr, lr, #4 # Adjust point of interrupt
+ SUB lr, lr, #4 # Adjust point of interrupt
STMDB sp!, {r0, r10, r12, lr} # Store other scratch registers
BL _tx_thread_vectored_context_save # Call the vectored IRQ context save
/* At this point execution is still in the IRQ mode. The CPSR, point of
- interrupt, and all C scratch registers are available for use. Note
+ interrupt, and all C scratch registers are available for use. Note
that IRQ interrupts are still disabled upon return from the context
save function. */
@@ -353,22 +353,22 @@ IRQ support, the entire library should be built with TX_ENABLE_IRQ_NESTING
defined. With this defined, two new IRQ interrupt management services are
available, namely _tx_thread_irq_nesting_start and _tx_thread_irq_nesting_end.
These function should be called between the IRQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_irq_nesting_start and
-_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
+Execution between the calls to _tx_thread_irq_nesting_start and
+_tx_thread_irq_nesting_end is enabled for IRQ nesting. This is achieved
by switching from IRQ mode to SYS mode and enabling IRQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.arm. When nested IRQ interrupts are no
-longer required, calling the _tx_thread_irq_nesting_end service disables nesting
-by disabling IRQ interrupts and switching back to IRQ mode in preparation for
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.arm. When nested IRQ interrupts are no
+longer required, calling the _tx_thread_irq_nesting_end service disables nesting
+by disabling IRQ interrupts and switching back to IRQ mode in preparation for
the IRQ context restore service.
-The following is an example of enabling IRQ nested interrupts in the
+The following is an example of enabling IRQ nested interrupts in the
typical IRQ handler:
.globl __tx_irq_handler
- .globl __tx_irq_processing_return
+ .globl __tx_irq_processing_return
__tx_irq_handler:
/* Jump to context save to save system context. */
@@ -376,10 +376,10 @@ __tx_irq_handler:
__tx_irq_processing_return:
/* Enable nested IRQ interrupts. NOTE: Since this service returns
- with IRQ interrupts enabled, all IRQ interrupt sources must be
+ with IRQ interrupts enabled, all IRQ interrupt sources must be
cleared prior to calling this service. */
BL _tx_thread_irq_nesting_start
-
+
/* Application ISR call(s) go here! */
/* Disable nested IRQ interrupts. The mode is switched back to
@@ -392,9 +392,9 @@ __tx_irq_processing_return:
9.3 FIQ Interrupts
-By default, Cortex-R7 FIQ interrupts are left completely enabled by ThreadX.
-Of course, this means that the application is fully responsible for
-saving/restoring any registers used in the FIQ ISR processing. In addition,
+By default, Cortex-R7 FIQ interrupts are left completely enabled by ThreadX.
+Of course, this means that the application is fully responsible for
+saving/restoring any registers used in the FIQ ISR processing. In addition,
no ThreadX service calls are allowed from the default FIQ ISRs. The default
FIQ interrupt shell is located in tx_initialize_low_level.arm.
@@ -403,7 +403,7 @@ FIQ interrupt shell is located in tx_initialize_low_level.arm.
Full ThreadX management of FIQ interrupts is provided if the ThreadX sources
are built with the TX_ENABLE_FIQ_SUPPORT defined. If the library is built
this way, the FIQ interrupt handlers are very similar to the IRQ interrupt
-handlers defined previously. The following is default FIQ handler
+handlers defined previously. The following is default FIQ handler
defined in tx_initialize_low_level.arm:
@@ -431,18 +431,18 @@ FIQ support, the entire library should be built with TX_ENABLE_FIQ_NESTING
defined. With this defined, two new FIQ interrupt management services are
available, namely _tx_thread_fiq_nesting_start and _tx_thread_fiq_nesting_end.
These function should be called between the FIQ context save and restore
-calls.
+calls.
-Execution between the calls to _tx_thread_fiq_nesting_start and
-_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
+Execution between the calls to _tx_thread_fiq_nesting_start and
+_tx_thread_fiq_nesting_end is enabled for FIQ nesting. This is achieved
by switching from FIQ mode to SYS mode and enabling FIQ interrupts.
-The SYS mode stack is used during the SYS mode operation, which was
-setup in tx_initialize_low_level.arm. When nested FIQ interrupts are no longer
-required, calling the _tx_thread_fiq_nesting_end service disables nesting by
-disabling FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
+The SYS mode stack is used during the SYS mode operation, which was
+setup in tx_initialize_low_level.arm. When nested FIQ interrupts are no longer
+required, calling the _tx_thread_fiq_nesting_end service disables nesting by
+disabling FIQ interrupts and switching back to FIQ mode in preparation for the FIQ
context restore service.
-The following is an example of enabling FIQ nested interrupts in the
+The following is an example of enabling FIQ nested interrupts in the
typical FIQ handler:
@@ -458,7 +458,7 @@ __tx_fiq_processing_return:
interrupt, and all C scratch registers are available for use. */
/* Enable nested FIQ interrupts. NOTE: Since this service returns
- with FIQ interrupts enabled, all FIQ interrupt sources must be
+ with FIQ interrupts enabled, all FIQ interrupt sources must be
cleared prior to calling this service. */
BL _tx_thread_fiq_nesting_start
@@ -475,29 +475,29 @@ __tx_fiq_processing_return:
10. ThreadX Timer Interrupt
-ThreadX requires a periodic interrupt source to manage all time-slicing,
-thread sleeps, timeouts, and application timers. Without such a timer
+ThreadX requires a periodic interrupt source to manage all time-slicing,
+thread sleeps, timeouts, and application timers. Without such a timer
interrupt source, these services are not functional. However, all other
ThreadX services are operational without a periodic timer source.
-To add the timer interrupt processing, simply make a call to
+To add the timer interrupt processing, simply make a call to
_tx_timer_interrupt in the IRQ processing. An example of this can be
found in the file tx_initialize_low_level.arm.
11. Thumb/Cortex-R7 Mixed Mode
-By default, ThreadX is setup for running in Cortex-R7 32-bit mode. This is
-also true for the demonstration system. It is possible to build any
+By default, ThreadX is setup for running in Cortex-R7 32-bit mode. This is
+also true for the demonstration system. It is possible to build any
ThreadX file and/or the application in Thumb mode. The only exception
-to this is the file tx_thread_shell_entry.c. This file must always be
+to this is the file tx_thread_shell_entry.c. This file must always be
built in 32-bit mode.
12. VFP Support
By default, VFP support is disabled for each thread. If saving the context of the VFP registers
-is needed, the following API call must be made from the context of the application thread - before
+is needed, the following API call must be made from the context of the application thread - before
the VFP usage:
void tx_thread_vfp_enable(void);
@@ -520,7 +520,7 @@ information associated with this specific port of ThreadX:
04-02-2021 Release 6.1.6 changes:
tx_port.h Updated macro definition
-05/19/2020 Initial ThreadX version of Cortex-R7/Green Hills port.
+05/19/2020 Initial ThreadX version of Cortex-R7/Green Hills port.
Copyright(c) 1996-2020 Microsoft Corporation
diff --git a/ports/cortex_r7/ghs/src/tx_el.c b/ports/cortex_r7/ghs/src/tx_el.c
index 365622cd..b5d3b8b7 100644
--- a/ports/cortex_r7/ghs/src/tx_el.c
+++ b/ports/cortex_r7/ghs/src/tx_el.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -82,12 +83,6 @@ UINT _tx_thread_interrupt_control(UINT new_posture);
/* */
/* Application Code */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_el_initialize(VOID)
{
diff --git a/ports/cortex_r7/ghs/src/tx_thread_context_restore.arm b/ports/cortex_r7/ghs/src/tx_thread_context_restore.arm
index 84e9a4f9..9f829864 100644
--- a/ports/cortex_r7/ghs/src/tx_thread_context_restore.arm
+++ b/ports/cortex_r7/ghs/src/tx_thread_context_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r7/ghs/src/tx_thread_context_save.arm b/ports/cortex_r7/ghs/src/tx_thread_context_save.arm
index c83232f5..656ade3c 100644
--- a/ports/cortex_r7/ghs/src/tx_thread_context_save.arm
+++ b/ports/cortex_r7/ghs/src/tx_thread_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r7/ghs/src/tx_thread_fiq_context_restore.arm b/ports/cortex_r7/ghs/src/tx_thread_fiq_context_restore.arm
index 0c37d12d..7d83f989 100644
--- a/ports/cortex_r7/ghs/src/tx_thread_fiq_context_restore.arm
+++ b/ports/cortex_r7/ghs/src/tx_thread_fiq_context_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r7/ghs/src/tx_thread_fiq_context_save.arm b/ports/cortex_r7/ghs/src/tx_thread_fiq_context_save.arm
index 5ab8d701..82d2bdac 100644
--- a/ports/cortex_r7/ghs/src/tx_thread_fiq_context_save.arm
+++ b/ports/cortex_r7/ghs/src/tx_thread_fiq_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r7/ghs/src/tx_thread_fiq_nesting_end.arm b/ports/cortex_r7/ghs/src/tx_thread_fiq_nesting_end.arm
index 1577f5eb..30ac7c28 100644
--- a/ports/cortex_r7/ghs/src/tx_thread_fiq_nesting_end.arm
+++ b/ports/cortex_r7/ghs/src/tx_thread_fiq_nesting_end.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r7/ghs/src/tx_thread_fiq_nesting_start.arm b/ports/cortex_r7/ghs/src/tx_thread_fiq_nesting_start.arm
index 81cefcff..491366b8 100644
--- a/ports/cortex_r7/ghs/src/tx_thread_fiq_nesting_start.arm
+++ b/ports/cortex_r7/ghs/src/tx_thread_fiq_nesting_start.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r7/ghs/src/tx_thread_interrupt_control.arm b/ports/cortex_r7/ghs/src/tx_thread_interrupt_control.arm
index 1c84c17d..00297ae5 100644
--- a/ports/cortex_r7/ghs/src/tx_thread_interrupt_control.arm
+++ b/ports/cortex_r7/ghs/src/tx_thread_interrupt_control.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r7/ghs/src/tx_thread_interrupt_disable.arm b/ports/cortex_r7/ghs/src/tx_thread_interrupt_disable.arm
index 68ff706b..6e1745b9 100644
--- a/ports/cortex_r7/ghs/src/tx_thread_interrupt_disable.arm
+++ b/ports/cortex_r7/ghs/src/tx_thread_interrupt_disable.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r7/ghs/src/tx_thread_interrupt_restore.arm b/ports/cortex_r7/ghs/src/tx_thread_interrupt_restore.arm
index 2e3a4cd8..7b63b0cb 100644
--- a/ports/cortex_r7/ghs/src/tx_thread_interrupt_restore.arm
+++ b/ports/cortex_r7/ghs/src/tx_thread_interrupt_restore.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r7/ghs/src/tx_thread_irq_nesting_end.arm b/ports/cortex_r7/ghs/src/tx_thread_irq_nesting_end.arm
index f5e644d6..dc535b04 100644
--- a/ports/cortex_r7/ghs/src/tx_thread_irq_nesting_end.arm
+++ b/ports/cortex_r7/ghs/src/tx_thread_irq_nesting_end.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r7/ghs/src/tx_thread_irq_nesting_start.arm b/ports/cortex_r7/ghs/src/tx_thread_irq_nesting_start.arm
index 48776848..322b5211 100644
--- a/ports/cortex_r7/ghs/src/tx_thread_irq_nesting_start.arm
+++ b/ports/cortex_r7/ghs/src/tx_thread_irq_nesting_start.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r7/ghs/src/tx_thread_schedule.arm b/ports/cortex_r7/ghs/src/tx_thread_schedule.arm
index acf51ff0..011813ed 100644
--- a/ports/cortex_r7/ghs/src/tx_thread_schedule.arm
+++ b/ports/cortex_r7/ghs/src/tx_thread_schedule.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r7/ghs/src/tx_thread_stack_build.arm b/ports/cortex_r7/ghs/src/tx_thread_stack_build.arm
index 04921a51..b1157128 100644
--- a/ports/cortex_r7/ghs/src/tx_thread_stack_build.arm
+++ b/ports/cortex_r7/ghs/src/tx_thread_stack_build.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r7/ghs/src/tx_thread_system_return.arm b/ports/cortex_r7/ghs/src/tx_thread_system_return.arm
index 2c15127c..2cef1a6c 100644
--- a/ports/cortex_r7/ghs/src/tx_thread_system_return.arm
+++ b/ports/cortex_r7/ghs/src/tx_thread_system_return.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r7/ghs/src/tx_thread_vectored_context_save.arm b/ports/cortex_r7/ghs/src/tx_thread_vectored_context_save.arm
index 56f5d276..6d210e97 100644
--- a/ports/cortex_r7/ghs/src/tx_thread_vectored_context_save.arm
+++ b/ports/cortex_r7/ghs/src/tx_thread_vectored_context_save.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/cortex_r7/ghs/src/tx_timer_interrupt.arm b/ports/cortex_r7/ghs/src/tx_timer_interrupt.arm
index 5534b398..44afdde5 100644
--- a/ports/cortex_r7/ghs/src/tx_timer_interrupt.arm
+++ b/ports/cortex_r7/ghs/src/tx_timer_interrupt.arm
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
diff --git a/ports/linux/gnu/example_build/Makefile b/ports/linux/gnu/example_build/Makefile
index 17607360..ddce0164 100644
--- a/ports/linux/gnu/example_build/Makefile
+++ b/ports/linux/gnu/example_build/Makefile
@@ -34,7 +34,7 @@ $(OUTPUT_FOLDER):
sample_threadx: $(OUTPUT_FOLDER)/sample_threadx.o tx.a
echo LD $@
- $(LINK) -o $@ $^ $(LIBS)
+ $(LINK) -o $@ $^ $(LIBS)
tx.a: $(OUTPUT_FOLDER) $(LINUX_OBJS) $(GENERIC_OBJS)
echo AR $@
@@ -68,7 +68,7 @@ files:
do \
filename=`basename $$file`; \
[ "$$file" == "sample_threadx.c" ] || echo "$$filename \\" >> $(FILE_LIST); \
- done;
+ done;
@printf "\n" >> $(FILE_LIST);
@echo 'LINUX_OBJS = $$(LINUX_SRCS:%.c=$(OUTPUT_FOLDER)/%.o)' >> $(FILE_LIST);
@printf "\n\n" >> $(FILE_LIST);
@@ -77,7 +77,7 @@ files:
do \
filename=`basename $$file`; \
[ "$$file" == "sample_threadx.c" ] || echo "$$filename \\" >> $(FILE_LIST); \
- done;
+ done;
@printf "\n" >> $(FILE_LIST);
@echo 'GENERIC_OBJS = $$(GENERIC_SRCS:%.c=$(OUTPUT_FOLDER)/generic/%.o)' >> $(FILE_LIST);
diff --git a/ports/linux/gnu/example_build/sample_threadx.c b/ports/linux/gnu/example_build/sample_threadx.c
index 080be3c4..43c0bdd4 100644
--- a/ports/linux/gnu/example_build/sample_threadx.c
+++ b/ports/linux/gnu/example_build/sample_threadx.c
@@ -1,5 +1,5 @@
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
- threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
byte pool, and block pool. */
#include "tx_api.h"
@@ -80,42 +80,42 @@ CHAR *pointer = TX_NULL;
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create the main thread. */
- tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 1. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 1 and 2. These threads pass information through a ThreadX
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
message queue. It is also interesting to note that these threads have a time
slice. */
- tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 2. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
16, 16, 4, TX_AUTO_START);
/* Allocate the stack for thread 3. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
An interesting thing here is that both threads share the same instruction area. */
- tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 4. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 5. */
@@ -123,23 +123,23 @@ CHAR *pointer = TX_NULL;
/* Create thread 5. This thread simply pends on an event flag which will be set
by thread_0. */
- tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 6. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
- tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the stack for thread 7. */
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
- tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
- pointer, DEMO_STACK_SIZE,
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
/* Allocate the message queue. */
@@ -253,11 +253,11 @@ UINT status;
/* Retrieve a message from the queue. */
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
- /* Check completion status and make sure the message is what we
+ /* Check completion status and make sure the message is what we
expected. */
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
break;
-
+
/* Otherwise, all is okay. Increment the received message count. */
thread_2_messages_received++;
}
@@ -316,7 +316,7 @@ ULONG actual_flags;
thread_5_counter++;
/* Wait for event flag 0. */
- status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
&actual_flags, TX_WAIT_FOREVER);
/* Check status. */
@@ -369,7 +369,7 @@ UINT status;
if (status != TX_SUCCESS)
break;
- /* Release the mutex again. This will actually
+ /* Release the mutex again. This will actually
release ownership since it was obtained twice. */
status = tx_mutex_put(&mutex_0);
diff --git a/ports/linux/gnu/inc/tx_port.h b/ports/linux/gnu/inc/tx_port.h
index 76bec2a6..83d72df0 100644
--- a/ports/linux/gnu/inc/tx_port.h
+++ b/ports/linux/gnu/inc/tx_port.h
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -20,11 +21,11 @@
/**************************************************************************/
-/**************************************************************************/
-/* */
-/* PORT SPECIFIC C INFORMATION RELEASE */
-/* */
-/* tx_port.h Linux/GNU */
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h Linux/GNU */
/* 6.3.0 */
/* */
/* AUTHOR */
@@ -32,30 +33,15 @@
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This file contains data type definitions that make the ThreadX */
-/* real-time kernel function identically on a variety of different */
-/* processor architectures. For example, the size or number of bits */
-/* in an "int" data type vary between microprocessor architectures and */
-/* even C compilers for the same microprocessor. ThreadX does not */
-/* directly use native C data types. Instead, ThreadX creates its */
-/* own special types that can be mapped to actual data types by this */
-/* file to guarantee consistency in the interface and functionality. */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* 10-15-2021 William E. Lamie Modified comment(s), added */
-/* symbol ULONG64_DEFINED, */
-/* resulting in version 6.1.9 */
-/* 04-25-2022 William E. Lamie Modified comment(s), removed */
-/* useless definition, */
-/* resulting in version 6.1.11 */
-/* 10-31-2023 Yanwu Cai Modified comment(s), fixed */
-/* compile warnings, */
-/* resulting in version 6.3.0 */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
/* */
/**************************************************************************/
@@ -547,7 +533,7 @@ VOID _tx_thread_interrupt_restore(UINT previous_posture);
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "Copyright (c) Microsoft Corporation * ThreadX Linux/gcc Version 6.4.1 *";
+ "Copyright (c) Microsoft Corporation * ThreadX Linux/gcc Version 6.5.0.202601 *";
#else
extern CHAR _tx_version_id[];
#endif
diff --git a/ports/linux/gnu/readme_threadx.txt b/ports/linux/gnu/readme_threadx.txt
index e3ac5cf6..ba546d83 100644
--- a/ports/linux/gnu/readme_threadx.txt
+++ b/ports/linux/gnu/readme_threadx.txt
@@ -1,4 +1,4 @@
- Microsoft's Azure RTOS ThreadX for Linux
+ Microsoft's Azure RTOS ThreadX for Linux
Using the GNU GCC Tools
@@ -8,43 +8,63 @@ First make sure you are in the "example_build" directory. Also, make sure that
you have setup your path and other environment variables necessary for the GNU
development environment. The following command retrieves and installs GCC
multilib on a Ubuntu system:
-
+
sudo apt-get install gcc-multilib
-At this point you may run the GNU make command to build the ThreadX core
-library. This will build the ThreadX run-time environment in the
-"example_build" directory.
+At this point you may run the GNU make command to build the ThreadX core
+library. This will build the ThreadX run-time environment in the
+"example_build" directory.
make tx.a
-you should now observe the compilation of the ThreadX library source. At the
+you should now observe the compilation of the ThreadX library source. At the
end of the make, they are all combined into the run-time library file: tx.a.
This file must be linked with your application in order to use ThreadX.
-
+
2. Demonstration System
-Building the demonstration is easy; simply execute the GNU make command while
-inside the "example_build" directory.
+Building the demonstration is easy; simply execute the GNU make command while
+inside the "example_build" directory.
make sample_threadx
-You should observe the compilation of sample_threadx.c (which is the demonstration
-application) and linking with tx.a. The resulting file DEMO is a binary file
+You should observe the compilation of sample_threadx.c (which is the demonstration
+application) and linking with tx.a. The resulting file DEMO is a binary file
that can be executed.
+2.1 Includes
+
+Notice that the demonstration Makefile includes defines for _GNU_SOURCE
+and TX_LINUX_MULTI_CORE. These are necessary to enable GNU/Linux-specific
+compatibility for ThreadX using the Linux kernel in multi-core devices,
+including the option to control processor affinity. See the GNU documentation
+on CPU affinity and Feature Test Macros for more information.
+
+TX_LINUX_MULTI_CORE is necessary to enable code that constrains ThreadX to
+one core, to prevent unintended behavior when threads execute simultaneously
+across multiple cores. The enabled code configures CPU affinity, requiring
+the use of macros such as CPU_SET and functions such as sched_setaffinity.
+Access to these macros and functions (and the underlying types for the latter)
+are enabled via the definition of _GNU_SOURCE.
+
+When building your own application, the _GNU_SOURCE and TX_LINUX_MULTI_CORE
+symbols can be defined by being passed to the compiler (e.g. -D_GNU_SOURCE) or
+in the optional user-defined ThreadX user define file tx_user.h. In the latter
+case, ensure that the symbol TX_INCLUDE_USER_DEFINE_FILE is defined, to instruct
+the tx_port.h header to include tx_user.h.
3. System Initialization
-The system entry point is at main(), which is defined in the application.
-Once the application calls tx_kernel_enter, ThreadX starts running and
-performs various initialization duties prior to starting the scheduler. The
+The system entry point is at main(), which is defined in the application.
+Once the application calls tx_kernel_enter, ThreadX starts running and
+performs various initialization duties prior to starting the scheduler. The
Linux-specific initialization is done in the function _tx_initialize_low_level,
-which is located in the file tx_initialize_low_level.c. This function is
-responsible for setting up various system data structures and simulated
+which is located in the file tx_initialize_low_level.c. This function is
+responsible for setting up various system data structures and simulated
interrupts - including the periodic timer interrupt source for ThreadX.
-In addition, _tx_initialize_low_level determines the first available
+In addition, _tx_initialize_low_level determines the first available
address for use by the application. In Linux, this is basically done
by using malloc to get a big block of memory from Linux.
@@ -53,12 +73,12 @@ by using malloc to get a big block of memory from Linux.
ThreadX for Linux is implemented using POSIX pthreads. Each application
thread in ThreadX actually runs as a Linux pthread. The determination of
-which application thread to run is made by the ThreadX scheduler, which
-itself is a Linux pthread. The ThreadX scheduler is the highest priority
+which application thread to run is made by the ThreadX scheduler, which
+itself is a Linux pthread. The ThreadX scheduler is the highest priority
thread in the system.
Interrupts in ThreadX/Linux are also simulated by pthreads. A good example
-is the ThreadX system timer interrupt, which can be found in
+is the ThreadX system timer interrupt, which can be found in
tx_initialize_low_level.c.
ThreadX for linux utilizes the API pthread_setschedparam() which requires
@@ -69,12 +89,12 @@ to run a ThreadX application:
5. Improving Performance
-The distribution version of ThreadX is built without any compiler
-optimizations. This makes it easy to debug because you can trace or set
-breakpoints inside of ThreadX itself. Of course, this costs some
-performance. To make it run faster, you can change the makefile to
-enable all compiler optimizations. In addition, you can eliminate the
-ThreadX basic API error checking by compiling your application code with the
+The distribution version of ThreadX is built without any compiler
+optimizations. This makes it easy to debug because you can trace or set
+breakpoints inside of ThreadX itself. Of course, this costs some
+performance. To make it run faster, you can change the makefile to
+enable all compiler optimizations. In addition, you can eliminate the
+ThreadX basic API error checking by compiling your application code with the
symbol TX_DISABLE_ERROR_CHECKING defined.
@@ -82,7 +102,7 @@ symbol TX_DISABLE_ERROR_CHECKING defined.
ThreadX provides simulated interrupt handling with Linux pthreads. Simulated
interrupt threads may be created by the application or may be added to the
-simulated timer interrupt defined in tx_initialize_low_level.c. The following
+simulated timer interrupt defined in tx_initialize_low_level.c. The following
format for creating simulated interrupts should be used:
6.1 Data structures
@@ -113,7 +133,7 @@ struct sched_param sp;
6.3 Simulated Interrupt Thread Template
The following is a template for the simulated interrupt thread. This interrupt will occur on
-a periodic basis.
+a periodic basis.
void *_sample_linux_interrupt_entry(void *p)
{
@@ -134,7 +154,7 @@ struct timespec ts;
/* Call ThreadX context restore for interrupt completion. */
_tx_thread_context_restore();
- }
+ }
}
diff --git a/ports/linux/gnu/src/tx_initialize_low_level.c b/ports/linux/gnu/src/tx_initialize_low_level.c
index d3516aaa..32de408f 100644
--- a/ports/linux/gnu/src/tx_initialize_low_level.c
+++ b/ports/linux/gnu/src/tx_initialize_low_level.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Initialize */
/** */
@@ -42,18 +43,18 @@ sem_t _tx_linux_semaphore_no_idle;
ULONG _tx_linux_global_int_disabled_flag;
struct timespec _tx_linux_time_stamp;
__thread int _tx_linux_threadx_thread = 0;
-
+
/* Define signals for linux thread. */
#define SUSPEND_SIG SIGUSR1
#define RESUME_SIG SIGUSR2
static sigset_t _tx_linux_thread_wait_mask;
-static __thread int _tx_linux_thread_suspended;
+static __thread int _tx_linux_thread_suspended;
static sem_t _tx_linux_thread_timer_wait;
static sem_t _tx_linux_thread_other_wait;
/* Define simulated timer interrupt. This is done inside a thread, which is
- how other interrupts may be defined as well. See code below for an
+ how other interrupts may be defined as well. See code below for an
example. */
pthread_t _tx_linux_timer_id;
@@ -136,11 +137,11 @@ pthread_mutex_t temp_copy;
/* Now move to the next entry. */
_tx_linux_debug_entry_index++;
-
+
/* Determine if we need to wrap the list. */
if (_tx_linux_debug_entry_index >= TX_LINUX_DEBUG_EVENT_SIZE)
{
-
+
/* Yes, wrap the list! */
_tx_linux_debug_entry_index = 0;
}
@@ -169,54 +170,48 @@ VOID _tx_thread_context_restore(VOID);
extern VOID *_tx_initialize_unused_memory;
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_initialize_low_level Linux/GNU */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_initialize_low_level Linux/GNU */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function is responsible for any low-level processor */
-/* initialization, including setting up interrupt vectors, setting */
-/* up a periodic timer interrupt source, saving the system stack */
-/* pointer for use in ISR processing later, and finding the first */
-/* available RAM memory address for tx_application_define. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* sched_setaffinity */
-/* getpid */
-/* _tx_linux_thread_init */
-/* pthread_setschedparam */
-/* pthread_mutexattr_init */
-/* pthread_mutex_init */
-/* _tx_linux_thread_suspend */
-/* sem_init */
-/* pthread_create */
-/* printf */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_initialize_kernel_enter ThreadX entry function */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function is responsible for any low-level processor */
+/* initialization, including setting up interrupt vectors, setting */
+/* up a periodic timer interrupt source, saving the system stack */
+/* pointer for use in ISR processing later, and finding the first */
+/* available RAM memory address for tx_application_define. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* sched_setaffinity */
+/* getpid */
+/* _tx_linux_thread_init */
+/* pthread_setschedparam */
+/* pthread_mutexattr_init */
+/* pthread_mutex_init */
+/* _tx_linux_thread_suspend */
+/* sem_init */
+/* pthread_create */
+/* printf */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
/**************************************************************************/
VOID _tx_initialize_low_level(VOID)
@@ -238,7 +233,7 @@ cpu_set_t mask;
CPU_SET(rand() % get_nprocs(), &mask);
if (sched_setaffinity(getpid(), sizeof(mask), &mask) != 0)
{
-
+
/* Error restricting the process to one core. */
printf("ThreadX Linux error restricting the process to one core!\n");
while(1)
@@ -260,7 +255,7 @@ cpu_set_t mask;
sp.sched_priority = TX_LINUX_PRIORITY_SCHEDULE;
pthread_setschedparam(pthread_self(), SCHED_FIFO, &sp);
- /* Create the system critical section. This is used by the
+ /* Create the system critical section. This is used by the
scheduler thread (which is the main thread) to block all
other stuff out. */
pthread_mutexattr_init(&attr);
@@ -273,10 +268,10 @@ cpu_set_t mask;
/* Initialize the global interrupt disabled flag. */
_tx_linux_global_int_disabled_flag = TX_FALSE;
-
+
/* Create semaphore for timer thread. */
sem_init(&_tx_linux_timer_semaphore, 0, 0);
-
+
/* Create semaphore for ISR thread. */
sem_init(&_tx_linux_isr_semaphore, 0, 0);
@@ -302,7 +297,7 @@ cpu_set_t mask;
/* This routine is called after initialization is complete in order to start
- all interrupt threads. Interrupt threads in addition to the timer may
+ all interrupt threads. Interrupt threads in addition to the timer may
be added to this routine as well. */
void _tx_initialize_start_interrupts(void)
@@ -377,7 +372,7 @@ int err;
tx_linux_mutex_unlock(_tx_linux_mutex);
#endif /* TX_LINUX_NO_IDLE_ENABLE */
- }
+ }
}
/* Define functions for linux thread. */
@@ -395,11 +390,11 @@ void _tx_linux_thread_suspend_handler(int sig)
else
tx_linux_sem_post_nolock(&_tx_linux_thread_other_wait);
- if(_tx_linux_thread_suspended)
+ if(_tx_linux_thread_suspended)
return;
_tx_linux_thread_suspended = 1;
- sigsuspend(&_tx_linux_thread_wait_mask);
+ sigsuspend(&_tx_linux_thread_wait_mask);
_tx_linux_thread_suspended = 0;
}
diff --git a/ports/linux/gnu/src/tx_thread_context_restore.c b/ports/linux/gnu/src/tx_thread_context_restore.c
index 5466b30e..3d7b44bb 100644
--- a/ports/linux/gnu/src/tx_thread_context_restore.c
+++ b/ports/linux/gnu/src/tx_thread_context_restore.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Thread */
/** */
@@ -31,50 +32,44 @@
extern sem_t _tx_linux_isr_semaphore;
UINT _tx_linux_timer_waiting = 0;
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_thread_context_restore Linux/GNU */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_context_restore Linux/GNU */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function restores the interrupt context if it is processing a */
-/* nested interrupt. If not, it returns to the interrupt thread if no */
-/* preemption is necessary. Otherwise, if preemption is necessary or */
-/* if no thread was running, the function returns to the scheduler. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* _tx_linux_debug_entry_insert */
-/* tx_linux_mutex_lock */
-/* sem_trywait */
-/* tx_linux_sem_post */
-/* tx_linux_sem_wait */
-/* _tx_linux_thread_resume */
-/* tx_linux_mutex_recursive_unlock */
-/* */
-/* CALLED BY */
-/* */
-/* ISRs Interrupt Service Routines */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function restores the interrupt context if it is processing a */
+/* nested interrupt. If not, it returns to the interrupt thread if no */
+/* preemption is necessary. Otherwise, if preemption is necessary or */
+/* if no thread was running, the function returns to the scheduler. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* _tx_linux_debug_entry_insert */
+/* tx_linux_mutex_lock */
+/* sem_trywait */
+/* tx_linux_sem_post */
+/* tx_linux_sem_wait */
+/* _tx_linux_thread_resume */
+/* tx_linux_mutex_recursive_unlock */
+/* */
+/* CALLED BY */
+/* */
+/* ISRs Interrupt Service Routines */
/* */
/**************************************************************************/
VOID _tx_thread_context_restore(VOID)
@@ -101,7 +96,7 @@ VOID _tx_thread_context_restore(VOID)
if ((_tx_thread_preempt_disable == 0) && (_tx_thread_current_ptr != _tx_thread_execute_ptr))
{
- /* Preempt the running application thread. We don't need to suspend the
+ /* Preempt the running application thread. We don't need to suspend the
application thread since that is done in the context save processing. */
/* Indicate that this thread was suspended asynchronously. */
diff --git a/ports/linux/gnu/src/tx_thread_context_save.c b/ports/linux/gnu/src/tx_thread_context_save.c
index c98943fa..7bca3945 100644
--- a/ports/linux/gnu/src/tx_thread_context_save.c
+++ b/ports/linux/gnu/src/tx_thread_context_save.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Thread */
/** */
@@ -30,46 +31,40 @@
#include "tx_timer.h"
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_thread_context_save Linux/GNU */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_context_save Linux/GNU */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function saves the context of an executing thread in the */
-/* beginning of interrupt processing. The function also ensures that */
-/* the system stack is used upon return to the calling ISR. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* _tx_linux_debug_entry_insert */
-/* tx_linux_mutex_lock */
-/* _tx_linux_thread_suspend */
-/* tx_linux_mutex_unlock */
-/* */
-/* CALLED BY */
-/* */
-/* ISRs */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function saves the context of an executing thread in the */
+/* beginning of interrupt processing. The function also ensures that */
+/* the system stack is used upon return to the calling ISR. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* _tx_linux_debug_entry_insert */
+/* tx_linux_mutex_lock */
+/* _tx_linux_thread_suspend */
+/* tx_linux_mutex_unlock */
+/* */
+/* CALLED BY */
+/* */
+/* ISRs */
/* */
/**************************************************************************/
VOID _tx_thread_context_save(VOID)
diff --git a/ports/linux/gnu/src/tx_thread_interrupt_control.c b/ports/linux/gnu/src/tx_thread_interrupt_control.c
index 657cf72e..75b62511 100644
--- a/ports/linux/gnu/src/tx_thread_interrupt_control.c
+++ b/ports/linux/gnu/src/tx_thread_interrupt_control.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Thread */
/** */
@@ -47,53 +48,47 @@ VOID _tx_thread_interrupt_restore(UINT previous_posture)
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_thread_interrupt_control Linux/GNU */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_interrupt_control Linux/GNU */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function is responsible for changing the interrupt lockout */
-/* posture of the system. */
-/* */
-/* INPUT */
-/* */
-/* new_posture New interrupt lockout posture */
-/* */
-/* OUTPUT */
-/* */
-/* old_posture Old interrupt lockout posture */
-/* */
-/* CALLS */
-/* */
-/* tx_linux_mutex_lock */
-/* pthread_self */
-/* pthread_getschedparam */
-/* tx_linux_mutex_recursive_unlock */
-/* pthread_exit */
-/* */
-/* CALLED BY */
-/* */
-/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function is responsible for changing the interrupt lockout */
+/* posture of the system. */
+/* */
+/* INPUT */
+/* */
+/* new_posture New interrupt lockout posture */
+/* */
+/* OUTPUT */
+/* */
+/* old_posture Old interrupt lockout posture */
+/* */
+/* CALLS */
+/* */
+/* tx_linux_mutex_lock */
+/* pthread_self */
+/* pthread_getschedparam */
+/* tx_linux_mutex_recursive_unlock */
+/* pthread_exit */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
/* */
/**************************************************************************/
UINT _tx_thread_interrupt_control(UINT new_posture)
{
UINT old_posture;
-TX_THREAD *thread_ptr;
+TX_THREAD *thread_ptr;
pthread_t thread_id;
int exit_code = 0;
@@ -107,18 +102,18 @@ int exit_code = 0;
/* Pickup the current thread pointer. */
thread_ptr = _tx_thread_current_ptr;
- /* Determine if this is a thread and it does not
+ /* Determine if this is a thread and it does not
match the current thread pointer. */
- if ((_tx_linux_threadx_thread) &&
- ((!thread_ptr) || (!pthread_equal(thread_ptr -> tx_thread_linux_thread_id, thread_id))))
- {
+ if ((_tx_linux_threadx_thread) &&
+ ((!thread_ptr) || (!pthread_equal(thread_ptr -> tx_thread_linux_thread_id, thread_id))))
+ {
- /* This indicates the Linux thread was actually terminated by ThreadX is only
+ /* This indicates the Linux thread was actually terminated by ThreadX is only
being allowed to run in order to cleanup its resources. */
/* Unlock linux mutex. */
tx_linux_mutex_recursive_unlock(_tx_linux_mutex);
pthread_exit((void *)&exit_code);
- }
+ }
/* Determine the current interrupt lockout condition. */
if (tx_linux_mutex_recursive_count == 1)
@@ -155,7 +150,7 @@ int exit_code = 0;
_tx_linux_global_int_disabled_flag = TX_TRUE;
}
}
- else if (thread_ptr)
+ else if (thread_ptr)
{
/* Determine how to apply the new posture. */
diff --git a/ports/linux/gnu/src/tx_thread_schedule.c b/ports/linux/gnu/src/tx_thread_schedule.c
index d65104a1..eeff680f 100644
--- a/ports/linux/gnu/src/tx_thread_schedule.c
+++ b/ports/linux/gnu/src/tx_thread_schedule.c
@@ -1,10 +1,11 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -39,7 +40,7 @@ extern pthread_t _tx_linux_timer_id;
/* */
/* FUNCTION RELEASE */
/* */
-/* _tx_thread_schedule Linux/GNU */
+/* _tx_thread_schedule Linux/GNU */
/* 6.1 */
/* AUTHOR */
/* */
@@ -73,12 +74,6 @@ extern pthread_t _tx_linux_timer_id;
/* */
/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
-/* */
/**************************************************************************/
VOID _tx_thread_schedule(VOID)
{
@@ -127,9 +122,9 @@ struct timespec ts;
ts.tv_sec++;
}
sem_timedwait(&_tx_linux_semaphore_no_idle, &ts);
-#else
+#else
nanosleep(&ts, &ts);
-#endif /* TX_LINUX_NO_IDLE_ENABLE */
+#endif /* TX_LINUX_NO_IDLE_ENABLE */
}
}
diff --git a/ports/linux/gnu/src/tx_thread_stack_build.c b/ports/linux/gnu/src/tx_thread_stack_build.c
index 424f53e2..cdadba6c 100644
--- a/ports/linux/gnu/src/tx_thread_stack_build.c
+++ b/ports/linux/gnu/src/tx_thread_stack_build.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Thread */
/** */
@@ -36,50 +37,44 @@
void *_tx_linux_thread_entry(void *ptr);
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_thread_stack_build Linux/GNU */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_stack_build Linux/GNU */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function builds a stack frame on the supplied thread's stack. */
/* The stack frame results in a fake interrupt return to the supplied */
-/* function pointer. */
-/* */
-/* INPUT */
-/* */
+/* function pointer. */
+/* */
+/* INPUT */
+/* */
/* thread_ptr Pointer to thread control blk */
/* function_ptr Pointer to return function */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* pthread_create */
-/* pthread_setschedparam */
-/* _tx_linux_thread_suspend */
-/* sem_init */
-/* printf */
-/* _tx_linux_thread_resume */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_thread_create Create thread service */
-/* _tx_thread_reset Reset thread service */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* pthread_create */
+/* pthread_setschedparam */
+/* _tx_linux_thread_suspend */
+/* sem_init */
+/* printf */
+/* _tx_linux_thread_resume */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_thread_create Create thread service */
+/* _tx_thread_reset Reset thread service */
/* */
/**************************************************************************/
VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -115,11 +110,11 @@ struct sched_param sp;
sp.sched_priority = TX_LINUX_PRIORITY_USER_THREAD;
pthread_setschedparam(thread_ptr -> tx_thread_linux_thread_id, SCHED_FIFO, &sp);
- /* Setup the thread suspension type to solicited thread suspension.
+ /* Setup the thread suspension type to solicited thread suspension.
Pseudo interrupt handlers will suspend with this field set to 1. */
thread_ptr -> tx_thread_linux_suspension_type = 0;
- /* Clear the disabled count that will keep track of the
+ /* Clear the disabled count that will keep track of the
tx_interrupt_control nesting. */
thread_ptr -> tx_thread_linux_int_disabled_flag = 0;
diff --git a/ports/linux/gnu/src/tx_thread_system_return.c b/ports/linux/gnu/src/tx_thread_system_return.c
index 16d81d59..cc876721 100644
--- a/ports/linux/gnu/src/tx_thread_system_return.c
+++ b/ports/linux/gnu/src/tx_thread_system_return.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Thread */
/** */
@@ -30,54 +31,48 @@
#include
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_thread_system_return Linux/GNU */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_system_return Linux/GNU */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function is target processor specific. It is used to transfer */
-/* control from a thread back to the system. Only a minimal context */
-/* is saved since the compiler assumes temp registers are going to get */
-/* slicked by a function call anyway. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* _tx_linux_debug_entry_insert */
-/* tx_linux_mutex_lock */
-/* pthread_self */
-/* pthread_getschedparam */
-/* pthread_equal */
-/* tx_linux_mutex_recursive_unlock */
-/* tx_linux_mutex_unlock */
-/* pthread_exit */
-/* tx_linux_sem_post */
-/* sem_trywait */
-/* tx_linux_sem_wait */
-/* */
-/* CALLED BY */
-/* */
-/* ThreadX components */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function is target processor specific. It is used to transfer */
+/* control from a thread back to the system. Only a minimal context */
+/* is saved since the compiler assumes temp registers are going to get */
+/* slicked by a function call anyway. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* _tx_linux_debug_entry_insert */
+/* tx_linux_mutex_lock */
+/* pthread_self */
+/* pthread_getschedparam */
+/* pthread_equal */
+/* tx_linux_mutex_recursive_unlock */
+/* tx_linux_mutex_unlock */
+/* pthread_exit */
+/* tx_linux_sem_post */
+/* sem_trywait */
+/* tx_linux_sem_wait */
+/* */
+/* CALLED BY */
+/* */
+/* ThreadX components */
/* */
/**************************************************************************/
VOID _tx_thread_system_return(VOID)
@@ -104,13 +99,13 @@ int exit_code = 0;
/* Pickup the current thread pointer. */
temp_thread_ptr = _tx_thread_current_ptr;
- /* Determine if this is a thread (0) and it does not
+ /* Determine if this is a thread (0) and it does not
match the current thread pointer. */
- if ((_tx_linux_threadx_thread) &&
- ((!temp_thread_ptr) || (!pthread_equal(temp_thread_ptr -> tx_thread_linux_thread_id, thread_id))))
- {
+ if ((_tx_linux_threadx_thread) &&
+ ((!temp_thread_ptr) || (!pthread_equal(temp_thread_ptr -> tx_thread_linux_thread_id, thread_id))))
+ {
- /* This indicates the Linux thread was actually terminated by ThreadX is only
+ /* This indicates the Linux thread was actually terminated by ThreadX is only
being allowed to run in order to cleanup its resources. */
/* Unlock linux mutex. */
tx_linux_mutex_recursive_unlock(_tx_linux_mutex);
@@ -176,19 +171,19 @@ int exit_code = 0;
/* Pickup the current thread pointer. */
temp_thread_ptr = _tx_thread_current_ptr;
- /* Determine if this is a thread and it does not
+ /* Determine if this is a thread and it does not
match the current thread pointer. */
- if ((_tx_linux_threadx_thread) &&
- ((!temp_thread_ptr) || (!pthread_equal(temp_thread_ptr -> tx_thread_linux_thread_id, thread_id))))
- {
+ if ((_tx_linux_threadx_thread) &&
+ ((!temp_thread_ptr) || (!pthread_equal(temp_thread_ptr -> tx_thread_linux_thread_id, thread_id))))
+ {
/* Unlock Linux mutex. */
tx_linux_mutex_recursive_unlock(_tx_linux_mutex);
- /* This indicates the Linux thread was actually terminated by ThreadX and is only
+ /* This indicates the Linux thread was actually terminated by ThreadX and is only
being allowed to run in order to cleanup its resources. */
pthread_exit((void *)&exit_code);
- }
+ }
/* Now determine if the application thread last had interrupts disabled. */
diff --git a/ports/linux/gnu/src/tx_timer_interrupt.c b/ports/linux/gnu/src/tx_timer_interrupt.c
index 8e55ca7f..d139fd9b 100644
--- a/ports/linux/gnu/src/tx_timer_interrupt.c
+++ b/ports/linux/gnu/src/tx_timer_interrupt.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Timer */
/** */
@@ -30,49 +31,43 @@
VOID _tx_timer_interrupt(VOID);
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_timer_interrupt Linux/GNU */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_timer_interrupt Linux/GNU */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function processes the hardware timer interrupt. This */
-/* processing includes incrementing the system clock and checking for */
-/* time slice and/or timer expiration. If either is found, the */
-/* interrupt context save/restore functions are called along with the */
-/* expiration functions. */
-/* */
-/* INPUT */
-/* */
-/* None */
-/* */
-/* OUTPUT */
-/* */
-/* None */
-/* */
-/* CALLS */
-/* */
-/* _tx_linux_debug_entry_insert */
-/* tx_linux_mutex_lock */
-/* tx_linux_mutex_unlock */
-/* _tx_timer_expiration_process */
-/* _tx_thread_time_slice */
-/* */
-/* CALLED BY */
-/* */
-/* interrupt vector */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function processes the hardware timer interrupt. This */
+/* processing includes incrementing the system clock and checking for */
+/* time slice and/or timer expiration. If either is found, the */
+/* interrupt context save/restore functions are called along with the */
+/* expiration functions. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* _tx_linux_debug_entry_insert */
+/* tx_linux_mutex_lock */
+/* tx_linux_mutex_unlock */
+/* _tx_timer_expiration_process */
+/* _tx_thread_time_slice */
+/* */
+/* CALLED BY */
+/* */
+/* interrupt vector */
/* */
/**************************************************************************/
VOID _tx_timer_interrupt(VOID)
diff --git a/ports/risc-v32/clang/CMakeLists.txt b/ports/risc-v32/clang/CMakeLists.txt
new file mode 100644
index 00000000..9b725103
--- /dev/null
+++ b/ports/risc-v32/clang/CMakeLists.txt
@@ -0,0 +1,19 @@
+
+target_sources(${PROJECT_NAME}
+ PRIVATE
+ # {{BEGIN_TARGET_SOURCES}}
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_initialize_low_level.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_restore.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_save.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_control.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_schedule.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_build.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_return.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_interrupt.S
+ # {{END_TARGET_SOURCES}}
+)
+
+target_include_directories(${PROJECT_NAME}
+ PUBLIC
+ ${CMAKE_CURRENT_LIST_DIR}/inc
+)
diff --git a/ports/risc-v32/clang/example_build/qemu_virt/board.c b/ports/risc-v32/clang/example_build/qemu_virt/board.c
new file mode 100644
index 00000000..47f828d4
--- /dev/null
+++ b/ports/risc-v32/clang/example_build/qemu_virt/board.c
@@ -0,0 +1,42 @@
+/***************************************************************************
+ * Copyright (c) 2026 Quintauris
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+#include "plic.h"
+#include "hwtimer.h"
+#include "uart.h"
+#include
+#include
+
+void *memset(void *des, int c,size_t n)
+{
+ if((des == NULL) || n <=0)
+ return (void*)des;
+ char* t = (char*)des;
+ int i;
+ for(i=0;i
+
+static inline uint32_t riscv_get_core()
+{
+ uint32_t x;
+ asm volatile("csrr %0, mhartid" : "=r" (x) );
+ return x;
+}
+
+static inline uint32_t riscv_get_mstatus()
+{
+ uint32_t x;
+ asm volatile("csrr %0, mstatus" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_mstatus(uint32_t x)
+{
+ asm volatile("csrw mstatus, %0" : : "r" (x));
+}
+
+static inline void riscv_writ_mepc(uint32_t x)
+{
+ asm volatile("csrw mepc, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_sstatus()
+{
+ uint32_t x;
+ asm volatile("csrr %0, sstatus" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_sstatus(uint32_t x)
+{
+ asm volatile("csrw sstatus, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_sip()
+{
+ uint32_t x;
+ asm volatile("csrr %0, sip" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_sip(uint32_t x)
+{
+ asm volatile("csrw sip, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_sie()
+{
+ uint32_t x;
+ asm volatile("csrr %0, sie" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_sie(uint32_t x)
+{
+ asm volatile("csrw sie, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_mie()
+{
+ uint32_t x;
+ asm volatile("csrr %0, mie" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_mie(uint32_t x)
+{
+ asm volatile("csrw mie, %0" : : "r" (x));
+}
+
+static inline void riscv_writ_sepc(uint32_t x)
+{
+ asm volatile("csrw sepc, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_sepc()
+{
+ uint32_t x;
+ asm volatile("csrr %0, sepc" : "=r" (x) );
+ return x;
+}
+
+static inline uint32_t riscv_get_medeleg()
+{
+ uint32_t x;
+ asm volatile("csrr %0, medeleg" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_medeleg(uint32_t x)
+{
+ asm volatile("csrw medeleg, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_mideleg()
+{
+ uint32_t x;
+ asm volatile("csrr %0, mideleg" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_mideleg(uint32_t x)
+{
+ asm volatile("csrw mideleg, %0" : : "r" (x));
+}
+
+static inline void riscv_writ_stvec(uint32_t x)
+{
+ asm volatile("csrw stvec, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_stvec()
+{
+ uint32_t x;
+ asm volatile("csrr %0, stvec" : "=r" (x) );
+ return x;
+}
+
+static inline uint32_t riscv_get_stimecmp()
+{
+ uint32_t x;
+ asm volatile("csrr %0, 0x14d" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_stimecmp(uint32_t x)
+{
+ asm volatile("csrw 0x14d, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_menvcfg()
+{
+ uint32_t x;
+ asm volatile("csrr %0, 0x30a" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_menvcfg(uint32_t x)
+{
+ asm volatile("csrw 0x30a, %0" : : "r" (x));
+}
+
+static inline void riscv_writ_pmpcfg0(uint32_t x)
+{
+ asm volatile("csrw pmpcfg0, %0" : : "r" (x));
+}
+
+static inline void riscv_writ_pmpaddr0(uint32_t x)
+{
+ asm volatile("csrw pmpaddr0, %0" : : "r" (x));
+}
+
+static inline void riscv_writ_satp(uint32_t x)
+{
+ asm volatile("csrw satp, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_satp()
+{
+ uint32_t x;
+ asm volatile("csrr %0, satp" : "=r" (x) );
+ return x;
+}
+
+static inline uint32_t riscv_get_scause()
+{
+ uint32_t x;
+ asm volatile("csrr %0, scause" : "=r" (x) );
+ return x;
+}
+
+static inline uint32_t riscv_get_stval()
+{
+ uint32_t x;
+ asm volatile("csrr %0, stval" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_mcounteren(uint32_t x)
+{
+ asm volatile("csrw mcounteren, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_mcounteren()
+{
+ uint32_t x;
+ asm volatile("csrr %0, mcounteren" : "=r" (x) );
+ return x;
+}
+
+static inline uint32_t riscv_get_time()
+{
+ uint32_t x;
+ asm volatile("csrr %0, time" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_sintr_on()
+{
+ uint32_t sstatus = riscv_get_sstatus();
+ sstatus |= SSTATUS_SIE;
+ riscv_writ_sstatus(sstatus);
+}
+
+static inline void riscv_sintr_off()
+{
+ uint32_t sstatus = riscv_get_sstatus();
+ sstatus &= (~SSTATUS_SIE);
+ riscv_writ_sstatus(sstatus);
+}
+
+static inline int riscv_sintr_get()
+{
+ uint32_t x = riscv_get_sstatus();
+ return (x & SSTATUS_SIE) != 0;
+}
+
+static inline void riscv_sintr_restore(int x)
+{
+ if(x)
+ riscv_sintr_on();
+ else
+ riscv_sintr_off();
+}
+
+static inline void riscv_mintr_on()
+{
+ uint32_t mstatus = riscv_get_mstatus();
+ mstatus |= MSTATUS_MIE;
+ riscv_writ_mstatus(mstatus);
+}
+
+static inline void riscv_mintr_off()
+{
+ uint32_t mstatus = riscv_get_mstatus();
+ mstatus &= (~MSTATUS_MIE);
+ riscv_writ_mstatus(mstatus);
+}
+
+static inline int riscv_mintr_get()
+{
+ uint32_t x = riscv_get_mstatus();
+ return (x & MSTATUS_MIE) != 0;
+}
+
+static inline void riscv_mintr_restore(int x)
+{
+ if(x)
+ riscv_mintr_on();
+ else
+ riscv_mintr_off();
+}
+
+static inline uint32_t riscv_get_sp()
+{
+ uint32_t x;
+ asm volatile("mv %0, sp" : "=r" (x) );
+ return x;
+}
+
+// read and write tp, the thread pointer, which xv6 uses to hold
+// this core's hartid (core number), the index into cpus[].
+static inline uint32_t riscv_get_tp()
+{
+ uint32_t x;
+ asm volatile("mv %0, tp" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_tp(uint32_t x)
+{
+ asm volatile("mv tp, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_ra()
+{
+ uint32_t x;
+ asm volatile("mv %0, ra" : "=r" (x) );
+ return x;
+}
+
+// flush the TLB.
+static inline void sfence_vma()
+{
+ // the zero, zero means flush all TLB entries.
+ asm volatile("sfence.vma zero, zero");
+}
+
+#endif // __ASSEMBLER__
+
+#endif
diff --git a/ports/risc-v32/clang/example_build/qemu_virt/demo_threadx.c b/ports/risc-v32/clang/example_build/qemu_virt/demo_threadx.c
new file mode 100644
index 00000000..a5955b29
--- /dev/null
+++ b/ports/risc-v32/clang/example_build/qemu_virt/demo_threadx.c
@@ -0,0 +1,397 @@
+/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ byte pool, and block pool. */
+
+#include "tx_api.h"
+#include "uart.h"
+
+#define DEMO_STACK_SIZE 1024
+#define DEMO_BYTE_POOL_SIZE 9120
+#define DEMO_BLOCK_POOL_SIZE 100
+#define DEMO_QUEUE_SIZE 100
+
+char *_to_str(ULONG val)
+{
+ static char buf[11]; /* 10 digits max + '\0' */
+ char *p = buf + sizeof(buf) - 1;
+
+ *p = '\0';
+ do {
+ *--p = '0' + (val % 10);
+ val /= 10;
+ } while (val);
+
+ return p;
+}
+
+/* Define the ThreadX object control blocks... */
+
+TX_THREAD thread_0;
+TX_THREAD thread_1;
+TX_THREAD thread_2;
+TX_THREAD thread_3;
+TX_THREAD thread_4;
+TX_THREAD thread_5;
+TX_THREAD thread_6;
+TX_THREAD thread_7;
+TX_QUEUE queue_0;
+TX_SEMAPHORE semaphore_0;
+TX_MUTEX mutex_0;
+TX_EVENT_FLAGS_GROUP event_flags_0;
+TX_BYTE_POOL byte_pool_0;
+TX_BLOCK_POOL block_pool_0;
+
+
+/* Define the counters used in the demo application... */
+
+ULONG thread_0_counter;
+ULONG thread_1_counter;
+ULONG thread_1_messages_sent;
+ULONG thread_2_counter;
+ULONG thread_2_messages_received;
+ULONG thread_3_counter;
+ULONG thread_4_counter;
+ULONG thread_5_counter;
+ULONG thread_6_counter;
+ULONG thread_7_counter;
+
+
+/* Define thread prototypes. */
+
+void thread_0_entry(ULONG thread_input);
+void thread_1_entry(ULONG thread_input);
+void thread_2_entry(ULONG thread_input);
+void thread_3_and_4_entry(ULONG thread_input);
+void thread_5_entry(ULONG thread_input);
+void thread_6_and_7_entry(ULONG thread_input);
+
+
+/* Define main entry point. */
+
+int main()
+{
+
+ /* Enter the ThreadX kernel. */
+ tx_kernel_enter();
+}
+
+
+/* Define what the initial system looks like. */
+
+void tx_application_define(void *first_unused_memory)
+{
+ CHAR *pointer = TX_NULL;
+
+ /* Create a byte memory pool from which to allocate the thread stacks. */
+ tx_byte_pool_create(&byte_pool_0, "byte pool 0", first_unused_memory, DEMO_BYTE_POOL_SIZE);
+
+ /* Put system definition stuff in here, e.g. thread creates and other assorted
+ create information. */
+
+ /* Allocate the stack for thread 0. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
+
+ /* Create the main thread. */
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
+ 1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
+
+
+ /* Allocate the stack for thread 1. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
+
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
+ message queue. It is also interesting to note that these threads have a time
+ slice. */
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
+ 16, 16, 4, TX_AUTO_START);
+
+ /* Allocate the stack for thread 2. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
+
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
+ 16, 16, 4, TX_AUTO_START);
+
+ /* Allocate the stack for thread 3. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
+
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ An interesting thing here is that both threads share the same instruction area. */
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
+ 8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
+
+ /* Allocate the stack for thread 4. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
+
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
+ 8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
+
+ /* Allocate the stack for thread 5. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
+
+ /* Create thread 5. This thread simply pends on an event flag which will be set
+ by thread_0. */
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
+ 4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
+
+ /* Allocate the stack for thread 6. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
+
+ /* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
+ 8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
+
+ /* Allocate the stack for thread 7. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
+
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
+ 8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
+
+ /* Allocate the message queue. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_QUEUE_SIZE*sizeof(ULONG), TX_NO_WAIT);
+
+ /* Create the message queue shared by threads 1 and 2. */
+ tx_queue_create(&queue_0, "queue 0", TX_1_ULONG, pointer, DEMO_QUEUE_SIZE*sizeof(ULONG));
+
+ /* Create the semaphore used by threads 3 and 4. */
+ tx_semaphore_create(&semaphore_0, "semaphore 0", 1);
+
+ /* Create the event flags group used by threads 1 and 5. */
+ tx_event_flags_create(&event_flags_0, "event flags 0");
+
+ /* Create the mutex used by thread 6 and 7 without priority inheritance. */
+ tx_mutex_create(&mutex_0, "mutex 0", TX_NO_INHERIT);
+
+ /* Allocate the memory for a small block pool. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_BLOCK_POOL_SIZE, TX_NO_WAIT);
+
+ /* Create a block memory pool to allocate a message buffer from. */
+ tx_block_pool_create(&block_pool_0, "block pool 0", sizeof(ULONG), pointer, DEMO_BLOCK_POOL_SIZE);
+
+ /* Allocate a block and release the block memory. */
+ tx_block_allocate(&block_pool_0, (VOID **) &pointer, TX_NO_WAIT);
+
+ /* Release the block back to the pool. */
+ tx_block_release(pointer);
+}
+
+
+
+/* Define the test threads. */
+
+void thread_0_entry(ULONG thread_input)
+{
+
+UINT status;
+
+
+ /* This thread simply sits in while-forever-sleep loop. */
+ while(1)
+ {
+ puts("[Thread] : thread_0_entry is here!");
+
+ /* Increment the thread counter. */
+ thread_0_counter++;
+
+ /* Sleep for 10 ticks. */
+ tx_thread_sleep(10);
+
+ /* Set event flag 0 to wakeup thread 5. */
+ status = tx_event_flags_set(&event_flags_0, 0x1, TX_OR);
+
+ /* Check status. */
+ if (status != TX_SUCCESS)
+ break;
+ }
+}
+
+
+void thread_1_entry(ULONG thread_input)
+{
+
+UINT status;
+
+ /* This thread simply sends messages to a queue shared by thread 2. */
+ while(1)
+ {
+ puts("[Thread] : thread_1_entry is here!");
+ /* Increment the thread counter. */
+ thread_1_counter++;
+
+ /* Send message to queue 0. */
+ status = tx_queue_send(&queue_0, &thread_1_messages_sent, TX_WAIT_FOREVER);
+
+ tx_thread_sleep(2);
+
+ /* Check completion status. */
+ if (status != TX_SUCCESS) {
+ puts("[Thread 1] ERROR: Failed to send message!");
+ break;
+ }
+
+ /* Increment the message sent. */
+ thread_1_messages_sent++;
+ }
+}
+
+
+
+void thread_2_entry(ULONG thread_input)
+{
+
+ULONG received_message;
+UINT status;
+
+ /* This thread retrieves messages placed on the queue by thread 1. */
+ while(1)
+ {
+ puts("[Thread] : thread_2_entry is here!");
+ /* Increment the thread counter. */
+ thread_2_counter++;
+
+ /* Retrieve a message from the queue. */
+ status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
+
+ tx_thread_sleep(2);
+
+ /* Check completion status and make sure the message is what we
+ expected. */
+ if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received)){
+ puts("[Thread 2] ERROR: Failed to receive message ! Expected # ");
+ uart_puts(_to_str(thread_2_messages_received));
+ puts(", but got # ");
+ uart_puts(_to_str(received_message));
+ break;
+ }
+
+ /* Otherwise, all is okay. Increment the received message count. */
+ thread_2_messages_received++;
+ }
+}
+
+
+void thread_3_and_4_entry(ULONG thread_input)
+{
+
+UINT status;
+
+
+ /* This function is executed from thread 3 and thread 4. As the loop
+ below shows, these function compete for ownership of semaphore_0. */
+ while(1)
+ {
+ puts("[Thread] : thread_3_and_4_entry is here!");
+
+
+ /* Increment the thread counter. */
+ if (thread_input == 3)
+ thread_3_counter++;
+ else
+ thread_4_counter++;
+
+ /* Get the semaphore with suspension. */
+ status = tx_semaphore_get(&semaphore_0, TX_WAIT_FOREVER);
+
+ /* Check status. */
+ if (status != TX_SUCCESS)
+ break;
+
+ /* Sleep for 2 ticks to hold the semaphore. */
+ tx_thread_sleep(2);
+
+ /* Release the semaphore. */
+ status = tx_semaphore_put(&semaphore_0);
+
+ /* Check status. */
+ if (status != TX_SUCCESS)
+ break;
+ }
+}
+
+
+void thread_5_entry(ULONG thread_input)
+{
+
+UINT status;
+ULONG actual_flags;
+
+
+ /* This thread simply waits for an event in a forever loop. */
+ while(1)
+ {
+ puts("[Thread] : thread_5_entry is here!");
+
+ /* Increment the thread counter. */
+ thread_5_counter++;
+
+ /* Wait for event flag 0. */
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ &actual_flags, TX_WAIT_FOREVER);
+
+ /* Check status. */
+ if ((status != TX_SUCCESS) || (actual_flags != 0x1))
+ break;
+ }
+}
+
+
+void thread_6_and_7_entry(ULONG thread_input)
+{
+
+UINT status;
+
+
+ /* This function is executed from thread 6 and thread 7. As the loop
+ below shows, these function compete for ownership of mutex_0. */
+ while(1)
+ {
+ puts("[Thread] : thread_6_and_7_entry is here!");
+
+ /* Increment the thread counter. */
+ if (thread_input == 6)
+ thread_6_counter++;
+ else
+ thread_7_counter++;
+
+ /* Get the mutex with suspension. */
+ status = tx_mutex_get(&mutex_0, TX_WAIT_FOREVER);
+
+ /* Check status. */
+ if (status != TX_SUCCESS)
+ break;
+
+ /* Get the mutex again with suspension. This shows
+ that an owning thread may retrieve the mutex it
+ owns multiple times. */
+ status = tx_mutex_get(&mutex_0, TX_WAIT_FOREVER);
+
+ /* Check status. */
+ if (status != TX_SUCCESS)
+ break;
+
+ /* Sleep for 2 ticks to hold the mutex. */
+ tx_thread_sleep(2);
+
+ /* Release the mutex. */
+ status = tx_mutex_put(&mutex_0);
+
+ /* Check status. */
+ if (status != TX_SUCCESS)
+ break;
+
+ /* Release the mutex again. This will actually
+ release ownership since it was obtained twice. */
+ status = tx_mutex_put(&mutex_0);
+
+ /* Check status. */
+ if (status != TX_SUCCESS)
+ break;
+ }
+}
diff --git a/ports/risc-v32/clang/example_build/qemu_virt/entry.s b/ports/risc-v32/clang/example_build/qemu_virt/entry.s
new file mode 100644
index 00000000..9b202ca1
--- /dev/null
+++ b/ports/risc-v32/clang/example_build/qemu_virt/entry.s
@@ -0,0 +1,58 @@
+
+.section .text
+.align 4
+.global _start
+.extern main
+.extern _sysstack_start
+.extern _bss_start
+.extern _bss_end
+_start:
+ csrr t0, mhartid
+ bne t0, zero, 1f
+ li x1, 0
+ li x2, 0
+ li x3, 0
+ li x4, 0
+ li x5, 0
+ li x6, 0
+ li x7, 0
+ li x8, 0
+ li x9, 0
+ li x10, 0
+ li x11, 0
+ li x12, 0
+ li x13, 0
+ li x14, 0
+ li x15, 0
+ li x16, 0
+ li x17, 0
+ li x18, 0
+ li x19, 0
+ li x20, 0
+ li x21, 0
+ li x22, 0
+ li x23, 0
+ li x24, 0
+ li x25, 0
+ li x26, 0
+ li x27, 0
+ li x28, 0
+ li x29, 0
+ li x30, 0
+ li x31, 0
+ la t0, _sysstack_start
+ li t1, 0x1000
+ add sp, t0, t1
+ la t0, _bss_start
+ la t1, _bss_end
+_bss_clean_start:
+ bgeu t0, t1, _bss_clean_end
+ sb zero, 0(t0)
+ addi t0, t0, 1
+ j _bss_clean_start
+_bss_clean_end:
+ call main
+1:
+ /* todo smp */
+ wfi
+ j 1b
diff --git a/ports/risc-v32/clang/example_build/qemu_virt/hwtimer.c b/ports/risc-v32/clang/example_build/qemu_virt/hwtimer.c
new file mode 100644
index 00000000..b5335cf3
--- /dev/null
+++ b/ports/risc-v32/clang/example_build/qemu_virt/hwtimer.c
@@ -0,0 +1,35 @@
+/***************************************************************************
+ * Copyright (c) 2026 Quintauris
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+#include "tx_port.h"
+#include "csr.h"
+#include "hwtimer.h"
+
+#define CLINT (0x02000000L)
+#define CLINT_TIME (CLINT+0xBFF8)
+#define CLINT_TIMECMP(hart_id) (CLINT+0x4000+8*(hart_id))
+
+
+int hwtimer_init(void)
+{
+ int hart = riscv_get_core();
+ uint64_t time = *((uint64_t*)CLINT_TIME);
+ *((uint64_t*)CLINT_TIMECMP(hart)) = time + TICKNUM_PER_TIMER;
+ return 0;
+}
+
+int hwtimer_handler(void)
+{
+ int hart = riscv_get_core();
+ uint64_t time = *((uint64_t*)CLINT_TIME);
+ *((uint64_t*)CLINT_TIMECMP(hart)) = time + TICKNUM_PER_TIMER;
+ return 0;
+}
+
diff --git a/ports/risc-v32/clang/example_build/qemu_virt/hwtimer.h b/ports/risc-v32/clang/example_build/qemu_virt/hwtimer.h
new file mode 100644
index 00000000..e27a7578
--- /dev/null
+++ b/ports/risc-v32/clang/example_build/qemu_virt/hwtimer.h
@@ -0,0 +1,23 @@
+
+/***************************************************************************
+ * Copyright (c) 2026 Quintauris
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+#ifndef RISCV_HWTIMER_H
+#define RISCV_HWTIMER_H
+
+#include
+
+#define TICKNUM_PER_SECOND 10000000
+#define TICKNUM_PER_TIMER (TICKNUM_PER_SECOND / 10)
+
+int hwtimer_init(void);
+int hwtimer_handler(void);
+
+#endif
diff --git a/ports/risc-v32/clang/example_build/qemu_virt/link.lds b/ports/risc-v32/clang/example_build/qemu_virt/link.lds
new file mode 100644
index 00000000..522f90d9
--- /dev/null
+++ b/ports/risc-v32/clang/example_build/qemu_virt/link.lds
@@ -0,0 +1,49 @@
+OUTPUT_ARCH( "riscv" )
+ENTRY( _start )
+
+SECTIONS
+{
+ /*
+ * ensure that entry.S / _entry is at 0x80000000,
+ * where qemu's -kernel jumps.
+ */
+ . = 0x80000000;
+
+ .text : {
+ *(.text .text.*)
+ . = ALIGN(0x1000);
+ PROVIDE(etext = .);
+ }
+
+ .rodata : {
+ . = ALIGN(16);
+ *(.srodata .srodata.*) /* do not need to distinguish this from .rodata */
+ . = ALIGN(16);
+ *(.rodata .rodata.*)
+ }
+
+ .data : {
+ . = ALIGN(16);
+ *(.sdata .sdata.*) /* do not need to distinguish this from .data */
+ . = ALIGN(16);
+ *(.data .data.*)
+ }
+
+ .bss : {
+ . = ALIGN(16);
+ _bss_start = .;
+ *(.sbss .sbss.*) /* do not need to distinguish this from .bss */
+ . = ALIGN(16);
+ *(.bss .bss.*)
+ _bss_end = .;
+ }
+
+ .stack : {
+ . = ALIGN(4096);
+ _sysstack_start = .;
+ . += 0x1000;
+ _sysstack_end = .;
+ }
+
+ PROVIDE(_end = .);
+}
diff --git a/ports/risc-v32/clang/example_build/qemu_virt/plic.c b/ports/risc-v32/clang/example_build/qemu_virt/plic.c
new file mode 100644
index 00000000..01e5c71a
--- /dev/null
+++ b/ports/risc-v32/clang/example_build/qemu_virt/plic.c
@@ -0,0 +1,72 @@
+#include "plic.h"
+#include
+irq_callback callbacks[MAX_CALLBACK_NUM];
+
+void plic_irq_enable(int irqno)
+{
+ int hart = riscv_get_core();
+ *(uint32_t*)PLIC_MENABLE(hart) = (*(uint32_t*)PLIC_MENABLE(hart) | (1 << irqno));
+ return;
+}
+
+void plic_irq_disable(int irqno)
+{
+ int hart = riscv_get_core();
+ *(uint32_t*)PLIC_MENABLE(hart) = (*(uint32_t*)PLIC_MENABLE(hart) & (~(1 << irqno)));
+ return;
+}
+
+void plic_prio_set(int irqno, int prio)
+{
+ PLIC_SET_PRIO(irqno, prio);
+}
+
+int plic_prio_get(int irqno)
+{
+ return PLIC_GET_PRIO(irqno);
+}
+
+int plic_register_callback(int irqno, irq_callback callback)
+{
+ if(!(irqno >=0 && irqno < MAX_CALLBACK_NUM))
+ return -1;
+ callbacks[irqno] = callback;
+ return 0;
+}
+
+int plic_unregister_callback(int irqno)
+{
+ return plic_register_callback(irqno, NULL);
+}
+
+int plic_init(void)
+{
+ for(int i=0;i
+
+#define PLIC 0x0c000000L
+#define PLIC_PRIORITY (PLIC + 0x0)
+#define PLIC_PENDING (PLIC + 0x1000)
+#define PLIC_MENABLE(hart) (PLIC + 0x2000 + (hart)*0x100)
+#define PLIC_SENABLE(hart) (PLIC + 0x2080 + (hart)*0x100)
+#define PLIC_MPRIORITY(hart) (PLIC + 0x200000 + (hart)*0x2000)
+#define PLIC_SPRIORITY(hart) (PLIC + 0x201000 + (hart)*0x2000)
+#define PLIC_MCLAIM(hart) (PLIC + 0x200004 + (hart)*0x2000)
+#define PLIC_SCLAIM(hart) (PLIC + 0x201004 + (hart)*0x2000)
+#define PLIC_MCOMPLETE(hart) (PLIC + 0x200004 + (hart)*0x2000)
+#define PLIC_SCOMPLETE(hart) (PLIC + 0x201004 + (hart)*0x2000)
+
+
+#define PLIC_GET_PRIO(irqno) (*(uint32_t *)(PLIC_PRIORITY + (irqno)*4))
+#define PLIC_SET_PRIO(irqno, prio) (*(uint32_t *)(PLIC_PRIORITY + (irqno)*4) = (prio))
+
+#define MAX_CALLBACK_NUM 128
+typedef int (*irq_callback)(int irqno);
+
+void plic_irq_enable(int irqno);
+void plic_irq_disable(int irqno);
+int plic_prio_get(int irqno);
+void plic_prio_set(int irqno, int prio);
+int plic_register_callback(int irqno, irq_callback callback);
+int plic_unregister_callback(int irqno);
+int plic_init(void);
+int plic_claim(void);
+void plic_complete(int irqno);
+
+int plic_irq_intr(void);
+
+#endif
+
diff --git a/ports/risc-v32/clang/example_build/qemu_virt/trap.c b/ports/risc-v32/clang/example_build/qemu_virt/trap.c
new file mode 100644
index 00000000..a2733e02
--- /dev/null
+++ b/ports/risc-v32/clang/example_build/qemu_virt/trap.c
@@ -0,0 +1,67 @@
+#include "csr.h"
+#include
+#include "uart.h"
+#include "hwtimer.h"
+#include "plic.h"
+#include
+#include
+
+#define OS_IS_INTERUPT(mcause) (mcause & 0x80000000u)
+#define OS_IS_EXCEPTION(mcause) (~(OS_IS_INTERUPT))
+#define OS_IS_TICK_INT(mcause) (mcause == 0x80000007u)
+#define OS_IS_SOFT_INT(mcause) (mcause == 0x80000003u)
+#define OS_IS_EXT_INT(mcause) (mcause == 0x8000000bu)
+#define OS_IS_TRAP_USER(mcause) (mcause == 0x0000000bu)
+extern void _tx_timer_interrupt(void);
+
+extern int uart_putc(int ch);
+
+static void print_hex(uintptr_t val)
+{
+ char digits[] = "0123456789ABCDEF";
+ uart_putc('0');
+ uart_putc('x');
+ for(int i = (sizeof(uintptr_t)*2) - 1; i >= 0; i--) {
+ int d = (val >> (i*4)) & 0xF;
+ uart_putc(digits[d]);
+ }
+ uart_putc('\n');
+}
+
+void trap_handler(uintptr_t mcause, uintptr_t mepc, uintptr_t mtval)
+{
+ // uart_puts("DEBUG : threadx/ports/risc-v32/gnu/example_build/qemu_virt/trap.c, trap_handler\n");
+ if(OS_IS_INTERUPT(mcause))
+ {
+ if(OS_IS_TICK_INT(mcause))
+ {
+ hwtimer_handler();
+ _tx_timer_interrupt();
+ }
+ else if(OS_IS_EXT_INT(mcause))
+ {
+ int ret = plic_irq_intr();
+ if(ret)
+ {
+ puts("[INTERRUPT]: handler irq error!");
+ while(1) ;
+ }
+ }
+ else
+ {
+ puts("[INTERRUPT]: now can't deal with the interrupt!");
+ while(1) ;
+ }
+ }
+ else
+ {
+ puts("[EXCEPTION] : Unkown Error!!");
+ puts("mcause:");
+ print_hex(mcause);
+ puts("mepc:");
+ print_hex(mepc);
+ puts("mtval:");
+ print_hex(mtval);
+ while(1) ;
+ }
+}
diff --git a/ports/risc-v32/clang/example_build/qemu_virt/tx_initialize_low_level.S b/ports/risc-v32/clang/example_build/qemu_virt/tx_initialize_low_level.S
new file mode 100644
index 00000000..f3cd99a1
--- /dev/null
+++ b/ports/risc-v32/clang/example_build/qemu_virt/tx_initialize_low_level.S
@@ -0,0 +1,172 @@
+/***************************************************************************
+ * Copyright (c) 2026 Quintauris
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+#include "csr.h"
+#include "tx_port.h"
+
+ .section .text
+ .align 4
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* trap_entry RISC-V32/GNU */
+/* 6.4.x */
+/* AUTHOR */
+/* */
+/* Francisco Merino, Quintauris */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function is responsible for riscv processor trap handle */
+/* It will do the contex save and call c trap_handler and do contex */
+/* load */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* trap_handler */
+/* */
+/* CALLED BY */
+/* */
+/* hardware exception */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Initialize */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+ .global trap_entry
+ .extern trap_handler
+ .extern _tx_thread_context_restore
+ trap_entry:
+#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double)
+ addi sp, sp, -65*4 // Allocate space for all registers - with floating point enabled
+#else
+ addi sp, sp, -32*4 // Allocate space for all registers - without floating point enabled
+#endif
+
+ sw x1, 28*4(sp) // Store RA, 28*4(because call will override ra [ra is a calle register in riscv])
+
+ call _tx_thread_context_save
+
+ csrr a0, mcause
+ csrr a1, mepc
+ csrr a2, mtval
+ addi sp, sp, -4
+ sw ra, 0(sp)
+ call trap_handler
+ lw ra, 0(sp)
+ addi sp, sp, 4
+ call _tx_thread_context_restore
+ // it will nerver return
+_err:
+ wfi
+ j _err
+ .section .text
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_initialize_low_level RISC-V32/GNU */
+/* 6.4.x */
+/* AUTHOR */
+/* */
+/* Francisco Merino, Quintauris */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function is responsible for any low-level processor */
+/* initialization, including setting up interrupt vectors, setting */
+/* up a periodic timer interrupt source, saving the system stack */
+/* pointer for use in ISR processing later, and finding the first */
+/* available RAM memory address for tx_application_define. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_initialize_kernel_enter ThreadX entry function */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 26-02-2026 Francisco Merino Adapted for RV32 Clang */
+/* */
+/**************************************************************************/
+/* VOID _tx_initialize_low_level(VOID)
+{ */
+// .global _tx_initialize_low_level
+ .weak _tx_initialize_low_level
+ .extern _end
+ .extern board_init
+_tx_initialize_low_level:
+
+/* debug print
+ .section .rodata
+debug_str_init:
+ .string "DEBUG : threadx/ports/risc-v32/gnu/example_build/qemu_virt/tx_initialize_low_level.S, _tx_initialize_low_level\n"
+*/
+ .section .text
+
+ la t0, _tx_thread_system_stack_ptr
+ sw sp, 0(t0) // Save system stack pointer
+
+ la t0, _end // Pickup first free address
+ la t1, _tx_initialize_unused_memory
+ sw t0, 0(t1) // Save unused memory address
+ li t0, MSTATUS_MIE
+ csrrc zero, mstatus, t0 // clear MSTATUS_MIE bit
+ li t0, (MSTATUS_MPP_M | MSTATUS_MPIE )
+ csrrs zero, mstatus, t0 // set MSTATUS_MPP, MPIE bit
+ li t0, (MIE_MTIE | MIE_MSIE | MIE_MEIE)
+ csrrs zero, mie, t0 // set mie
+#ifdef __riscv_flen
+ li t0, MSTATUS_FS
+ csrrs zero, mstatus, t0 // set MSTATUS_FS bit to open f/d isa in riscv
+ fscsr x0
+#endif
+ addi sp, sp, -4
+ sw ra, 0(sp)
+ call board_init
+/* debug print
+ la a0, debug_str_init
+ call uart_puts
+*/
+ lw ra, 0(sp)
+ addi sp, sp, 4
+ la t0, trap_entry
+ csrw mtvec, t0
+ ret
diff --git a/ports/risc-v32/clang/example_build/qemu_virt/uart.c b/ports/risc-v32/clang/example_build/qemu_virt/uart.c
new file mode 100644
index 00000000..a175b7d2
--- /dev/null
+++ b/ports/risc-v32/clang/example_build/qemu_virt/uart.c
@@ -0,0 +1,102 @@
+#include "uart.h"
+#include "csr.h"
+#include "plic.h"
+#include
+
+// the UART control registers are memory-mapped
+// at address UART0. this macro returns the
+// address of one of the registers.
+#define Reg(reg) ((volatile unsigned char *)(UART0 + (reg)))
+
+// the UART control registers.
+// some have different meanings for
+// read vs write.
+// see http://byterunner.com/16550.html
+#define RHR 0 // receive holding register (for input bytes)
+#define THR 0 // transmit holding register (for output bytes)
+#define IER 1 // interrupt enable register
+#define IER_RX_ENABLE (1<<0)
+#define IER_TX_ENABLE (1<<1)
+#define FCR 2 // FIFO control register
+#define FCR_FIFO_ENABLE (1<<0)
+#define FCR_FIFO_CLEAR (3<<1) // clear the content of the two FIFOs
+#define ISR 2 // interrupt status register
+#define LCR 3 // line control register
+#define LCR_EIGHT_BITS (3<<0)
+#define LCR_BAUD_LATCH (1<<7) // special mode to set baud rate
+#define LSR 5 // line status register
+#define LSR_RX_READY (1<<0) // input is waiting to be read from RHR
+#define LSR_TX_IDLE (1<<5) // THR can accept another character to send
+
+#define ReadReg(reg) (*(Reg(reg)))
+#define WriteReg(reg, v) (*(Reg(reg)) = (v))
+
+int uart_init(void)
+{
+ // disable interrupts.
+ WriteReg(IER, 0x00);
+
+ // special mode to set baud rate.
+ WriteReg(LCR, LCR_BAUD_LATCH);
+
+ // LSB for baud rate of 38.4K.
+ WriteReg(0, 0x03);
+
+ // MSB for baud rate of 38.4K.
+ WriteReg(1, 0x00);
+
+ // leave set-baud mode,
+ // and set word length to 8 bits, no parity.
+ WriteReg(LCR, LCR_EIGHT_BITS);
+
+ // reset and enable FIFOs.
+ WriteReg(FCR, FCR_FIFO_ENABLE | FCR_FIFO_CLEAR);
+
+ // enable transmit and receive interrupts.
+ // WriteReg(IER, IER_TX_ENABLE | IER_RX_ENABLE);
+
+ //enable UART0 in PLIC
+ plic_irq_enable(UART0_IRQ);
+
+ //set UART0 priority in PLIC
+ plic_prio_set(UART0_IRQ, 1);
+
+ //register callback for UART0
+ //plic_register_callback(UART0_IRQ, uart_intr);
+ puts("[UART0] : Uart Init Done, this is Test output!");
+ return 0;
+}
+
+void uart_putc_nolock(int ch)
+{
+ // wait for Transmit Holding Empty to be set in LSR.
+ while((ReadReg(LSR) & LSR_TX_IDLE) == 0)
+ ;
+ WriteReg(THR, ch);
+ return;
+}
+
+int uart_putc(int ch)
+{
+ int intr_enable = riscv_mintr_get();
+ riscv_mintr_off();
+ uart_putc_nolock(ch);
+ riscv_mintr_restore(intr_enable);
+ return 1;
+}
+
+int uart_puts(const char* str)
+{
+ int i;
+ int intr_enable = riscv_mintr_get();
+ riscv_mintr_off();
+ for(i=0;str[i]!=0;i++)
+ {
+ uart_putc_nolock(str[i]);
+ }
+ uart_putc_nolock('\n');
+ riscv_mintr_restore(intr_enable);
+ return i;
+}
+
+
diff --git a/ports/risc-v32/clang/example_build/qemu_virt/uart.h b/ports/risc-v32/clang/example_build/qemu_virt/uart.h
new file mode 100644
index 00000000..debfd9df
--- /dev/null
+++ b/ports/risc-v32/clang/example_build/qemu_virt/uart.h
@@ -0,0 +1,23 @@
+/***************************************************************************
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+#ifndef RISCV_UART_H
+#define RISCV_UART_H
+
+#define UART0 0x10000000L
+#define UART0_IRQ 10
+
+#define puts uart_puts
+int uart_init(void);
+int uart_putc(int ch);
+void uart_putc_nolock(int ch);
+int uart_puts(const char* str);
+#endif
diff --git a/ports/risc-v32/clang/inc/tx_port.h b/ports/risc-v32/clang/inc/tx_port.h
new file mode 100644
index 00000000..f89c148c
--- /dev/null
+++ b/ports/risc-v32/clang/inc/tx_port.h
@@ -0,0 +1,285 @@
+/***************************************************************************
+ * Copyright (c) 2025 Quintauris
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Port Specific */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+
+/**************************************************************************/
+/* */
+/* PORT SPECIFIC C INFORMATION RELEASE */
+/* */
+/* tx_port.h RISC-V32/GNU */
+/* 6.4.x */
+/* */
+/* AUTHOR */
+/* */
+/* Francisco Merino, Quintauris */
+/* */
+/* DESCRIPTION */
+/* */
+/* This file contains data type definitions that make the ThreadX */
+/* real-time kernel function identically on a variety of different */
+/* processor architectures. For example, the size or number of bits */
+/* in an "int" data type vary between microprocessor architectures and */
+/* even C compilers for the same microprocessor. ThreadX does not */
+/* directly use native C data types. Instead, ThreadX creates its */
+/* own special types that can be mapped to actual data types by this */
+/* file to guarantee consistency in the interface and functionality. */
+/* */
+/**************************************************************************/
+
+#ifndef TX_PORT_H
+#define TX_PORT_H
+
+#ifndef __ASSEMBLER__
+
+/* Include for memset. */
+#include
+
+
+/* Determine if the optional ThreadX user define file should be used. */
+
+#ifdef TX_INCLUDE_USER_DEFINE_FILE
+
+
+/* Yes, include the user defines in tx_user.h. The defines in this file may
+ alternately be defined on the command line. */
+
+#include "tx_user.h"
+#endif /* TX_INCLUDE_USER_DEFINE_FILE */
+
+#endif /* __ASSEMBLER__ */
+
+
+/* Define ThreadX basic types for this port. */
+
+#define VOID void
+
+#ifndef __ASSEMBLER__
+typedef char CHAR;
+typedef unsigned char UCHAR;
+typedef int INT;
+typedef unsigned int UINT;
+typedef long LONG;
+typedef unsigned long ULONG;
+typedef unsigned long long ULONG64;
+typedef short SHORT;
+typedef unsigned short USHORT;
+#define ULONG64_DEFINED
+#endif /* __ASSEMBLER__ */
+
+
+
+
+/* Define the priority levels for ThreadX. Legal values range
+ from 32 to 1024 and MUST be evenly divisible by 32. */
+
+#ifndef TX_MAX_PRIORITIES
+#define TX_MAX_PRIORITIES 32
+#endif
+
+
+/* Define the minimum stack for a ThreadX thread on this processor. If the size supplied during
+ thread creation is less than this value, the thread create call will return an error. */
+
+#ifndef TX_MINIMUM_STACK
+#define TX_MINIMUM_STACK 1024 /* Minimum stack size for this port */
+#endif
+
+
+/* Define the system timer thread's default stack size and priority. These are only applicable
+ if TX_TIMER_PROCESS_IN_ISR is not defined. */
+
+#ifndef TX_TIMER_THREAD_STACK_SIZE
+#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */
+#endif
+
+#ifndef TX_TIMER_THREAD_PRIORITY
+#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
+#endif
+
+
+/* Define various constants for the ThreadX RISC-V port. */
+
+#define TX_INT_DISABLE 0x00000000 /* Disable interrupts value */
+#define TX_INT_ENABLE 0x00000008 /* Enable interrupt value */
+
+
+/* Define the clock source for trace event entry time stamp. The following two item are port specific.
+ For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
+ source constants would be:
+
+#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
+#define TX_TRACE_TIME_MASK 0x0000FFFFUL
+
+*/
+
+#ifndef TX_TRACE_TIME_SOURCE
+#define TX_TRACE_TIME_SOURCE ++_tx_trace_simulated_time
+#endif
+#ifndef TX_TRACE_TIME_MASK
+#define TX_TRACE_TIME_MASK 0xFFFFFFFFUL
+#endif
+
+
+/* Define the port specific options for the _tx_build_options variable. This variable indicates
+ how the ThreadX library was built. */
+
+#define TX_PORT_SPECIFIC_BUILD_OPTIONS 0
+
+
+/* Define the in-line initialization constant so that modules with in-line
+ initialization capabilities can prevent their initialization from being
+ a function call. */
+
+#define TX_INLINE_INITIALIZATION
+
+
+/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
+ disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
+ checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
+ define is negated, thereby forcing the stack fill which is necessary for the stack checking
+ logic. */
+
+#ifdef TX_ENABLE_STACK_CHECKING
+#undef TX_DISABLE_STACK_FILLING
+#endif
+
+
+/* Define the TX_THREAD control block extensions for this port. The main reason
+ for the multiple macros is so that backward compatibility can be maintained with
+ existing ThreadX kernel awareness modules. */
+
+#define TX_THREAD_EXTENSION_0
+#define TX_THREAD_EXTENSION_1
+#define TX_THREAD_EXTENSION_2
+#define TX_THREAD_EXTENSION_3
+
+
+/* Define the port extensions of the remaining ThreadX objects. */
+
+#define TX_BLOCK_POOL_EXTENSION
+#define TX_BYTE_POOL_EXTENSION
+#define TX_EVENT_FLAGS_GROUP_EXTENSION
+#define TX_MUTEX_EXTENSION
+#define TX_QUEUE_EXTENSION
+#define TX_SEMAPHORE_EXTENSION
+#define TX_TIMER_EXTENSION
+
+
+/* Define the user extension field of the thread control block. Nothing
+ additional is needed for this port so it is defined as white space. */
+
+#ifndef TX_THREAD_USER_EXTENSION
+#define TX_THREAD_USER_EXTENSION
+#endif
+
+
+/* Define the macros for processing extensions in tx_thread_create, tx_thread_delete,
+ tx_thread_shell_entry, and tx_thread_terminate. */
+
+#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
+#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
+#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
+#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)
+
+
+/* Define the ThreadX object creation extensions for the remaining objects. */
+
+#define TX_BLOCK_POOL_CREATE_EXTENSION(pool_ptr)
+#define TX_BYTE_POOL_CREATE_EXTENSION(pool_ptr)
+#define TX_EVENT_FLAGS_GROUP_CREATE_EXTENSION(group_ptr)
+#define TX_MUTEX_CREATE_EXTENSION(mutex_ptr)
+#define TX_QUEUE_CREATE_EXTENSION(queue_ptr)
+#define TX_SEMAPHORE_CREATE_EXTENSION(semaphore_ptr)
+#define TX_TIMER_CREATE_EXTENSION(timer_ptr)
+
+
+/* Define the ThreadX object deletion extensions for the remaining objects. */
+
+#define TX_BLOCK_POOL_DELETE_EXTENSION(pool_ptr)
+#define TX_BYTE_POOL_DELETE_EXTENSION(pool_ptr)
+#define TX_EVENT_FLAGS_GROUP_DELETE_EXTENSION(group_ptr)
+#define TX_MUTEX_DELETE_EXTENSION(mutex_ptr)
+#define TX_QUEUE_DELETE_EXTENSION(queue_ptr)
+#define TX_SEMAPHORE_DELETE_EXTENSION(semaphore_ptr)
+#define TX_TIMER_DELETE_EXTENSION(timer_ptr)
+
+
+/* Define ThreadX interrupt lockout and restore macros for protection on
+ access of critical kernel information. The restore interrupt macro must
+ restore the interrupt posture of the running thread prior to the value
+ present prior to the disable macro. In most cases, the save area macro
+ is used to define a local function save area for the disable and restore
+ macros. */
+
+/* Expose helper used to perform an atomic read/modify/write of mstatus.
+ The helper composes and returns the posture per ThreadX contract. */
+#ifndef __ASSEMBLER__
+UINT _tx_thread_interrupt_control(UINT new_posture);
+#endif
+
+#ifdef TX_DISABLE_INLINE
+
+#define TX_INTERRUPT_SAVE_AREA register UINT interrupt_save;
+
+#define TX_DISABLE __asm__ volatile("csrrci %0, mstatus, 8" : "=r" (interrupt_save) :: "memory");
+#define TX_RESTORE { \
+ unsigned long _temp_mstatus; \
+ __asm__ volatile( \
+ "csrc mstatus, 8\n" \
+ "andi %0, %1, 8\n" \
+ "csrs mstatus, %0" \
+ : "=&r" (_temp_mstatus) \
+ : "r" (interrupt_save) \
+ : "memory"); \
+ }
+
+#else
+
+#define TX_INTERRUPT_SAVE_AREA register UINT interrupt_save;
+
+#define TX_DISABLE interrupt_save = _tx_thread_interrupt_control(TX_INT_DISABLE);
+#define TX_RESTORE _tx_thread_interrupt_control(interrupt_save);
+
+#endif /* TX_DISABLE_INLINE */
+
+
+/* Define the interrupt lockout macros for each ThreadX object. */
+
+#define TX_BLOCK_POOL_DISABLE TX_DISABLE
+#define TX_BYTE_POOL_DISABLE TX_DISABLE
+#define TX_EVENT_FLAGS_GROUP_DISABLE TX_DISABLE
+#define TX_MUTEX_DISABLE TX_DISABLE
+#define TX_QUEUE_DISABLE TX_DISABLE
+#define TX_SEMAPHORE_DISABLE TX_DISABLE
+
+
+/* Define the version ID of ThreadX. This may be utilized by the application. */
+
+#ifndef __ASSEMBLER__
+#ifdef TX_THREAD_INIT
+CHAR _tx_version_id[] =
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX RISC-V32/GNU Version 6.5.0.202601 *";
+#else
+extern CHAR _tx_version_id[];
+#endif /* TX_THREAD_INIT */
+#endif /* __ASSEMBLER__ */
+
+#endif /* TX_PORT_H */
\ No newline at end of file
diff --git a/ports/risc-v32/clang/readme_threadx.txt b/ports/risc-v32/clang/readme_threadx.txt
new file mode 100644
index 00000000..ce838553
--- /dev/null
+++ b/ports/risc-v32/clang/readme_threadx.txt
@@ -0,0 +1,442 @@
+ Eclipse Foundation's RTOS, ThreadX for RISC-V32
+
+ Using the Clang Tools
+
+
+1. Building the ThreadX run-time Library
+
+Prerequisites
+- Install a RISC-V32 bare-metal Clang toolchain
+- Install a RISC-V32 bare-metal GNU toolchain with riscv32-unknown-elf prefix.
+ Common source: https://github.com/riscv-collab/riscv-gnu-toolchain
+
+The GNU toolchain is needed because the Clang toolchain does not include some
+standard headers and libraries, i.e. "string.h".
+
+Verify the Clang toolchain:
+ clang --version
+
+Verify the GCC toolchain:
+ riscv32-unknown-elf-gcc --version
+ riscv32-unknown-elf-objdump --version
+
+CMake-based build (recommended)
+
+From the ThreadX top-level directory:
+
+ Set environment variable "GCC_INSTALL_PREFIX" with the location of the
+ GNU toolchain, i.e., export GCC_INSTALL_PREFIX=/opt/riscv_rv32ima
+
+ cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE=cmake/riscv32_clang.cmake .
+ cmake --build ./build/
+
+This uses cmake/riscv32_clang.cmake and ports/risc-v32/clang/CMakeLists.txt to
+configure the cross-compiler flags and produce the ThreadX run-time library
+and example binaries.
+
+Example build script
+
+The example demonstration contains a build script. See:
+
+ ports/risc-v32/clang/example_build/qemu_virt/build_libthreadx.sh
+
+This script builds the library and the demo application kernel.elf.
+
+
+2. Demonstration System (QEMU)
+
+The provided example is targeted at QEMU's virt platform. After building the
+example, the produced kernel.elf can be executed in QEMU:
+
+ qemu-system-riscv32 -nographic -smp 1 -bios none -m 128M -machine virt -kernel kernel.elf
+
+Typical QEMU features used:
+- Single-core CPU
+- UART serial console
+- PLIC (Platform-Level Interrupt Controller)
+- CLINT (Core-Local Interruptor) for timer
+
+
+3. System Initialization
+
+Entry Point
+
+The example startup code begins at the _start label in entry.s. This startup
+code performs hardware initialization including:
+- Check hart ID (only hart 0 continues; others enter WFI loop)
+- Zero general-purpose registers
+- Set up initial stack pointer
+- Clear BSS section
+- Jump to main()
+
+Low-Level Port Initialization (tx_initialize_low_level.S)
+
+The _tx_initialize_low_level function:
+- Saves the system stack pointer to _tx_thread_system_stack_ptr
+- Records first free RAM address from __tx_free_memory_start symbol
+- Initializes floating-point control/status register (FCSR) if floating point enabled
+
+Board Initialization (board.c)
+
+After tx_initialize_low_level returns, main() calls board_init() to:
+- Initialize PLIC (Platform-Level Interrupt Controller)
+- Initialize UART
+- Initialize hardware timer (CLINT)
+- Set trap vector (mtvec) to point to trap handler
+
+
+4. Register Usage and Stack Frames
+
+The RISC-V32 ABI defines t0-t6 and a0-a7 as caller-saved (scratch) registers.
+All other registers used by a function must be preserved by the function.
+
+ThreadX takes advantage of this: when a context switch happens during a
+function call, only the non-scratch registers need to be saved.
+
+Stack Frame Types
+
+Two types of stack frames exist:
+
+A. Interrupt Frame (stack type = 1)
+ Created when an interrupt occurs during thread execution.
+ Saves all registers including caller-saved registers.
+ Size: 65*4 = 260 bytes (with FP), or 32*4 = 128 bytes (without FP)
+
+B. Solicited Frame (stack type = 0)
+ Created when a thread voluntarily yields via ThreadX service calls.
+ Saves only callee-saved registers (s0-s11) and mstatus.
+ Size: 29*4 = 116 bytes (with FP), or 16*4 = 64 bytes (without FP)
+
+
+Stack Layout for Interrupt Frame (with FP enabled):
+
+ Index Offset Register Description
+ ─────────────────────────────────────────────────
+ 0 0x00 -- Stack type (1 = interrupt)
+ 1 0x04 s11 Preserved register
+ 2 0x08 s10 Preserved register
+ 3 0x0C s9 Preserved register
+ 4 0x10 s8 Preserved register
+ 5 0x14 s7 Preserved register
+ 6 0x18 s6 Preserved register
+ 7 0x1C s5 Preserved register
+ 8 0x20 s4 Preserved register
+ 9 0x24 s3 Preserved register
+ 10 0x28 s2 Preserved register
+ 11 0x2C s1 Preserved register
+ 12 0x30 s0 Preserved register
+ 13 0x34 t6 Scratch register
+ 14 0x38 t5 Scratch register
+ 15 0x3C t4 Scratch register
+ 16 0x40 t3 Scratch register
+ 17 0x44 t2 Scratch register
+ 18 0x48 t1 Scratch register
+ 19 0x4C t0 Scratch register
+ 20 0x50 a7 Argument register
+ 21 0x54 a6 Argument register
+ 22 0x58 a5 Argument register
+ 23 0x5C a4 Argument register
+ 24 0x60 a3 Argument register
+ 25 0x64 a2 Argument register
+ 26 0x68 a1 Argument register
+ 27 0x6C a0 Argument register
+ 28 0x70 ra Return address
+ 29 0x74 -- Reserved
+ 30 0x78 mepc Machine exception PC
+ 31-46 0x7C-0xB8 fs0-fs7 Preserved FP registers*
+ 47-62 0xBC-0xF8 ft0-ft11 Scratch FP registers*
+ 63 0xFC fcsr FP control/status register
+ ─────────────────────────────────────────────────
+ *Note: In ilp32d ABI, FP registers are 8 bytes each, but current
+ port implementation uses 4-byte indexing which may cause
+ overlap if fsd/fld are used.
+
+
+5. Interrupt Handling
+
+Machine Mode Operation
+
+ThreadX operates in machine mode (M-mode), the highest privilege level.
+All interrupts and exceptions trap to machine mode.
+
+Interrupt Sources
+
+1. Machine Timer Interrupt (MTI):
+ - Triggered by CLINT when mtime >= mtimecmp
+ - Handled by _tx_timer_interrupt (src/tx_timer_interrupt.S)
+ - Called from trap handler in trap.c
+
+2. External Interrupts (MEI):
+ - Routed through PLIC
+ - Handler in trap.c calls registered ISR callbacks
+
+3. Software Interrupts (MSI):
+ - Supported but not actively used in this port
+
+Interrupt Flow
+
+1. Hardware trap entry (automatic):
+ - mepc <- PC (address of interrupted instruction)
+ - mcause <- exception/interrupt code
+ - mstatus.MPIE <- mstatus.MIE (save interrupt-enable state)
+ - mstatus.MIE <- 0 (disable interrupts)
+ - mstatus.MPP <- Machine mode
+ - PC <- mtvec (points to trap_entry in entry.s)
+
+2. Trap entry (entry.s):
+ - Allocates interrupt stack frame (32*4 or 65*4 bytes depending on FP)
+ - Saves RA (x1) on stack
+ - Calls _tx_thread_context_save
+
+3. Context save (_tx_thread_context_save.S):
+ - Increments _tx_thread_system_state (nested interrupt counter)
+ - If nested interrupt: saves remaining registers and returns to ISR
+ - If first interrupt: saves full context, switches to system stack
+
+4. Trap handler (trap.c):
+ - Examines mcause to determine interrupt type
+ - Dispatches to appropriate handler (_tx_timer_interrupt or PLIC handler)
+ - Returns to context restore
+
+5. Context restore (_tx_thread_context_restore.S):
+ - Decrements _tx_thread_system_state
+ - Checks if preemption needed
+ - Restores thread context or switches to next ready thread via scheduler
+ - Returns to interrupted thread or executes new thread
+
+
+Interrupt Control Macros
+
+TX_DISABLE and TX_RESTORE macros atomically manage the MIE bit in mstatus:
+
+ TX_DISABLE: Saves and clears MIE bit via csrrci (CSR read-clear immediate)
+ TX_RESTORE: Restores only MIE bit via csrrs (CSR read-set)
+ Other mstatus bits remain unchanged
+
+These are defined in ports/risc-v32/gnu/inc/tx_port.h and use the
+_tx_thread_interrupt_control() function.
+
+
+6. Thread Scheduling and Context Switching
+
+Thread Scheduler (src/tx_thread_schedule.S)
+
+The scheduler:
+1. Enables interrupts while waiting for next thread
+2. Spins until _tx_thread_execute_ptr becomes non-NULL
+3. Disables interrupts (critical section)
+4. Sets _tx_thread_current_ptr = _tx_thread_execute_ptr
+5. Increments thread's run count
+6. Switches to thread's stack
+7. Determines stack frame type and restores context:
+ - Interrupt frame: full context restored, returns via mret
+ - Solicited frame: minimal context restored, returns via ret
+
+Initial Thread Stack Frame (src/tx_thread_stack_build.S)
+
+New threads start with a fake interrupt frame containing:
+- All registers initialized to 0
+- ra (x1) = 0
+- mepc = entry function pointer
+- Stack type = 1 (interrupt frame)
+- Floating-point registers initialized based on ABI
+
+
+7. Port Configuration and Macros
+
+Default Configurations (in ports/risc-v32/gnu/inc/tx_port.h):
+
+ TX_MINIMUM_STACK 1024 /* Minimum thread stack size */
+ TX_TIMER_THREAD_STACK_SIZE 1024 /* Timer thread stack size */
+ TX_TIMER_THREAD_PRIORITY 0 /* Timer thread priority */
+ TX_MAX_PRIORITIES 32 /* Must be multiple of 32 */
+
+These can be overridden in tx_user.h or on the compiler command line.
+
+
+8. Build Configuration
+
+CMake Toolchain File: cmake/riscv32_gnu.cmake
+
+Compiler Flags:
+ -march=rv32gc RV32 with IMAFD+C extensions
+ -mabi=ilp32d 32-bit integers/pointers, double-precision FP in registers
+ -mcmodel=medany ±2GB addressability
+ -D__ASSEMBLER__ For assembly files
+
+ABI Selection
+
+The port uses ilp32d ABI which includes:
+- 32-bit integers and pointers
+- Double-precision floating-point arguments in registers
+- Floating-point registers f0-f31
+
+When building with floating-point ABI:
+- FP registers and FCSR are saved/restored in context switches
+- Stack frames expand from 32*REGBYTES to 65*REGBYTES
+- Conditional compilation uses __riscv_float_abi_double / __riscv_float_abi_single
+
+
+9. File Organization
+
+Port-specific files (ports/risc-v32/gnu/):
+
+Core assembly files (src/):
+ - tx_initialize_low_level.S Initial setup and system state
+ - tx_thread_context_save.S Save context on interrupt entry
+ - tx_thread_context_restore.S Restore context on interrupt exit
+ - tx_thread_schedule.S Thread scheduler
+ - tx_thread_system_return.S Solicited context save for voluntary yield
+ - tx_thread_stack_build.S Build initial stack frame for new thread
+ - tx_thread_interrupt_control.S Interrupt enable/disable control
+ - tx_timer_interrupt.S Timer interrupt handler
+
+Header file (inc/):
+ - tx_port.h Port-specific defines and macros
+
+Example files (example_build/qemu_virt/):
+ - entry.s Startup code, trap entry point
+ - board.c, uart.c, hwtimer.c Platform-specific initialization
+ - plic.c PLIC interrupt controller driver
+ - trap.c Trap/exception dispatcher
+ - link.lds Linker script for QEMU virt
+ - build_libthreadx.sh Build script
+
+
+10. Linker Script Requirements
+
+The linker script must provide:
+
+1. Entry point:
+ ENTRY(_start)
+
+2. Memory layout:
+ - .text section (code)
+ - .rodata section (read-only data)
+ - .data section (initialized data)
+ - .bss section (uninitialized data)
+
+3. Symbols:
+ - _end: First free memory address (used by ThreadX allocation)
+ - _bss_start, _bss_end: For zero initialization
+ - Initial stack space (example: 4KB)
+
+4. Alignment:
+ - 16-byte alignment throughout (RISC-V requirement)
+
+Example from QEMU virt build:
+
+ SECTIONS
+ {
+ . = 0x80000000; /* QEMU virt base address */
+
+ .text : { *(.text .text.*) }
+ .rodata : { *(.rodata .rodata.*) }
+ .data : { *(.data .data.*) }
+ .bss : { *(.bss .bss.*) }
+
+ .stack : {
+ . = ALIGN(4096);
+ _sysstack_start = .;
+ . += 0x1000; /* 4KB initial stack */
+ _sysstack_end = .;
+ }
+
+ PROVIDE(_end = .);
+ }
+
+
+11. Floating-Point Support
+
+When building with ilp32d ABI and FP enabled:
+
+- FP registers f0-f31 and FCSR are saved/restored during context switches
+- Stack frames increase from 32*REGBYTES to 65*REGBYTES (128 to 260 bytes)
+- MSTATUS.FS (floating-point state) field is set to indicate dirty FP state
+
+Stack frame differences:
+- Without FP: 32*4 = 128 bytes (interrupt), 16*4 = 64 bytes (solicited)
+- With FP: 65*4 = 260 bytes (interrupt), 29*4 = 116 bytes (solicited)
+
+
+12. Performance and Debugging
+
+Performance Optimization
+
+Build optimizations:
+- Use -O2 or -O3 for production (example uses -O0 for debugging)
+- Enable -Wl,--gc-sections to remove unused code
+- Define TX_DISABLE_ERROR_CHECKING to remove parameter checks
+- Consider -flto for link-time optimization
+
+Debugging with QEMU and GDB
+
+Start QEMU in debug mode:
+ qemu-system-riscv32 -nographic -smp 1 -bios none -m 128M \
+ -machine virt -kernel kernel.elf -s -S
+
+ -s: Enable GDB server on TCP port 1234
+ -S: Pause at startup waiting for GDB
+
+Connect GDB:
+ riscv32-unknown-elf-gdb kernel.elf
+ (gdb) target remote :1234
+ (gdb) break main
+ (gdb) continue
+
+Useful GDB commands:
+ (gdb) info registers # View general registers
+ (gdb) info all-registers # Include CSR and FP registers
+ (gdb) p/x $mstatus # View machine status register
+ (gdb) x/32xw $sp # Examine stack memory
+ (gdb) p *_tx_thread_current_ptr # View current thread control block
+
+
+13. Platform-Specific Notes (QEMU virt)
+
+PLIC Configuration
+
+The PLIC (Platform-Level Interrupt Controller) is memory-mapped at 0x0C000000:
+
+- Enables up to 1024 interrupt sources
+- Supports priority levels 0-7 (0 = disabled)
+- Requires per-hart priority threshold and enable register configuration
+
+Example PLIC usage (from plic.c):
+ plic_irq_enable(irq_number); # Enable specific interrupt
+ plic_prio_set(irq_number, priority);# Set priority level
+
+CLINT Configuration
+
+The CLINT (Core-Local Interruptor) is memory-mapped at 0x02000000:
+
+- CLINT_MSIP(hartid): 0x0000 + 4*hartid (software interrupt)
+- CLINT_MTIMECMP(hartid): 0x4000 + 8*hartid (timer compare)
+- CLINT_MTIME: 0xBFF8 (timer value, read-only)
+
+Timer frequency is platform-dependent (example uses 10MHz).
+
+Multi-Core Considerations
+
+The current port is single-core focused:
+- Only hart 0 continues from reset; others enter WFI loop
+- _tx_thread_system_state is a global variable
+- No per-hart data structures
+
+
+14. Revision History
+
+For generic code revision information, refer to readme_threadx_generic.txt.
+
+The following details the revision history for this RISC-V32 GNU port:
+
+01-26-2026 Akif Ejaz Brief rewrite with accurate
+ technical details matching implementation,
+ register naming per RISC-V ABI, and
+ complete interrupt flow documentation
+ (Adapted from RISC-V64 port)
+
+
+Copyright (c) 1996-2026 Microsoft Corporation
+
+https://azure.com/rtos
diff --git a/ports/risc-v64/gnu/src/tx_timer_interrupt.c b/ports/risc-v32/clang/src/tx_initialize_low_level.S
similarity index 50%
rename from ports/risc-v64/gnu/src/tx_timer_interrupt.c
rename to ports/risc-v32/clang/src/tx_initialize_low_level.S
index 3c90d0a6..467c3735 100644
--- a/ports/risc-v64/gnu/src/tx_timer_interrupt.c
+++ b/ports/risc-v32/clang/src/tx_initialize_low_level.S
@@ -1,10 +1,10 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2026 Quintauris
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
@@ -14,36 +14,34 @@
/** */
/** ThreadX Component */
/** */
-/** Timer */
+/** Initialize */
/** */
/**************************************************************************/
/**************************************************************************/
-#define TX_SOURCE_CODE
+ .section .data
+ .global __tx_free_memory_start
+__tx_free_memory_start:
-/* Include necessary system files. */
-
-#include "tx_api.h"
-#include "tx_timer.h"
-#include "tx_thread.h"
+ .section .text
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
-/* _tx_timer_interrupt RISC-V64/GNU */
-/* 6.2.1 */
+/* _tx_initialize_low_level RISC-V32/GNU */
+/* 6.4.x */
/* AUTHOR */
/* */
-/* Scott Larson, Microsoft Corporation */
+/* Francisco Merino, Quintauris */
/* */
/* DESCRIPTION */
/* */
-/* This function processes the hardware timer interrupt. This */
-/* processing includes incrementing the system clock and checking for */
-/* time slice and/or timer expiration. If either is found, the */
-/* interrupt context save/restore functions are called along with the */
-/* expiration functions. */
+/* This function is responsible for any low-level processor */
+/* initialization, including setting up interrupt vectors, setting */
+/* up a periodic timer interrupt source, saving the system stack */
+/* pointer for use in ISR processing later, and finding the first */
+/* available RAM memory address for tx_application_define. */
/* */
/* INPUT */
/* */
@@ -55,80 +53,60 @@
/* */
/* CALLS */
/* */
-/* _tx_timer_expiration_process Timer expiration processing */
-/* _tx_thread_time_slice Time slice interrupted thread */
+/* None */
/* */
/* CALLED BY */
/* */
-/* interrupt vector */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
-/* */
-/* 03-08-2023 Scott Larson Initial Version 6.2.1 */
+/* _tx_initialize_kernel_enter ThreadX entry function */
/* */
/**************************************************************************/
-VOID _tx_timer_interrupt(VOID)
-{
- /* Increment system clock. */
- _tx_timer_system_clock++;
+/* VOID _tx_initialize_low_level(VOID)
+{ */
+// .global _tx_initialize_low_level
+ .weak _tx_initialize_low_level
+_tx_initialize_low_level:
- /* Test for time-slice expiration. */
- if (_tx_timer_time_slice)
- {
- /* Decrement the time_slice. */
- _tx_timer_time_slice--;
+ /* Save the system stack pointer. */
+ /* _tx_thread_system_stack_ptr = sp; */
- /* Check for expiration. */
- if (_tx_timer_time_slice == 0)
- {
+ la t0, _tx_thread_system_stack_ptr // Pickup address of system stack ptr
+ sw sp, 0(t0) // Save system stack pointer
- /* Set the time-slice expired flag. */
- _tx_timer_expired_time_slice = TX_TRUE;
- }
- }
+ /* Pickup first free address. */
+ /* _tx_initialize_unused_memory(__tx_free_memory_start); */
- /* Test for timer expiration. */
- if (*_tx_timer_current_ptr)
- {
+ la t0, __tx_free_memory_start // Pickup first free address
+ la t1, _tx_initialize_unused_memory // Pickup address of unused memory
+ sw t0, 0(t1) // Save unused memory address
- /* Set expiration flag. */
- _tx_timer_expired = TX_TRUE;
- }
- else
- {
+ /* Initialize floating point control/status register if floating point is enabled. */
+#ifdef __riscv_flen
+ li t0, 0
+ csrw fcsr, t0 // Clear FP control/status register
+#endif
- /* No timer expired, increment the timer pointer. */
- _tx_timer_current_ptr++;
+ ret
- /* Check for wrap-around. */
- if (_tx_timer_current_ptr == _tx_timer_list_end)
- {
+/* Timer Interrupt Handler Note:
+ Platform-specific implementations must provide their own timer ISR.
+ The timer interrupt handler should follow this execution flow:
- /* Wrap to beginning of list. */
- _tx_timer_current_ptr = _tx_timer_list_start;
- }
- }
+ 1. Disable interrupts (if not done by hardware exception entry)
+ 2. Allocate interrupt stack frame (65*4 bytes with FP, 32*4 bytes without)
+ 3. Save RA (x1) on the stack at offset 28*4
+ 4. Call _tx_thread_context_save to save thread context
+ 5. Call _tx_timer_interrupt to process the timer tick
+ 6. Call _tx_thread_context_restore to resume execution (does not return)
- /* See if anything has expired. */
- if ((_tx_timer_expired_time_slice) || (_tx_timer_expired))
- {
+ Example (for CLINT timer):
- /* Did a timer expire? */
- if (_tx_timer_expired)
- {
+ _tx_timer_interrupt_handler:
+ addi sp, sp, -32*4
+ sw ra, 28*4(sp)
+ call _tx_thread_context_save
+ call _tx_timer_interrupt
+ j _tx_thread_context_restore
- /* Process timer expiration. */
- _tx_timer_expiration_process();
- }
-
- /* Did time slice expire? */
- if (_tx_timer_expired_time_slice)
- {
-
- /* Time slice interrupted thread. */
- _tx_thread_time_slice();
- }
- }
-}
+ The port assumes Machine mode (M-mode) execution.
+ For Supervisor mode (S-mode), use sstatus and SIE/SPIE instead of mstatus.
+ See the RISC-V Privileged Specification for more details. */
\ No newline at end of file
diff --git a/ports/risc-v32/clang/src/tx_thread_context_restore.S b/ports/risc-v32/clang/src/tx_thread_context_restore.S
new file mode 100644
index 00000000..88ac0ce3
--- /dev/null
+++ b/ports/risc-v32/clang/src/tx_thread_context_restore.S
@@ -0,0 +1,410 @@
+/***************************************************************************
+ * Copyright (c) 2025 Quintauris
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Thread */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+ .section .text
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_context_restore RISC-V32/GNU */
+/* 6.4.x */
+/* AUTHOR */
+/* */
+/* Francisco Merino, Quintauris */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function restores the interrupt context if it is processing a */
+/* nested interrupt. If not, it returns to the interrupt thread if no */
+/* preemption is necessary. Otherwise, if preemption is necessary or */
+/* if no thread was running, the function returns to the scheduler. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* _tx_thread_schedule Thread scheduling routine */
+/* */
+/* CALLED BY */
+/* */
+/* ISRs Interrupt Service Routines */
+/* */
+/**************************************************************************/
+/* VOID _tx_thread_context_restore(VOID)
+{ */
+ .global _tx_thread_context_restore
+_tx_thread_context_restore:
+
+ /* Lockout interrupts. */
+
+ csrci mstatus, 0x08 // Disable interrupts (MIE bit 3)
+
+#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
+ call _tx_execution_isr_exit // Call the ISR execution exit function
+#endif
+
+ /* Determine if interrupts are nested. */
+ /* if (--_tx_thread_system_state)
+ { */
+
+ la t0, _tx_thread_system_state // Pickup addr of nested interrupt count
+ lw t1, 0(t0) // Pickup nested interrupt count
+ addi t1, t1, -1 // Decrement the nested interrupt counter
+ sw t1, 0(t0) // Store new nested count
+ beqz t1, _tx_thread_not_nested_restore // If 0, not nested restore
+
+ /* Interrupts are nested. */
+
+ /* Just recover the saved registers and return to the point of
+ interrupt. */
+
+ /* Recover floating point registers. */
+#if defined(__riscv_float_abi_single)
+ flw f0, 31*4(sp) // Recover ft0
+ flw f1, 32*4(sp) // Recover ft1
+ flw f2, 33*4(sp) // Recover ft2
+ flw f3, 34*4(sp) // Recover ft3
+ flw f4, 35*4(sp) // Recover ft4
+ flw f5, 36*4(sp) // Recover ft5
+ flw f6, 37*4(sp) // Recover ft6
+ flw f7, 38*4(sp) // Recover ft7
+ flw f10, 41*4(sp) // Recover fa0
+ flw f11, 42*4(sp) // Recover fa1
+ flw f12, 43*4(sp) // Recover fa2
+ flw f13, 44*4(sp) // Recover fa3
+ flw f14, 45*4(sp) // Recover fa4
+ flw f15, 46*4(sp) // Recover fa5
+ flw f16, 47*4(sp) // Recover fa6
+ flw f17, 48*4(sp) // Recover fa7
+ flw f28, 59*4(sp) // Recover ft8
+ flw f29, 60*4(sp) // Recover ft9
+ flw f30, 61*4(sp) // Recover ft10
+ flw f31, 62*4(sp) // Recover ft11
+ lw t0, 63*4(sp) // Recover fcsr
+ csrw fcsr, t0 // Restore fcsr
+#elif defined(__riscv_float_abi_double)
+ fld f0, 31*4(sp) // Recover ft0
+ fld f1, 32*4(sp) // Recover ft1
+ fld f2, 33*4(sp) // Recover ft2
+ fld f3, 34*4(sp) // Recover ft3
+ fld f4, 35*4(sp) // Recover ft4
+ fld f5, 36*4(sp) // Recover ft5
+ fld f6, 37*4(sp) // Recover ft6
+ fld f7, 38*4(sp) // Recover ft7
+ fld f10, 41*4(sp) // Recover fa0
+ fld f11, 42*4(sp) // Recover fa1
+ fld f12, 43*4(sp) // Recover fa2
+ fld f13, 44*4(sp) // Recover fa3
+ fld f14, 45*4(sp) // Recover fa4
+ fld f15, 46*4(sp) // Recover fa5
+ fld f16, 47*4(sp) // Recover fa6
+ fld f17, 48*4(sp) // Recover fa7
+ fld f28, 59*4(sp) // Recover ft8
+ fld f29, 60*4(sp) // Recover ft9
+ fld f30, 61*4(sp) // Recover ft10
+ fld f31, 62*4(sp) // Recover ft11
+ lw t0, 63*4(sp) // Recover fcsr
+ csrw fcsr, t0 // Restore fcsr
+#endif
+
+ /* Recover standard registers. */
+
+ /* Restore registers,
+ Skip global pointer because that does not change.
+ Also skip the saved registers since they have been restored by any function we called,
+ except s0 since we use it ourselves. */
+
+ lw t0, 30*4(sp) // Recover mepc
+ csrw mepc, t0 // Setup mepc
+
+ /* Compose mstatus via read/modify/write to avoid clobbering unrelated bits.
+ Set MPIE and restore MPP to Machine, preserve other fields. */
+
+ csrr t1, mstatus
+
+ /* Clear MPP/MPIE/MIE bits in t1 then set desired values. */
+
+ li t2, 0x1888 // MPP(0x1800) | MPIE(0x80) | MIE(0x08)
+ li t3, 0x1800 // Set MPP to Machine mode (bits 12:11)
+
+ /* Construct new mstatus in t1: clear mask bits, set MPP/MPIE and optionally FP bit,
+ preserve everything except the bits we will modify. */
+
+ li t4, ~0x1888 // Clear mask for MPP/MPIE/MIE
+ and t1, t1, t4
+ or t1, t1, t3
+
+#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double)
+ li t0, 0x2000 // Set FS bits (bits 14:13 to 01) for FP state
+ or t1, t1, t0
+#endif
+ csrw mstatus, t1 // Update mstatus safely
+
+ lw ra, 28*4(sp) // Recover return address
+ lw t0, 19*4(sp) // Recover t0
+ lw t1, 18*4(sp) // Recover t1
+ lw t2, 17*4(sp) // Recover t2
+ lw s0, 12*4(sp) // Recover s0
+ lw a0, 27*4(sp) // Recover a0
+ lw a1, 26*4(sp) // Recover a1
+ lw a2, 25*4(sp) // Recover a2
+ lw a3, 24*4(sp) // Recover a3
+ lw a4, 23*4(sp) // Recover a4
+ lw a5, 22*4(sp) // Recover a5
+ lw a6, 21*4(sp) // Recover a6
+ lw a7, 20*4(sp) // Recover a7
+ lw t3, 16*4(sp) // Recover t3
+ lw t4, 15*4(sp) // Recover t4
+ lw t5, 14*4(sp) // Recover t5
+ lw t6, 13*4(sp) // Recover t6
+
+#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double)
+ addi sp, sp, 65*4 // Recover stack frame - with floating point enabled
+#else
+ addi sp, sp, 32*4 // Recover stack frame - without floating point enabled
+#endif
+ mret // Return to point of interrupt
+
+ /* } */
+_tx_thread_not_nested_restore:
+ /* Determine if a thread was interrupted and no preemption is required. */
+ /* else if (((_tx_thread_current_ptr) && (_tx_thread_current_ptr == _tx_thread_execute_ptr)
+ || (_tx_thread_preempt_disable))
+ { */
+
+ la t0, _tx_thread_current_ptr // Pickup current thread pointer address
+ lw t1, 0(t0) // Pickup current thread pointer
+
+ beqz t1, _tx_thread_idle_system_restore // If NULL, idle system restore
+
+
+ la t0, _tx_thread_preempt_disable // Pickup preempt disable flag address
+ lw t2, 0(t0) // Pickup preempt disable flag (UINT)
+
+ bgtz t2, _tx_thread_no_preempt_restore // If set, restore interrupted thread
+
+
+ la t0, _tx_thread_execute_ptr // Pickup thread execute pointer address
+ lw t2, 0(t0) // Pickup thread execute pointer
+
+ bne t1, t2, _tx_thread_preempt_restore // If higher-priority thread is ready, preempt
+
+
+_tx_thread_no_preempt_restore:
+ /* Restore interrupted thread or ISR. */
+
+ /* Pickup the saved stack pointer. */
+ /* sp = _tx_thread_current_ptr -> tx_thread_stack_ptr; */
+
+ lw sp, 8(t1) // Switch back to thread's stack
+
+ /* Recover floating point registers. */
+#if defined(__riscv_float_abi_single)
+ flw f0, 31*4(sp) // Recover ft0
+ flw f1, 32*4(sp) // Recover ft1
+ flw f2, 33*4(sp) // Recover ft2
+ flw f3, 34*4(sp) // Recover ft3
+ flw f4, 35*4(sp) // Recover ft4
+ flw f5, 36*4(sp) // Recover ft5
+ flw f6, 37*4(sp) // Recover ft6
+ flw f7, 38*4(sp) // Recover ft7
+ flw f10, 41*4(sp) // Recover fa0
+ flw f11, 42*4(sp) // Recover fa1
+ flw f12, 43*4(sp) // Recover fa2
+ flw f13, 44*4(sp) // Recover fa3
+ flw f14, 45*4(sp) // Recover fa4
+ flw f15, 46*4(sp) // Recover fa5
+ flw f16, 47*4(sp) // Recover fa6
+ flw f17, 48*4(sp) // Recover fa7
+ flw f28, 59*4(sp) // Recover ft8
+ flw f29, 60*4(sp) // Recover ft9
+ flw f30, 61*4(sp) // Recover ft10
+ flw f31, 62*4(sp) // Recover ft11
+ lw t0, 63*4(sp) // Recover fcsr
+ csrw fcsr, t0 // Restore fcsr
+#elif defined(__riscv_float_abi_double)
+ fld f0, 31*4(sp) // Recover ft0
+ fld f1, 32*4(sp) // Recover ft1
+ fld f2, 33*4(sp) // Recover ft2
+ fld f3, 34*4(sp) // Recover ft3
+ fld f4, 35*4(sp) // Recover ft4
+ fld f5, 36*4(sp) // Recover ft5
+ fld f6, 37*4(sp) // Recover ft6
+ fld f7, 38*4(sp) // Recover ft7
+ fld f10, 41*4(sp) // Recover fa0
+ fld f11, 42*4(sp) // Recover fa1
+ fld f12, 43*4(sp) // Recover fa2
+ fld f13, 44*4(sp) // Recover fa3
+ fld f14, 45*4(sp) // Recover fa4
+ fld f15, 46*4(sp) // Recover fa5
+ fld f16, 47*4(sp) // Recover fa6
+ fld f17, 48*4(sp) // Recover fa7
+ fld f28, 59*4(sp) // Recover ft8
+ fld f29, 60*4(sp) // Recover ft9
+ fld f30, 61*4(sp) // Recover ft10
+ fld f31, 62*4(sp) // Recover ft11
+ lw t0, 63*4(sp) // Recover fcsr
+ csrw fcsr, t0 // Restore fcsr
+#endif
+
+ /* Recover the saved context and return to the point of interrupt. */
+
+ /* Recover standard registers. */
+ /* Restore registers,
+ Skip global pointer because that does not change */
+
+ lw t0, 30*4(sp) // Recover mepc
+ csrw mepc, t0 // Setup mepc
+
+ /* Compose mstatus via read/modify/write to avoid clobbering unrelated bits. */
+
+ csrr t1, mstatus
+ li t2, 0x1888 // MPP(0x1800) | MPIE(0x80) | MIE(0x08)
+ li t3, 0x1800 // Set MPP to Machine mode
+ li t4, ~0x1888 // Clear mask for MPP/MPIE/MIE
+ and t1, t1, t4
+ or t1, t1, t3
+
+#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double)
+ li t0, 0x2000 // Set FS bits for FP state
+ or t1, t1, t0
+#endif
+ csrw mstatus, t1 // Update mstatus safely
+
+ lw ra, 28*4(sp) // Recover return address
+ lw t0, 19*4(sp) // Recover t0
+ lw t1, 18*4(sp) // Recover t1
+ lw t2, 17*4(sp) // Recover t2
+ lw s0, 12*4(sp) // Recover s0
+ lw a0, 27*4(sp) // Recover a0
+ lw a1, 26*4(sp) // Recover a1
+ lw a2, 25*4(sp) // Recover a2
+ lw a3, 24*4(sp) // Recover a3
+ lw a4, 23*4(sp) // Recover a4
+ lw a5, 22*4(sp) // Recover a5
+ lw a6, 21*4(sp) // Recover a6
+ lw a7, 20*4(sp) // Recover a7
+ lw t3, 16*4(sp) // Recover t3
+ lw t4, 15*4(sp) // Recover t4
+ lw t5, 14*4(sp) // Recover t5
+ lw t6, 13*4(sp) // Recover t6
+
+#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double)
+ addi sp, sp, 65*4 // Recover stack frame - with floating point enabled
+#else
+ addi sp, sp, 32*4 // Recover stack frame - without floating point enabled
+#endif
+ mret // Return to point of interrupt
+
+ /* }
+ else
+ { */
+_tx_thread_preempt_restore:
+ /* Instead of directly activating the thread again, ensure we save the
+ entire stack frame by saving the remaining registers. */
+
+ lw t0, 8(t1) // Pickup thread's stack pointer
+ ori t3, zero, 1 // Build interrupt stack type
+ sw t3, 0(t0) // Store stack type
+
+ /* Store floating point preserved registers. */
+#ifdef __riscv_float_abi_single
+ fsw f8, 39*4(t0) // Store fs0
+ fsw f9, 40*4(t0) // Store fs1
+ fsw f18, 49*4(t0) // Store fs2
+ fsw f19, 50*4(t0) // Store fs3
+ fsw f20, 51*4(t0) // Store fs4
+ fsw f21, 52*4(t0) // Store fs5
+ fsw f22, 53*4(t0) // Store fs6
+ fsw f23, 54*4(t0) // Store fs7
+ fsw f24, 55*4(t0) // Store fs8
+ fsw f25, 56*4(t0) // Store fs9
+ fsw f26, 57*4(t0) // Store fs10
+ fsw f27, 58*4(t0) // Store fs11
+#elif defined(__riscv_float_abi_double)
+ fsd f8, 39*4(t0) // Store fs0
+ fsd f9, 40*4(t0) // Store fs1
+ fsd f18, 49*4(t0) // Store fs2
+ fsd f19, 50*4(t0) // Store fs3
+ fsd f20, 51*4(t0) // Store fs4
+ fsd f21, 52*4(t0) // Store fs5
+ fsd f22, 53*4(t0) // Store fs6
+ fsd f23, 54*4(t0) // Store fs7
+ fsd f24, 55*4(t0) // Store fs8
+ fsd f25, 56*4(t0) // Store fs9
+ fsd f26, 57*4(t0) // Store fs10
+ fsd f27, 58*4(t0) // Store fs11
+#endif
+
+ /* Store standard preserved registers. */
+
+ sw x9, 11*4(t0) // Store s1
+ sw x18, 10*4(t0) // Store s2
+ sw x19, 9*4(t0) // Store s3
+ sw x20, 8*4(t0) // Store s4
+ sw x21, 7*4(t0) // Store s5
+ sw x22, 6*4(t0) // Store s6
+ sw x23, 5*4(t0) // Store s7
+ sw x24, 4*4(t0) // Store s8
+ sw x25, 3*4(t0) // Store s9
+ sw x26, 2*4(t0) // Store s10
+ sw x27, 1*4(t0) // Store s11
+ // Note: s0 is already stored!
+
+ /* Save the remaining time-slice and disable it. */
+ /* if (_tx_timer_time_slice)
+ { */
+
+ la t0, _tx_timer_time_slice // Pickup time slice variable address
+ lw t2, 0(t0) // Pickup time slice
+ beqz t2, _tx_thread_dont_save_ts // If 0, skip time slice processing
+
+ /* _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice
+ _tx_timer_time_slice = 0; */
+
+ sw t2, 24(t1) // Save current time slice
+ sw x0, 0(t0) // Clear global time slice
+
+
+ /* } */
+_tx_thread_dont_save_ts:
+ /* Clear the current task pointer. */
+ /* _tx_thread_current_ptr = TX_NULL; */
+
+ /* Return to the scheduler. */
+ /* _tx_thread_schedule(); */
+
+ la t0, _tx_thread_current_ptr // Pickup current thread pointer address
+ sw x0, 0(t0) // Clear current thread pointer
+
+ /* } */
+
+_tx_thread_idle_system_restore:
+ /* Just return back to the scheduler! */
+ j _tx_thread_schedule // Return to scheduler
+
+/* } */
diff --git a/ports/risc-v32/clang/src/tx_thread_context_save.S b/ports/risc-v32/clang/src/tx_thread_context_save.S
new file mode 100644
index 00000000..ffb302e3
--- /dev/null
+++ b/ports/risc-v32/clang/src/tx_thread_context_save.S
@@ -0,0 +1,271 @@
+/***************************************************************************
+ * Copyright (c) 2026 Quintauris
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Thread */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+ .section .text
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_context_save RISC-V32/GNU */
+/* 6.4.x */
+/* AUTHOR */
+/* */
+/* Francisco Merino, Quintauris */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function saves the context of an executing thread in the */
+/* beginning of interrupt processing. The function also ensures that */
+/* the system stack is used upon return to the calling ISR. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* ISRs */
+/* */
+/**************************************************************************/
+/* VOID _tx_thread_context_save(VOID)
+{ */
+ .global _tx_thread_context_save
+_tx_thread_context_save:
+
+ /* Upon entry to this routine, RA/x1 has been saved on the stack
+ and the stack has been already allocated for the entire context:
+ addi sp, sp, -32*4 (or -65*4)
+ sw ra, 28*4(sp)
+ */
+
+ sw t0, 19*4(sp) // Store t0
+ sw t1, 18*4(sp) // Store t1
+
+ /* Check for a nested interrupt. */
+ /* if (_tx_thread_system_state++)
+ { */
+
+ la t0, _tx_thread_system_state // Pickup addr of system state var
+ lw t1, 0(t0) // Pickup system state
+ addi t1, t1, 1 // Increment system state
+ sw t1, 0(t0) // Store system state
+ li t0, 1
+ bgt t1, t0, _tx_thread_nested_save // If it's more than 1, nested interrupt
+
+ /* First level interrupt, save the rest of the scratch registers and
+ check for a thread to preempt. */
+
+ sw t2, 17*4(sp) // Store t2
+ sw s0, 12*4(sp) // Store s0
+ sw a0, 27*4(sp) // Store a0
+ sw a1, 26*4(sp) // Store a1
+ sw a2, 25*4(sp) // Store a2
+ sw a3, 24*4(sp) // Store a3
+ sw a4, 23*4(sp) // Store a4
+ sw a5, 22*4(sp) // Store a5
+ sw a6, 21*4(sp) // Store a6
+ sw a7, 20*4(sp) // Store a7
+ sw t3, 16*4(sp) // Store t3
+ sw t4, 15*4(sp) // Store t4
+ sw t5, 14*4(sp) // Store t5
+ sw t6, 13*4(sp) // Store t6
+
+ /* Save floating point registers. */
+#if defined(__riscv_float_abi_single)
+ fsw f0, 31*4(sp) // Store ft0
+ fsw f1, 32*4(sp) // Store ft1
+ fsw f2, 33*4(sp) // Store ft2
+ fsw f3, 34*4(sp) // Store ft3
+ fsw f4, 35*4(sp) // Store ft4
+ fsw f5, 36*4(sp) // Store ft5
+ fsw f6, 37*4(sp) // Store ft6
+ fsw f7, 38*4(sp) // Store ft7
+ fsw f10, 41*4(sp) // Store fa0
+ fsw f11, 42*4(sp) // Store fa1
+ fsw f12, 43*4(sp) // Store fa2
+ fsw f13, 44*4(sp) // Store fa3
+ fsw f14, 45*4(sp) // Store fa4
+ fsw f15, 46*4(sp) // Store fa5
+ fsw f16, 47*4(sp) // Store fa6
+ fsw f17, 48*4(sp) // Store fa7
+ fsw f28, 59*4(sp) // Store ft8
+ fsw f29, 60*4(sp) // Store ft9
+ fsw f30, 61*4(sp) // Store ft10
+ fsw f31, 62*4(sp) // Store ft11
+ csrr t0, fcsr
+ sw t0, 63*4(sp) // Store fcsr
+#elif defined(__riscv_float_abi_double)
+ fsd f0, 31*4(sp) // Store ft0
+ fsd f1, 32*4(sp) // Store ft1
+ fsd f2, 33*4(sp) // Store ft2
+ fsd f3, 34*4(sp) // Store ft3
+ fsd f4, 35*4(sp) // Store ft4
+ fsd f5, 36*4(sp) // Store ft5
+ fsd f6, 37*4(sp) // Store ft6
+ fsd f7, 38*4(sp) // Store ft7
+ fsd f10, 41*4(sp) // Store fa0
+ fsd f11, 42*4(sp) // Store fa1
+ fsd f12, 43*4(sp) // Store fa2
+ fsd f13, 44*4(sp) // Store fa3
+ fsd f14, 45*4(sp) // Store fa4
+ fsd f15, 46*4(sp) // Store fa5
+ fsd f16, 47*4(sp) // Store fa6
+ fsd f17, 48*4(sp) // Store fa7
+ fsd f28, 59*4(sp) // Store ft8
+ fsd f29, 60*4(sp) // Store ft9
+ fsd f30, 61*4(sp) // Store ft10
+ fsd f31, 62*4(sp) // Store ft11
+ csrr t0, fcsr
+ sw t0, 63*4(sp) // Store fcsr
+#endif
+
+ csrr t0, mepc
+ sw t0, 30*4(sp) // Save it on the stack
+
+ /* Save mstatus. */
+ csrr t0, mstatus
+ sw t0, 29*4(sp)
+
+ la t1, _tx_thread_current_ptr // Pickup address of current thread ptr
+ lw t2, 0(t1) // Pickup current thread pointer
+ beqz t2, _tx_thread_idle_system_save // If NULL, idle system was interrupted
+
+ /* Save the current thread's stack pointer and switch to the system stack. */
+ /* _tx_thread_current_ptr -> tx_thread_stack_ptr = sp;
+ sp = _tx_thread_system_stack_ptr; */
+
+ sw sp, 8(t2) // Save stack pointer
+ la t0, _tx_thread_system_stack_ptr
+ lw sp, 0(t0) // Switch to system stack
+
+ /* Call the ISR execution exit function if enabled. */
+#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
+ call _tx_execution_isr_enter // Call the ISR execution enter function
+#endif
+
+ ret // Return to ISR
+
+_tx_thread_nested_save:
+
+ /* Nested interrupt! Just save the scratch registers and return to the ISR. */
+
+ sw t2, 17*4(sp) // Store t2
+ sw s0, 12*4(sp) // Store s0
+ sw a0, 27*4(sp) // Store a0
+ sw a1, 26*4(sp) // Store a1
+ sw a2, 25*4(sp) // Store a2
+ sw a3, 24*4(sp) // Store a3
+ sw a4, 23*4(sp) // Store a4
+ sw a5, 22*4(sp) // Store a5
+ sw a6, 21*4(sp) // Store a6
+ sw a7, 20*4(sp) // Store a7
+ sw t3, 16*4(sp) // Store t3
+ sw t4, 15*4(sp) // Store t4
+ sw t5, 14*4(sp) // Store t5
+ sw t6, 13*4(sp) // Store t6
+
+ /* Save floating point registers. */
+#if defined(__riscv_float_abi_single)
+ fsw f0, 31*4(sp) // Store ft0
+ fsw f1, 32*4(sp) // Store ft1
+ fsw f2, 33*4(sp) // Store ft2
+ fsw f3, 34*4(sp) // Store ft3
+ fsw f4, 35*4(sp) // Store ft4
+ fsw f5, 36*4(sp) // Store ft5
+ fsw f6, 37*4(sp) // Store ft6
+ fsw f7, 38*4(sp) // Store ft7
+ fsw f10, 41*4(sp) // Store fa0
+ fsw f11, 42*4(sp) // Store fa1
+ fsw f12, 43*4(sp) // Store fa2
+ fsw f13, 44*4(sp) // Store fa3
+ fsw f14, 45*4(sp) // Store fa4
+ fsw f15, 46*4(sp) // Store fa5
+ fsw f16, 47*4(sp) // Store fa6
+ fsw f17, 48*4(sp) // Store fa7
+ fsw f28, 59*4(sp) // Store ft8
+ fsw f29, 60*4(sp) // Store ft9
+ fsw f30, 61*4(sp) // Store ft10
+ fsw f31, 62*4(sp) // Store ft11
+ csrr t0, fcsr
+ sw t0, 63*4(sp) // Store fcsr
+#elif defined(__riscv_float_abi_double)
+ fsd f0, 31*4(sp) // Store ft0
+ fsd f1, 32*4(sp) // Store ft1
+ fsd f2, 33*4(sp) // Store ft2
+ fsd f3, 34*4(sp) // Store ft3
+ fsd f4, 35*4(sp) // Store ft4
+ fsd f5, 36*4(sp) // Store ft5
+ fsd f6, 37*4(sp) // Store ft6
+ fsd f7, 38*4(sp) // Store ft7
+ fsd f10, 41*4(sp) // Store fa0
+ fsd f11, 42*4(sp) // Store fa1
+ fsd f12, 43*4(sp) // Store fa2
+ fsd f13, 44*4(sp) // Store fa3
+ fsd f14, 45*4(sp) // Store fa4
+ fsd f15, 46*4(sp) // Store fa5
+ fsd f16, 47*4(sp) // Store fa6
+ fsd f17, 48*4(sp) // Store fa7
+ fsd f28, 59*4(sp) // Store ft8
+ fsd f29, 60*4(sp) // Store ft9
+ fsd f30, 61*4(sp) // Store ft10
+ fsd f31, 62*4(sp) // Store ft11
+ csrr t0, fcsr
+ sw t0, 63*4(sp) // Store fcsr
+#endif
+
+ csrr t0, mepc
+ sw t0, 30*4(sp) // Save it on stack
+
+ csrr t0, mstatus
+ sw t0, 29*4(sp)
+
+ /* Call the ISR execution exit function if enabled. */
+#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
+ call _tx_execution_isr_enter // Call the ISR execution enter function
+#endif
+
+ ret // Return to ISR
+
+_tx_thread_idle_system_save:
+
+
+#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
+ call _tx_execution_isr_enter // Call the ISR execution enter function
+#endif
+
+ /* Interrupt occurred in the scheduling loop. */
+
+ /* }
+} */
+#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double)
+ addi sp, sp, 65*4 // Recover stack frame - with floating point enabled
+#else
+ addi sp, sp, 32*4 // Recover the reserved stack space
+#endif
+ ret // Return to calling ISR
diff --git a/ports/risc-v32/clang/src/tx_thread_interrupt_control.S b/ports/risc-v32/clang/src/tx_thread_interrupt_control.S
new file mode 100644
index 00000000..86b6745e
--- /dev/null
+++ b/ports/risc-v32/clang/src/tx_thread_interrupt_control.S
@@ -0,0 +1,88 @@
+/***************************************************************************
+ * Copyright (c) 2026 Quintauris
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Thread */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+
+ .section .text
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_interrupt_control RISC-V32/GNU */
+/* 6.4.x */
+/* AUTHOR */
+/* */
+/* Francisco Merino, Quintauris */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function is responsible for changing the interrupt lockout */
+/* posture of the system. */
+/* */
+/* INPUT */
+/* */
+/* new_posture New interrupt lockout posture */
+/* */
+/* OUTPUT */
+/* */
+/* old_posture Old interrupt lockout posture */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
+/* */
+/**************************************************************************/
+/* UINT _tx_thread_interrupt_control(UINT new_posture)
+{ */
+ .global _tx_thread_interrupt_control
+_tx_thread_interrupt_control:
+
+ /* Pickup current interrupt posture. */
+
+ csrr a1, mstatus // Pickup mstatus
+ andi a1, a1, 0x08 // Mask out all but MIE
+
+ /* Check for the new posture. */
+
+ beqz a0, _tx_thread_interrupt_disable // If 0, disable interrupts
+
+ /* Enable interrupts. */
+
+ csrsi mstatus, 0x08 // Enable interrupts (MIE bit 3)
+ j _tx_thread_interrupt_control_exit // Return to caller
+
+_tx_thread_interrupt_disable:
+
+ /* Disable interrupts. */
+
+ csrci mstatus, 0x08 // Disable interrupts (MIE bit 3)
+
+_tx_thread_interrupt_control_exit:
+
+ /* Return the old interrupt posture. */
+
+ mv a0, a1 // Setup return value
+ ret // Return to caller
+
+/* } */
diff --git a/ports/risc-v32/clang/src/tx_thread_schedule.S b/ports/risc-v32/clang/src/tx_thread_schedule.S
new file mode 100644
index 00000000..d5a54fa2
--- /dev/null
+++ b/ports/risc-v32/clang/src/tx_thread_schedule.S
@@ -0,0 +1,318 @@
+/***************************************************************************
+ * Copyright (c) 2026 Quintauris
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Thread */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+
+ .section .text
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_schedule RISC-V32/GNU */
+/* 6.4.x */
+/* AUTHOR */
+/* */
+/* Francisco Merino, Quintauris */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function waits for a thread control block pointer to appear in */
+/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
+/* in the variable, the corresponding thread is resumed. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_initialize_kernel_enter ThreadX entry function */
+/* _tx_thread_system_return Return to system from thread */
+/* _tx_thread_context_restore Restore thread's context */
+/* */
+/**************************************************************************/
+/* VOID _tx_thread_schedule(VOID)
+{ */
+ .global _tx_thread_schedule
+_tx_thread_schedule:
+
+ /* Enable interrupts. */
+
+ csrsi mstatus, 0x08 // Enable interrupts (MIE bit 3)
+
+ /* Wait for a thread to execute. */
+ /* do
+ { */
+_tx_thread_schedule_loop:
+
+ la t0, _tx_thread_execute_ptr // Pickup address of execute ptr
+ lw t1, 0(t0) // Pickup execute pointer
+ bnez t1, _tx_thread_ready_to_run // If non-NULL, a thread is ready to run
+
+#ifndef TX_NO_WFI
+ wfi // Wait for interrupt
+#endif
+ j _tx_thread_schedule_loop // Check again
+
+ /* }
+ while (_tx_thread_execute_ptr == TX_NULL); */
+
+_tx_thread_ready_to_run:
+
+ /* At this point, t1 contains the pointer to the thread to execute.
+ Lockout interrupts. */
+
+ csrci mstatus, 0x08 // Disable interrupts (MIE bit 3)
+
+ /* Check _tx_thread_execute_ptr again, in case an interrupt occurred
+ between the check and the disable. */
+
+ lw t1, 0(t0) // Pickup execute pointer
+ beqz t1, _tx_thread_schedule_loop // If NULL, go back to wait loop
+
+ /* Yes! We have a thread to execute. */
+ /* _tx_thread_current_ptr = _tx_thread_execute_ptr; */
+
+ la t0, _tx_thread_current_ptr // Pickup address of current thread
+ sw t1, 0(t0) // Setup current thread pointer
+
+ /* Increment the run count for this thread. */
+ /* _tx_thread_current_ptr -> tx_thread_run_count++; */
+
+ lw t2, 4(t1) // Pickup run count
+ addi t2, t2, 1 // Increment run count
+ sw t2, 4(t1) // Store run count
+
+ /* Setup time-slice values. */
+ /* _tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice; */
+
+ lw t2, 24(t1) // Pickup thread time-slice
+ la t3, _tx_timer_time_slice // Pickup address of time-slice
+ sw t2, 0(t3) // Setup time-slice
+
+ /* Call the thread execution enter function if enabled. */
+#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
+
+ call _tx_execution_thread_enter // Call the thread execution enter function
+#endif
+
+ /* Switch to the thread's stack. */
+ /* sp = _tx_thread_current_ptr -> tx_thread_stack_ptr; */
+
+ lw sp, 8(t1) // Switch to thread stack
+
+ /* Determine the type of stack frame. */
+ /* if (*sp)
+ { */
+
+ lw t0, 0(sp) // Pickup stack type
+ beqz t0, _tx_thread_solicited_return // If 0, solicited return
+
+ /* Recover floating point registers. */
+#if defined(__riscv_float_abi_single)
+ flw f0, 31*4(sp) // Recover ft0
+ flw f1, 32*4(sp) // Recover ft1
+ flw f2, 33*4(sp) // Recover ft2
+ flw f3, 34*4(sp) // Recover ft3
+ flw f4, 35*4(sp) // Recover ft4
+ flw f5, 36*4(sp) // Recover ft5
+ flw f6, 37*4(sp) // Recover ft6
+ flw f7, 38*4(sp) // Recover ft7
+ flw f8, 39*4(sp) // Recover fs0
+ flw f9, 40*4(sp) // Recover fs1
+ flw f10, 41*4(sp) // Recover fa0
+ flw f11, 42*4(sp) // Recover fa1
+ flw f12, 43*4(sp) // Recover fa2
+ flw f13, 44*4(sp) // Recover fa3
+ flw f14, 45*4(sp) // Recover fa4
+ flw f15, 46*4(sp) // Recover fa5
+ flw f16, 47*4(sp) // Recover fa6
+ flw f17, 48*4(sp) // Recover fa7
+ flw f18, 49*4(sp) // Recover fs2
+ flw f19, 50*4(sp) // Recover fs3
+ flw f20, 51*4(sp) // Recover fs4
+ flw f21, 52*4(sp) // Recover fs5
+ flw f22, 53*4(sp) // Recover fs6
+ flw f23, 54*4(sp) // Recover fs7
+ flw f24, 55*4(sp) // Recover fs8
+ flw f25, 56*4(sp) // Recover fs9
+ flw f26, 57*4(sp) // Recover fs10
+ flw f27, 58*4(sp) // Recover fs11
+ flw f28, 59*4(sp) // Recover ft8
+ flw f29, 60*4(sp) // Recover ft9
+ flw f30, 61*4(sp) // Recover ft10
+ flw f31, 62*4(sp) // Recover ft11
+ lw t0, 63*4(sp) // Recover fcsr
+ csrw fcsr, t0 // Restore fcsr
+#elif defined(__riscv_float_abi_double)
+ fld f0, 31*4(sp) // Recover ft0
+ fld f1, 32*4(sp) // Recover ft1
+ fld f2, 33*4(sp) // Recover ft2
+ fld f3, 34*4(sp) // Recover ft3
+ fld f4, 35*4(sp) // Recover ft4
+ fld f5, 36*4(sp) // Recover ft5
+ fld f6, 37*4(sp) // Recover ft6
+ fld f7, 38*4(sp) // Recover ft7
+ fld f8, 39*4(sp) // Recover fs0
+ fld f9, 40*4(sp) // Recover fs1
+ fld f10, 41*4(sp) // Recover fa0
+ fld f11, 42*4(sp) // Recover fa1
+ fld f12, 43*4(sp) // Recover fa2
+ fld f13, 44*4(sp) // Recover fa3
+ fld f14, 45*4(sp) // Recover fa4
+ fld f15, 46*4(sp) // Recover fa5
+ fld f16, 47*4(sp) // Recover fa6
+ fld f17, 48*4(sp) // Recover fa7
+ fld f18, 49*4(sp) // Recover fs2
+ fld f19, 50*4(sp) // Recover fs3
+ fld f20, 51*4(sp) // Recover fs4
+ fld f21, 52*4(sp) // Recover fs5
+ fld f22, 53*4(sp) // Recover fs6
+ fld f23, 54*4(sp) // Recover fs7
+ fld f24, 55*4(sp) // Recover fs8
+ fld f25, 56*4(sp) // Recover fs9
+ fld f26, 57*4(sp) // Recover fs10
+ fld f27, 58*4(sp) // Recover fs11
+ fld f28, 59*4(sp) // Recover ft8
+ fld f29, 60*4(sp) // Recover ft9
+ fld f30, 61*4(sp) // Recover ft10
+ fld f31, 62*4(sp) // Recover ft11
+ lw t0, 63*4(sp) // Recover fcsr
+ csrw fcsr, t0 // Restore fcsr
+#endif
+
+ /* Recover standard registers. */
+
+ lw t0, 30*4(sp) // Recover mepc
+ csrw mepc, t0 // Setup mepc
+
+ li t0, 0x1880 // Prepare mstatus: MPP=Machine(0x1800) | MPIE(0x80)
+#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double)
+ li t1, 0x2000 // Set FS bits for FP state
+ or t0, t0, t1
+#endif
+ csrw mstatus, t0 // Set mstatus
+
+ lw ra, 28*4(sp) // Recover return address
+ lw t0, 19*4(sp) // Recover t0
+ lw t1, 18*4(sp) // Recover t1
+ lw t2, 17*4(sp) // Recover t2
+ lw s0, 12*4(sp) // Recover s0
+ lw x9, 11*4(sp) // Recover s1
+ lw a0, 27*4(sp) // Recover a0
+ lw a1, 26*4(sp) // Recover a1
+ lw a2, 25*4(sp) // Recover a2
+ lw a3, 24*4(sp) // Recover a3
+ lw a4, 23*4(sp) // Recover a4
+ lw a5, 22*4(sp) // Recover a5
+ lw a6, 21*4(sp) // Recover a6
+ lw a7, 20*4(sp) // Recover a7
+ lw t3, 16*4(sp) // Recover t3
+ lw t4, 15*4(sp) // Recover t4
+ lw t5, 14*4(sp) // Recover t5
+ lw t6, 13*4(sp) // Recover t6
+ lw x18, 10*4(sp) // Recover s2
+ lw x19, 9*4(sp) // Recover s3
+ lw x20, 8*4(sp) // Recover s4
+ lw x21, 7*4(sp) // Recover s5
+ lw x22, 6*4(sp) // Recover s6
+ lw x23, 5*4(sp) // Recover s7
+ lw x24, 4*4(sp) // Recover s8
+ lw x25, 3*4(sp) // Recover s9
+ lw x26, 2*4(sp) // Recover s10
+ lw x27, 1*4(sp) // Recover s11
+
+#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double)
+ addi sp, sp, 65*4 // Recover stack frame - with floating point enabled
+#else
+ addi sp, sp, 32*4 // Recover stack frame - without floating point enabled
+#endif
+ mret // Return to thread
+
+_tx_thread_solicited_return:
+
+ /* Recover floating point registers. */
+#if defined(__riscv_float_abi_single)
+ flw f8, 15*4(sp) // Recover fs0
+ flw f9, 16*4(sp) // Recover fs1
+ flw f18, 17*4(sp) // Recover fs2
+ flw f19, 18*4(sp) // Recover fs3
+ flw f20, 19*4(sp) // Recover fs4
+ flw f21, 20*4(sp) // Recover fs5
+ flw f22, 21*4(sp) // Recover fs6
+ flw f23, 22*4(sp) // Recover fs7
+ flw f24, 23*4(sp) // Recover fs8
+ flw f25, 24*4(sp) // Recover fs9
+ flw f26, 25*4(sp) // Recover fs10
+ flw f27, 26*4(sp) // Recover fs11
+ lw t0, 27*4(sp) // Recover fcsr
+ csrw fcsr, t0 // Restore fcsr
+#elif defined(__riscv_float_abi_double)
+ fld f8, 15*4(sp) // Recover fs0
+ fld f9, 16*4(sp) // Recover fs1
+ fld f18, 17*4(sp) // Recover fs2
+ fld f19, 18*4(sp) // Recover fs3
+ fld f20, 19*4(sp) // Recover fs4
+ fld f21, 20*4(sp) // Recover fs5
+ fld f22, 21*4(sp) // Recover fs6
+ fld f23, 22*4(sp) // Recover fs7
+ fld f24, 23*4(sp) // Recover fs8
+ fld f25, 24*4(sp) // Recover fs9
+ fld f26, 25*4(sp) // Recover fs10
+ fld f27, 26*4(sp) // Recover fs11
+ lw t0, 27*4(sp) // Recover fcsr
+ csrw fcsr, t0 // Restore fcsr
+#endif
+
+ /* Recover standard registers. */
+
+ lw t0, 14*4(sp) // Recover mstatus
+ csrw mstatus, t0 // Restore mstatus
+
+ lw ra, 13*4(sp) // Recover return address
+ lw s0, 12*4(sp) // Recover s0
+ lw s1, 11*4(sp) // Recover s1
+ lw x18, 10*4(sp) // Recover s2
+ lw x19, 9*4(sp) // Recover s3
+ lw x20, 8*4(sp) // Recover s4
+ lw x21, 7*4(sp) // Recover s5
+ lw x22, 6*4(sp) // Recover s6
+ lw x23, 5*4(sp) // Recover s7
+ lw x24, 4*4(sp) // Recover s8
+ lw x25, 3*4(sp) // Recover s9
+ lw x26, 2*4(sp) // Recover s10
+ lw x27, 1*4(sp) // Recover s11
+
+#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double)
+ addi sp, sp, 29*4 // Recover stack frame - with floating point enabled
+#else
+ addi sp, sp, 16*4 // Recover stack frame - without floating point enabled
+#endif
+ ret // Return to thread
+
+/* } */
diff --git a/ports/risc-v32/clang/src/tx_thread_stack_build.S b/ports/risc-v32/clang/src/tx_thread_stack_build.S
new file mode 100644
index 00000000..2b8ebae1
--- /dev/null
+++ b/ports/risc-v32/clang/src/tx_thread_stack_build.S
@@ -0,0 +1,221 @@
+/***************************************************************************
+ * Copyright (c) 2026 Quintauris
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Thread */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+
+ .section .text
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_stack_build RISC-V32/GNU */
+/* 6.4.x */
+/* AUTHOR */
+/* */
+/* Francisco Merino, Quintauris */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function builds a stack frame on the supplied thread's stack. */
+/* The stack frame results in a fake interrupt return to the supplied */
+/* function pointer. */
+/* */
+/* INPUT */
+/* */
+/* thread_ptr Pointer to thread control blk */
+/* function_ptr Pointer to return function */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_thread_create Create thread service */
+/* */
+/**************************************************************************/
+/* VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
+{ */
+ .global _tx_thread_stack_build
+_tx_thread_stack_build:
+
+ /* Build a fake interrupt frame. The form of the fake interrupt stack
+ on the RISC-V should look like the following after it is built:
+ Reg Index
+ Stack Top: 1 0 Interrupt stack frame type
+ x27 1 Initial s11
+ x26 2 Initial s10
+ x25 3 Initial s9
+ x24 4 Initial s8
+ x23 5 Initial s7
+ x22 6 Initial s6
+ x21 7 Initial s5
+ x20 8 Initial s4
+ x19 9 Initial s3
+ x18 10 Initial s2
+ x9 11 Initial s1
+ x8 12 Initial s0
+ x31 13 Initial t6
+ x30 14 Initial t5
+ x29 15 Initial t4
+ x28 16 Initial t3
+ x7 17 Initial t2
+ x6 18 Initial t1
+ x5 19 Initial t0
+ x17 20 Initial a7
+ x16 21 Initial a6
+ x15 22 Initial a5
+ x14 23 Initial a4
+ x13 24 Initial a3
+ x12 25 Initial a2
+ x11 26 Initial a1
+ x10 27 Initial a0
+ x1 28 Initial ra
+ -- 29 reserved
+ mepc 30 Initial mepc
+If floating point support:
+ f0 31 Initial ft0
+ f1 32 Initial ft1
+ f2 33 Initial ft2
+ f3 34 Initial ft3
+ f4 35 Initial ft4
+ f5 36 Initial ft5
+ f6 37 Initial ft6
+ f7 38 Initial ft7
+ f8 39 Initial fs0
+ f9 40 Initial fs1
+ f10 41 Initial fa0
+ f11 42 Initial fa1
+ f12 43 Initial fa2
+ f13 44 Initial fa3
+ f14 45 Initial fa4
+ f15 46 Initial fa5
+ f16 47 Initial fa6
+ f17 48 Initial fa7
+ f18 49 Initial fs2
+ f19 50 Initial fs3
+ f20 51 Initial fs4
+ f21 52 Initial fs5
+ f22 53 Initial fs6
+ f23 54 Initial fs7
+ f24 55 Initial fs8
+ f25 56 Initial fs9
+ f26 57 Initial fs10
+ f27 58 Initial fs11
+ f28 59 Initial ft8
+ f29 60 Initial ft9
+ f30 61 Initial ft10
+ f31 62 Initial ft11
+ fscr 63 Initial fscr
+
+ Stack Bottom: (higher memory address) */
+
+ lw t0, 16(a0) // Pickup end of stack area
+ li t1, ~15 // Build 16-byte alignment mask
+ and t0, t0, t1 // Make sure 16-byte alignment
+
+ /* Actually build the stack frame. */
+
+#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double)
+ addi t0, t0, -65*4
+#else
+ addi t0, t0, -32*4 // Allocate space for the stack frame
+#endif
+ li t1, 1 // Build stack type
+ sw t1, 0*4(t0) // Place stack type on the top
+ sw zero, 1*4(t0) // Initial s11
+ sw zero, 2*4(t0) // Initial s10
+ sw zero, 3*4(t0) // Initial s9
+ sw zero, 4*4(t0) // Initial s8
+ sw zero, 5*4(t0) // Initial s7
+ sw zero, 6*4(t0) // Initial s6
+ sw zero, 7*4(t0) // Initial s5
+ sw zero, 8*4(t0) // Initial s4
+ sw zero, 9*4(t0) // Initial s3
+ sw zero, 10*4(t0) // Initial s2
+ sw zero, 11*4(t0) // Initial s1
+ sw zero, 12*4(t0) // Initial s0
+ sw zero, 13*4(t0) // Initial t6
+ sw zero, 14*4(t0) // Initial t5
+ sw zero, 15*4(t0) // Initial t4
+ sw zero, 16*4(t0) // Initial t3
+ sw zero, 17*4(t0) // Initial t2
+ sw zero, 18*4(t0) // Initial t1
+ sw zero, 19*4(t0) // Initial t0
+ sw zero, 20*4(t0) // Initial a7
+ sw zero, 21*4(t0) // Initial a6
+ sw zero, 22*4(t0) // Initial a5
+ sw zero, 23*4(t0) // Initial a4
+ sw zero, 24*4(t0) // Initial a3
+ sw zero, 25*4(t0) // Initial a2
+ sw zero, 26*4(t0) // Initial a1
+ sw zero, 27*4(t0) // Initial a0
+ sw zero, 28*4(t0) // Initial ra
+ sw a1, 30*4(t0) // Initial mepc (thread entry point)
+#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double)
+ sw zero, 31*4(t0) // Initial ft0
+ sw zero, 32*4(t0) // Initial ft1
+ sw zero, 33*4(t0) // Initial ft2
+ sw zero, 34*4(t0) // Initial ft3
+ sw zero, 35*4(t0) // Initial ft4
+ sw zero, 36*4(t0) // Initial ft5
+ sw zero, 37*4(t0) // Initial ft6
+ sw zero, 38*4(t0) // Initial ft7
+ sw zero, 39*4(t0) // Initial fs0
+ sw zero, 40*4(t0) // Initial fs1
+ sw zero, 41*4(t0) // Initial fa0
+ sw zero, 42*4(t0) // Initial fa1
+ sw zero, 43*4(t0) // Initial fa2
+ sw zero, 44*4(t0) // Initial fa3
+ sw zero, 45*4(t0) // Initial fa4
+ sw zero, 46*4(t0) // Initial fa5
+ sw zero, 47*4(t0) // Initial fa6
+ sw zero, 48*4(t0) // Initial fa7
+ sw zero, 49*4(t0) // Initial fs2
+ sw zero, 50*4(t0) // Initial fs3
+ sw zero, 51*4(t0) // Initial fs4
+ sw zero, 52*4(t0) // Initial fs5
+ sw zero, 53*4(t0) // Initial fs6
+ sw zero, 54*4(t0) // Initial fs7
+ sw zero, 55*4(t0) // Initial fs8
+ sw zero, 56*4(t0) // Initial fs9
+ sw zero, 57*4(t0) // Initial fs10
+ sw zero, 58*4(t0) // Initial fs11
+ sw zero, 59*4(t0) // Initial ft8
+ sw zero, 60*4(t0) // Initial ft9
+ sw zero, 61*4(t0) // Initial ft10
+ sw zero, 62*4(t0) // Initial ft11
+ csrr a1, fcsr // Read fcsr for initial value
+ sw a1, 63*4(t0) // Initial fcsr
+ sw zero, 64*4(t0) // Reserved word (0)
+#else
+ sw zero, 31*4(t0) // Reserved word (0)
+#endif
+
+ /* Setup stack pointer. */
+ /* thread_ptr -> tx_thread_stack_ptr = t0; */
+
+ sw t0, 8(a0) // Save stack pointer in thread's
+ ret // control block and return
+/* } */
diff --git a/ports/risc-v32/clang/src/tx_thread_system_return.S b/ports/risc-v32/clang/src/tx_thread_system_return.S
new file mode 100644
index 00000000..b54f54fa
--- /dev/null
+++ b/ports/risc-v32/clang/src/tx_thread_system_return.S
@@ -0,0 +1,168 @@
+/***************************************************************************
+ * Copyright (c) 2026 Quintauris
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Thread */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+
+ .section .text
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_system_return RISC-V32/GNU */
+/* 6.4.x */
+/* AUTHOR */
+/* */
+/* Francisco Merino, Quintauris */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function is target processor specific. It is used to transfer */
+/* control from a thread back to the system. Only a minimal context */
+/* is saved since the compiler assumes temp registers are going to get */
+/* slicked by a function call anyway. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* _tx_thread_schedule Thread scheduling loop */
+/* */
+/* CALLED BY */
+/* */
+/* ThreadX components */
+/* */
+/**************************************************************************/
+/* VOID _tx_thread_system_return(VOID)
+{ */
+ .global _tx_thread_system_return
+_tx_thread_system_return:
+
+ /* Save minimal context on the stack. */
+ /* sp -= sizeof(stack_frame); */
+
+#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double)
+ addi sp, sp, -29*4 // Allocate space on the stack - with floating point enabled
+#else
+ addi sp, sp, -16*4 // Allocate space on the stack - without floating point enabled
+#endif
+
+ /* Store floating point preserved registers. */
+#if defined(__riscv_float_abi_single)
+ fsw f8, 15*4(sp) // Store fs0
+ fsw f9, 16*4(sp) // Store fs1
+ fsw f18, 17*4(sp) // Store fs2
+ fsw f19, 18*4(sp) // Store fs3
+ fsw f20, 19*4(sp) // Store fs4
+ fsw f21, 20*4(sp) // Store fs5
+ fsw f22, 21*4(sp) // Store fs6
+ fsw f23, 22*4(sp) // Store fs7
+ fsw f24, 23*4(sp) // Store fs8
+ fsw f25, 24*4(sp) // Store fs9
+ fsw f26, 25*4(sp) // Store fs10
+ fsw f27, 26*4(sp) // Store fs11
+ csrr t0, fcsr
+ sw t0, 27*4(sp) // Store fcsr
+#elif defined(__riscv_float_abi_double)
+ fsd f8, 15*4(sp) // Store fs0
+ fsd f9, 16*4(sp) // Store fs1
+ fsd f18, 17*4(sp) // Store fs2
+ fsd f19, 18*4(sp) // Store fs3
+ fsd f20, 19*4(sp) // Store fs4
+ fsd f21, 20*4(sp) // Store fs5
+ fsd f22, 21*4(sp) // Store fs6
+ fsd f23, 22*4(sp) // Store fs7
+ fsd f24, 23*4(sp) // Store fs8
+ fsd f25, 24*4(sp) // Store fs9
+ fsd f26, 25*4(sp) // Store fs10
+ fsd f27, 26*4(sp) // Store fs11
+ csrr t0, fcsr
+ sw t0, 27*4(sp) // Store fcsr
+#endif
+
+ sw zero, 0(sp) // Solicited stack type
+ sw ra, 13*4(sp) // Save return address
+ sw s0, 12*4(sp) // Save s0
+ sw s1, 11*4(sp) // Save s1
+ sw s2, 10*4(sp) // Save s2
+ sw s3, 9*4(sp) // Save s3
+ sw s4, 8*4(sp) // Save s4
+ sw s5, 7*4(sp) // Save s5
+ sw s6, 6*4(sp) // Save s6
+ sw s7, 5*4(sp) // Save s7
+ sw s8, 4*4(sp) // Save s8
+ sw s9, 3*4(sp) // Save s9
+ sw s10, 2*4(sp) // Save s10
+ sw s11, 1*4(sp) // Save s11
+ csrr t0, mstatus // Pickup mstatus
+ sw t0, 14*4(sp) // Save mstatus
+
+
+ /* Lockout interrupts. will be enabled in _tx_thread_schedule */
+
+ csrci mstatus, 0x08 // Disable interrupts (MIE bit 3)
+
+#ifdef TX_ENABLE_EXECUTION_CHANGE_NOTIFY
+
+ call _tx_execution_thread_exit // Call the thread execution exit function
+#endif
+
+ la t0, _tx_thread_current_ptr // Pickup address of pointer
+ lw t1, 0(t0) // Pickup current thread pointer
+ la t2, _tx_thread_system_stack_ptr // Pickup stack pointer address
+
+ /* Save current stack and switch to system stack. */
+ /* _tx_thread_current_ptr -> tx_thread_stack_ptr = SP;
+ SP = _tx_thread_system_stack_ptr; */
+
+ sw sp, 8(t1) // Save stack pointer
+ lw sp, 0(t2) // Switch to system stack
+
+ /* Determine if the time-slice is active. */
+ /* if (_tx_timer_time_slice)
+ { */
+
+ la t4, _tx_timer_time_slice // Pickup time slice variable addr
+ lw t3, 0(t4) // Pickup time slice value
+ la t2, _tx_thread_schedule // Pickup address of scheduling loop
+ beqz t3, _tx_thread_dont_save_ts // If no time-slice, don't save it
+
+ /* Save time-slice for the thread and clear the current time-slice. */
+ /* _tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
+ _tx_timer_time_slice = 0; */
+
+ sw t3, 24(t1) // Save current time-slice for thread
+ sw zero, 0(t4) // Clear time-slice variable
+
+ /* } */
+_tx_thread_dont_save_ts:
+
+ /* Clear the current thread pointer. */
+ /* _tx_thread_current_ptr = TX_NULL; */
+
+ sw x0, 0(t0) // Clear current thread pointer
+ jr t2 // Return to thread scheduler
+
+/* } */
diff --git a/ports/risc-v32/clang/src/tx_timer_interrupt.S b/ports/risc-v32/clang/src/tx_timer_interrupt.S
new file mode 100644
index 00000000..b64bf06b
--- /dev/null
+++ b/ports/risc-v32/clang/src/tx_timer_interrupt.S
@@ -0,0 +1,204 @@
+/***************************************************************************
+ * Copyright (c) 2026 Quintauris
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Timer */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+
+ .section .text
+ .align 4
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_timer_interrupt RISC-V32/GNU */
+/* 6.2.1 */
+/* AUTHOR */
+/* */
+/* Francisco Merino, Quintauris */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function processes the hardware timer interrupt. This */
+/* processing includes incrementing the system clock and checking for */
+/* time slice and/or timer expiration. If either is found, the */
+/* interrupt context save/restore functions are called along with the */
+/* expiration functions. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* _tx_timer_expiration_process Timer expiration processing */
+/* _tx_thread_time_slice Time slice interrupted thread */
+/* */
+/* CALLED BY */
+/* */
+/* interrupt vector */
+/* */
+/**************************************************************************/
+/* VOID _tx_timer_interrupt(VOID)
+{ */
+ .global _tx_timer_interrupt
+_tx_timer_interrupt:
+
+ /* Increment the system clock. */
+ /* _tx_timer_system_clock++; */
+
+ la t0, _tx_timer_system_clock // Pickup address of system clock
+ lw t1, 0(t0) // Pickup system clock
+ la t2, _tx_timer_time_slice // Pickup address of time slice
+ lw t3, 0(t2) // Pickup time slice
+ addi t1, t1, 1 // Increment system clock
+ sw t1, 0(t0) // Store new system clock
+ li t6, 0 // Clear local expired flag
+
+ /* Test for time-slice expiration. */
+ /* if (_tx_timer_time_slice)
+ { */
+
+ beqz t3, _tx_timer_no_time_slice // If 0, skip time slice processing
+ addi t3, t3, -1 // Decrement the time slice
+
+ /* Decrement the time_slice. */
+ /* _tx_timer_time_slice--; */
+
+ sw t3, 0(t2) // Store new time slice
+
+ /* Check for expiration. */
+ /* if (_tx_timer_time_slice == 0) */
+
+ bgtz t3, _tx_timer_no_time_slice // If not 0, has not expired yet
+ li t1, 1 // Build expired flag
+
+ /* Set the time-slice expired flag. */
+ /* _tx_timer_expired_time_slice = TX_TRUE; */
+
+ la t4, _tx_timer_expired_time_slice // Get address of expired flag
+ sw t1, 0(t4) // Set expired flag (UINT)
+ ori t6, t6, 1 // Set local expired flag
+
+ /* } */
+
+_tx_timer_no_time_slice:
+
+ /* Test for timer expiration. */
+ /* if (*_tx_timer_current_ptr)
+ { */
+
+ la t0, _tx_timer_current_ptr // Pickup address of current ptr
+ lw t1, 0(t0) // Pickup current pointer (word)
+ lw t3, 0(t1) // Pickup the current timer entry (word)
+ la t2, _tx_timer_expired // Pickup address of timer expired flag
+ li t4, 1 // Build TX_TRUE flag
+ beqz t3, _tx_timer_no_timer // If NULL, no timer has expired
+
+ /* Set expiration flag. */
+ /* _tx_timer_expired = TX_TRUE; */
+
+ ori t6, t6, 2 // Set local expired flag
+ sw t4, 0(t2) // Set expired flag in memory (UINT)
+ j _tx_timer_done // Finished timer processing
+
+
+ /* }
+ else
+ { */
+_tx_timer_no_timer:
+
+ /* No timer expired, increment the timer pointer. */
+ /* _tx_timer_current_ptr++; */
+
+ /* Check for wrap-around. */
+ /* if (_tx_timer_current_ptr == _tx_timer_list_end) */
+
+ la t2, _tx_timer_list_end // Pickup address of list end pointer
+ lw t3, 0(t2) // Pickup actual list end
+ addi t1, t1, 4 // Point to next timer entry
+ sw t1, 0(t0) // Store new timer pointer
+ bne t1, t3, _tx_timer_skip_wrap // If not same, good pointer
+
+ /* Wrap to beginning of list. */
+ /* _tx_timer_current_ptr = _tx_timer_list_start; */
+
+ la t2, _tx_timer_list_start // Pickup address of list start pointer
+ lw t4, 0(t2) // Pickup start of the list
+ sw t4, 0(t0) // Store new timer pointer
+
+
+_tx_timer_skip_wrap:
+ /* } */
+
+_tx_timer_done:
+
+
+ /* See if anything has expired. */
+ /* if ((_tx_timer_expired_time_slice) || (_tx_timer_expired))
+ { */
+
+ beqz t6, _tx_timer_nothing_expired // If nothing expired skip the rest
+ addi sp, sp, -16 // Allocate some storage on the stack
+ sw t6, 0(sp) // Save local expired flag
+ sw ra, 4(sp) // Save ra
+
+ /* Did a timer expire? */
+ /* if (_tx_timer_expired)
+ { */
+
+ andi t2, t6, 2 // Isolate the timer expired bit
+ beqz t2, _tx_timer_dont_activate // No, timer not expired
+
+ /* Call the timer expiration processing. */
+ /* _tx_timer_expiration_process(void); */
+
+ call _tx_timer_expiration_process // Call _tx_timer_expiration_process
+ lw t6, 0(sp) // Recover local expired flag
+
+ /* } */
+_tx_timer_dont_activate:
+
+ /* Did time slice expire? */
+ /* if (_tx_timer_expired_time_slice)
+ { */
+
+ andi t2, t6, 1 // Is the timer expired bit set?
+ beqz t2, _tx_timer_not_ts_expiration // If not, skip time slice processing
+
+ /* Time slice interrupted thread. */
+ /* _tx_thread_time_slice(); */
+
+ call _tx_thread_time_slice // Call time slice
+
+ /* } */
+
+_tx_timer_not_ts_expiration:
+
+ lw ra, 4(sp) // Recover ra
+ addi sp, sp, 16 // Recover stack space
+ /* } */
+
+_tx_timer_nothing_expired:
+
+ ret
+
+/* } */
\ No newline at end of file
diff --git a/ports/risc-v32/gnu/CMakeLists.txt b/ports/risc-v32/gnu/CMakeLists.txt
new file mode 100644
index 00000000..9357c697
--- /dev/null
+++ b/ports/risc-v32/gnu/CMakeLists.txt
@@ -0,0 +1,19 @@
+
+target_sources(${PROJECT_NAME}
+ PRIVATE
+ # {{BEGIN_TARGET_SOURCES}}
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_initialize_low_level.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_restore.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_save.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_control.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_schedule.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_build.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_return.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_interrupt.S
+ # {{END_TARGET_SOURCES}}
+)
+
+target_include_directories(${PROJECT_NAME}
+ PUBLIC
+ ${CMAKE_CURRENT_LIST_DIR}/inc
+)
diff --git a/ports/risc-v32/gnu/example_build/qemu_virt/board.c b/ports/risc-v32/gnu/example_build/qemu_virt/board.c
new file mode 100644
index 00000000..fc75de66
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/qemu_virt/board.c
@@ -0,0 +1,42 @@
+/***************************************************************************
+ * Copyright (c) 2025 10xEngineers
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+#include "plic.h"
+#include "hwtimer.h"
+#include "uart.h"
+#include
+#include
+
+void *memset(const void *des, int c,size_t n)
+{
+ if((des == NULL) || n <=0)
+ return (void*)des;
+ char* t = (char*)des;
+ int i;
+ for(i=0;i
+
+static inline uint32_t riscv_get_core()
+{
+ uint32_t x;
+ asm volatile("csrr %0, mhartid" : "=r" (x) );
+ return x;
+}
+
+static inline uint32_t riscv_get_mstatus()
+{
+ uint32_t x;
+ asm volatile("csrr %0, mstatus" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_mstatus(uint32_t x)
+{
+ asm volatile("csrw mstatus, %0" : : "r" (x));
+}
+
+static inline void riscv_writ_mepc(uint32_t x)
+{
+ asm volatile("csrw mepc, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_sstatus()
+{
+ uint32_t x;
+ asm volatile("csrr %0, sstatus" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_sstatus(uint32_t x)
+{
+ asm volatile("csrw sstatus, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_sip()
+{
+ uint32_t x;
+ asm volatile("csrr %0, sip" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_sip(uint32_t x)
+{
+ asm volatile("csrw sip, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_sie()
+{
+ uint32_t x;
+ asm volatile("csrr %0, sie" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_sie(uint32_t x)
+{
+ asm volatile("csrw sie, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_mie()
+{
+ uint32_t x;
+ asm volatile("csrr %0, mie" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_mie(uint32_t x)
+{
+ asm volatile("csrw mie, %0" : : "r" (x));
+}
+
+static inline void riscv_writ_sepc(uint32_t x)
+{
+ asm volatile("csrw sepc, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_sepc()
+{
+ uint32_t x;
+ asm volatile("csrr %0, sepc" : "=r" (x) );
+ return x;
+}
+
+static inline uint32_t riscv_get_medeleg()
+{
+ uint32_t x;
+ asm volatile("csrr %0, medeleg" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_medeleg(uint32_t x)
+{
+ asm volatile("csrw medeleg, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_mideleg()
+{
+ uint32_t x;
+ asm volatile("csrr %0, mideleg" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_mideleg(uint32_t x)
+{
+ asm volatile("csrw mideleg, %0" : : "r" (x));
+}
+
+static inline void riscv_writ_stvec(uint32_t x)
+{
+ asm volatile("csrw stvec, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_stvec()
+{
+ uint32_t x;
+ asm volatile("csrr %0, stvec" : "=r" (x) );
+ return x;
+}
+
+static inline uint32_t riscv_get_stimecmp()
+{
+ uint32_t x;
+ asm volatile("csrr %0, 0x14d" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_stimecmp(uint32_t x)
+{
+ asm volatile("csrw 0x14d, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_menvcfg()
+{
+ uint32_t x;
+ asm volatile("csrr %0, 0x30a" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_menvcfg(uint32_t x)
+{
+ asm volatile("csrw 0x30a, %0" : : "r" (x));
+}
+
+static inline void riscv_writ_pmpcfg0(uint32_t x)
+{
+ asm volatile("csrw pmpcfg0, %0" : : "r" (x));
+}
+
+static inline void riscv_writ_pmpaddr0(uint32_t x)
+{
+ asm volatile("csrw pmpaddr0, %0" : : "r" (x));
+}
+
+static inline void riscv_writ_satp(uint32_t x)
+{
+ asm volatile("csrw satp, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_satp()
+{
+ uint32_t x;
+ asm volatile("csrr %0, satp" : "=r" (x) );
+ return x;
+}
+
+static inline uint32_t riscv_get_scause()
+{
+ uint32_t x;
+ asm volatile("csrr %0, scause" : "=r" (x) );
+ return x;
+}
+
+static inline uint32_t riscv_get_stval()
+{
+ uint32_t x;
+ asm volatile("csrr %0, stval" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_mcounteren(uint32_t x)
+{
+ asm volatile("csrw mcounteren, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_mcounteren()
+{
+ uint32_t x;
+ asm volatile("csrr %0, mcounteren" : "=r" (x) );
+ return x;
+}
+
+static inline uint32_t riscv_get_time()
+{
+ uint32_t x;
+ asm volatile("csrr %0, time" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_sintr_on()
+{
+ uint32_t sstatus = riscv_get_sstatus();
+ sstatus |= SSTATUS_SIE;
+ riscv_writ_sstatus(sstatus);
+}
+
+static inline void riscv_sintr_off()
+{
+ uint32_t sstatus = riscv_get_sstatus();
+ sstatus &= (~SSTATUS_SIE);
+ riscv_writ_sstatus(sstatus);
+}
+
+static inline int riscv_sintr_get()
+{
+ uint32_t x = riscv_get_sstatus();
+ return (x & SSTATUS_SIE) != 0;
+}
+
+static inline void riscv_sintr_restore(int x)
+{
+ if(x)
+ riscv_sintr_on();
+ else
+ riscv_sintr_off();
+}
+
+static inline void riscv_mintr_on()
+{
+ uint32_t mstatus = riscv_get_mstatus();
+ mstatus |= MSTATUS_MIE;
+ riscv_writ_mstatus(mstatus);
+}
+
+static inline void riscv_mintr_off()
+{
+ uint32_t mstatus = riscv_get_mstatus();
+ mstatus &= (~MSTATUS_MIE);
+ riscv_writ_mstatus(mstatus);
+}
+
+static inline int riscv_mintr_get()
+{
+ uint32_t x = riscv_get_mstatus();
+ return (x & MSTATUS_MIE) != 0;
+}
+
+static inline void riscv_mintr_restore(int x)
+{
+ if(x)
+ riscv_mintr_on();
+ else
+ riscv_mintr_off();
+}
+
+static inline uint32_t riscv_get_sp()
+{
+ uint32_t x;
+ asm volatile("mv %0, sp" : "=r" (x) );
+ return x;
+}
+
+// read and write tp, the thread pointer, which xv6 uses to hold
+// this core's hartid (core number), the index into cpus[].
+static inline uint32_t riscv_get_tp()
+{
+ uint32_t x;
+ asm volatile("mv %0, tp" : "=r" (x) );
+ return x;
+}
+
+static inline void riscv_writ_tp(uint32_t x)
+{
+ asm volatile("mv tp, %0" : : "r" (x));
+}
+
+static inline uint32_t riscv_get_ra()
+{
+ uint32_t x;
+ asm volatile("mv %0, ra" : "=r" (x) );
+ return x;
+}
+
+// flush the TLB.
+static inline void sfence_vma()
+{
+ // the zero, zero means flush all TLB entries.
+ asm volatile("sfence.vma zero, zero");
+}
+
+#endif // __ASSEMBLER__
+
+#endif
diff --git a/ports/risc-v32/gnu/example_build/qemu_virt/demo_threadx.c b/ports/risc-v32/gnu/example_build/qemu_virt/demo_threadx.c
new file mode 100644
index 00000000..f21dbb26
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/qemu_virt/demo_threadx.c
@@ -0,0 +1,393 @@
+/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
+ threads of different priorities, using a message queue, semaphore, mutex, event flags group,
+ byte pool, and block pool. */
+
+#include "tx_api.h"
+#include "uart.h"
+
+#define DEMO_STACK_SIZE 1024
+#define DEMO_BYTE_POOL_SIZE 9120
+#define DEMO_BLOCK_POOL_SIZE 100
+#define DEMO_QUEUE_SIZE 100
+
+char *_to_str(ULONG val)
+{
+ static char buf[11]; /* 10 digits max + '\0' */
+ char *p = buf + sizeof(buf) - 1;
+
+ *p = '\0';
+ do {
+ *--p = '0' + (val % 10);
+ val /= 10;
+ } while (val);
+
+ return p;
+}
+
+/* Define the ThreadX object control blocks... */
+
+TX_THREAD thread_0;
+TX_THREAD thread_1;
+TX_THREAD thread_2;
+TX_THREAD thread_3;
+TX_THREAD thread_4;
+TX_THREAD thread_5;
+TX_THREAD thread_6;
+TX_THREAD thread_7;
+TX_QUEUE queue_0;
+TX_SEMAPHORE semaphore_0;
+TX_MUTEX mutex_0;
+TX_EVENT_FLAGS_GROUP event_flags_0;
+TX_BYTE_POOL byte_pool_0;
+TX_BLOCK_POOL block_pool_0;
+
+
+/* Define the counters used in the demo application... */
+
+ULONG thread_0_counter;
+ULONG thread_1_counter;
+ULONG thread_1_messages_sent;
+ULONG thread_2_counter;
+ULONG thread_2_messages_received;
+ULONG thread_3_counter;
+ULONG thread_4_counter;
+ULONG thread_5_counter;
+ULONG thread_6_counter;
+ULONG thread_7_counter;
+
+
+/* Define thread prototypes. */
+
+void thread_0_entry(ULONG thread_input);
+void thread_1_entry(ULONG thread_input);
+void thread_2_entry(ULONG thread_input);
+void thread_3_and_4_entry(ULONG thread_input);
+void thread_5_entry(ULONG thread_input);
+void thread_6_and_7_entry(ULONG thread_input);
+
+
+/* Define main entry point. */
+
+int main()
+{
+
+ /* Enter the ThreadX kernel. */
+ tx_kernel_enter();
+}
+
+
+/* Define what the initial system looks like. */
+
+void tx_application_define(void *first_unused_memory)
+{
+ CHAR *pointer = TX_NULL;
+
+ /* Create a byte memory pool from which to allocate the thread stacks. */
+ tx_byte_pool_create(&byte_pool_0, "byte pool 0", first_unused_memory, DEMO_BYTE_POOL_SIZE);
+
+ /* Put system definition stuff in here, e.g. thread creates and other assorted
+ create information. */
+
+ /* Allocate the stack for thread 0. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
+
+ /* Create the main thread. */
+ tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
+ pointer, DEMO_STACK_SIZE,
+ 1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
+
+
+ /* Allocate the stack for thread 1. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
+
+ /* Create threads 1 and 2. These threads pass information through a ThreadX
+ message queue. It is also interesting to note that these threads have a time
+ slice. */
+ tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
+ pointer, DEMO_STACK_SIZE,
+ 16, 16, 4, TX_AUTO_START);
+
+ /* Allocate the stack for thread 2. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
+
+ tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
+ pointer, DEMO_STACK_SIZE,
+ 16, 16, 4, TX_AUTO_START);
+
+ /* Allocate the stack for thread 3. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
+
+ /* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
+ An interesting thing here is that both threads share the same instruction area. */
+ tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
+ pointer, DEMO_STACK_SIZE,
+ 8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
+
+ /* Allocate the stack for thread 4. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
+
+ tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
+ pointer, DEMO_STACK_SIZE,
+ 8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
+
+ /* Allocate the stack for thread 5. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
+
+ /* Create thread 5. This thread simply pends on an event flag which will be set
+ by thread_0. */
+ tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
+ pointer, DEMO_STACK_SIZE,
+ 4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
+
+ /* Allocate the stack for thread 6. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
+
+ /* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
+ tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
+ pointer, DEMO_STACK_SIZE,
+ 8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
+
+ /* Allocate the stack for thread 7. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
+
+ tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
+ pointer, DEMO_STACK_SIZE,
+ 8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
+
+ /* Allocate the message queue. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_QUEUE_SIZE*sizeof(ULONG), TX_NO_WAIT);
+
+ /* Create the message queue shared by threads 1 and 2. */
+ tx_queue_create(&queue_0, "queue 0", TX_1_ULONG, pointer, DEMO_QUEUE_SIZE*sizeof(ULONG));
+
+ /* Create the semaphore used by threads 3 and 4. */
+ tx_semaphore_create(&semaphore_0, "semaphore 0", 1);
+
+ /* Create the event flags group used by threads 1 and 5. */
+ tx_event_flags_create(&event_flags_0, "event flags 0");
+
+ /* Create the mutex used by thread 6 and 7 without priority inheritance. */
+ tx_mutex_create(&mutex_0, "mutex 0", TX_NO_INHERIT);
+
+ /* Allocate the memory for a small block pool. */
+ tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_BLOCK_POOL_SIZE, TX_NO_WAIT);
+
+ /* Create a block memory pool to allocate a message buffer from. */
+ tx_block_pool_create(&block_pool_0, "block pool 0", sizeof(ULONG), pointer, DEMO_BLOCK_POOL_SIZE);
+
+ /* Allocate a block and release the block memory. */
+ tx_block_allocate(&block_pool_0, (VOID **) &pointer, TX_NO_WAIT);
+
+ /* Release the block back to the pool. */
+ tx_block_release(pointer);
+}
+
+
+
+/* Define the test threads. */
+
+void thread_0_entry(ULONG thread_input)
+{
+
+UINT status;
+
+
+ /* This thread simply sits in while-forever-sleep loop. */
+ while(1)
+ {
+ puts("[Thread] : thread_0_entry is here!");
+
+ /* Increment the thread counter. */
+ thread_0_counter++;
+
+ /* Sleep for 10 ticks. */
+ tx_thread_sleep(10);
+
+ /* Set event flag 0 to wakeup thread 5. */
+ status = tx_event_flags_set(&event_flags_0, 0x1, TX_OR);
+
+ /* Check status. */
+ if (status != TX_SUCCESS)
+ break;
+ }
+}
+
+
+void thread_1_entry(ULONG thread_input)
+{
+
+UINT status;
+
+ /* This thread simply sends messages to a queue shared by thread 2. */
+ while(1)
+ {
+ puts("[Thread] : thread_1_entry is here!");
+ /* Increment the thread counter. */
+ thread_1_counter++;
+
+ /* Send message to queue 0. */
+ status = tx_queue_send(&queue_0, &thread_1_messages_sent, TX_WAIT_FOREVER);
+
+ /* Check completion status. */
+ if (status != TX_SUCCESS) {
+ puts("[Thread 1] ERROR: Failed to send message!");
+ break;
+ }
+
+ /* Increment the message sent. */
+ thread_1_messages_sent++;
+ }
+}
+
+
+
+void thread_2_entry(ULONG thread_input)
+{
+
+ULONG received_message;
+UINT status;
+
+ /* This thread retrieves messages placed on the queue by thread 1. */
+ while(1)
+ {
+ puts("[Thread] : thread_2_entry is here!");
+ /* Increment the thread counter. */
+ thread_2_counter++;
+
+ /* Retrieve a message from the queue. */
+ status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
+
+ /* Check completion status and make sure the message is what we
+ expected. */
+ if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received)){
+ puts("[Thread 2] ERROR: Failed to receive message ! Expected # ");
+ uart_puts(_to_str(thread_2_messages_received));
+ puts(", but got # ");
+ uart_puts(_to_str(received_message));
+ break;
+ }
+
+ /* Otherwise, all is okay. Increment the received message count. */
+ thread_2_messages_received++;
+ }
+}
+
+
+void thread_3_and_4_entry(ULONG thread_input)
+{
+
+UINT status;
+
+
+ /* This function is executed from thread 3 and thread 4. As the loop
+ below shows, these function compete for ownership of semaphore_0. */
+ while(1)
+ {
+ puts("[Thread] : thread_3_and_4_entry is here!");
+
+
+ /* Increment the thread counter. */
+ if (thread_input == 3)
+ thread_3_counter++;
+ else
+ thread_4_counter++;
+
+ /* Get the semaphore with suspension. */
+ status = tx_semaphore_get(&semaphore_0, TX_WAIT_FOREVER);
+
+ /* Check status. */
+ if (status != TX_SUCCESS)
+ break;
+
+ /* Sleep for 2 ticks to hold the semaphore. */
+ tx_thread_sleep(2);
+
+ /* Release the semaphore. */
+ status = tx_semaphore_put(&semaphore_0);
+
+ /* Check status. */
+ if (status != TX_SUCCESS)
+ break;
+ }
+}
+
+
+void thread_5_entry(ULONG thread_input)
+{
+
+UINT status;
+ULONG actual_flags;
+
+
+ /* This thread simply waits for an event in a forever loop. */
+ while(1)
+ {
+ puts("[Thread] : thread_5_entry is here!");
+
+ /* Increment the thread counter. */
+ thread_5_counter++;
+
+ /* Wait for event flag 0. */
+ status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
+ &actual_flags, TX_WAIT_FOREVER);
+
+ /* Check status. */
+ if ((status != TX_SUCCESS) || (actual_flags != 0x1))
+ break;
+ }
+}
+
+
+void thread_6_and_7_entry(ULONG thread_input)
+{
+
+UINT status;
+
+
+ /* This function is executed from thread 6 and thread 7. As the loop
+ below shows, these function compete for ownership of mutex_0. */
+ while(1)
+ {
+ puts("[Thread] : thread_6_and_7_entry is here!");
+
+ /* Increment the thread counter. */
+ if (thread_input == 6)
+ thread_6_counter++;
+ else
+ thread_7_counter++;
+
+ /* Get the mutex with suspension. */
+ status = tx_mutex_get(&mutex_0, TX_WAIT_FOREVER);
+
+ /* Check status. */
+ if (status != TX_SUCCESS)
+ break;
+
+ /* Get the mutex again with suspension. This shows
+ that an owning thread may retrieve the mutex it
+ owns multiple times. */
+ status = tx_mutex_get(&mutex_0, TX_WAIT_FOREVER);
+
+ /* Check status. */
+ if (status != TX_SUCCESS)
+ break;
+
+ /* Sleep for 2 ticks to hold the mutex. */
+ tx_thread_sleep(2);
+
+ /* Release the mutex. */
+ status = tx_mutex_put(&mutex_0);
+
+ /* Check status. */
+ if (status != TX_SUCCESS)
+ break;
+
+ /* Release the mutex again. This will actually
+ release ownership since it was obtained twice. */
+ status = tx_mutex_put(&mutex_0);
+
+ /* Check status. */
+ if (status != TX_SUCCESS)
+ break;
+ }
+}
diff --git a/ports/risc-v32/gnu/example_build/qemu_virt/entry.s b/ports/risc-v32/gnu/example_build/qemu_virt/entry.s
new file mode 100644
index 00000000..9b202ca1
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/qemu_virt/entry.s
@@ -0,0 +1,58 @@
+
+.section .text
+.align 4
+.global _start
+.extern main
+.extern _sysstack_start
+.extern _bss_start
+.extern _bss_end
+_start:
+ csrr t0, mhartid
+ bne t0, zero, 1f
+ li x1, 0
+ li x2, 0
+ li x3, 0
+ li x4, 0
+ li x5, 0
+ li x6, 0
+ li x7, 0
+ li x8, 0
+ li x9, 0
+ li x10, 0
+ li x11, 0
+ li x12, 0
+ li x13, 0
+ li x14, 0
+ li x15, 0
+ li x16, 0
+ li x17, 0
+ li x18, 0
+ li x19, 0
+ li x20, 0
+ li x21, 0
+ li x22, 0
+ li x23, 0
+ li x24, 0
+ li x25, 0
+ li x26, 0
+ li x27, 0
+ li x28, 0
+ li x29, 0
+ li x30, 0
+ li x31, 0
+ la t0, _sysstack_start
+ li t1, 0x1000
+ add sp, t0, t1
+ la t0, _bss_start
+ la t1, _bss_end
+_bss_clean_start:
+ bgeu t0, t1, _bss_clean_end
+ sb zero, 0(t0)
+ addi t0, t0, 1
+ j _bss_clean_start
+_bss_clean_end:
+ call main
+1:
+ /* todo smp */
+ wfi
+ j 1b
diff --git a/ports/risc-v32/gnu/example_build/qemu_virt/hwtimer.c b/ports/risc-v32/gnu/example_build/qemu_virt/hwtimer.c
new file mode 100644
index 00000000..33c49b63
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/qemu_virt/hwtimer.c
@@ -0,0 +1,35 @@
+/***************************************************************************
+ * Copyright (c) 2025 10xEngineers
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+#include "tx_port.h"
+#include "csr.h"
+#include "hwtimer.h"
+
+#define CLINT (0x02000000L)
+#define CLINT_TIME (CLINT+0xBFF8)
+#define CLINT_TIMECMP(hart_id) (CLINT+0x4000+8*(hart_id))
+
+
+int hwtimer_init(void)
+{
+ int hart = riscv_get_core();
+ uint64_t time = *((uint64_t*)CLINT_TIME);
+ *((uint64_t*)CLINT_TIMECMP(hart)) = time + TICKNUM_PER_TIMER;
+ return 0;
+}
+
+int hwtimer_handler(void)
+{
+ int hart = riscv_get_core();
+ uint64_t time = *((uint64_t*)CLINT_TIME);
+ *((uint64_t*)CLINT_TIMECMP(hart)) = time + TICKNUM_PER_TIMER;
+ return 0;
+}
+
diff --git a/ports/risc-v32/gnu/example_build/qemu_virt/hwtimer.h b/ports/risc-v32/gnu/example_build/qemu_virt/hwtimer.h
new file mode 100644
index 00000000..966b1abf
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/qemu_virt/hwtimer.h
@@ -0,0 +1,23 @@
+
+/***************************************************************************
+ * Copyright (c) 2025 10xEngineers
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+#ifndef RISCV_HWTIMER_H
+#define RISCV_HWTIMER_H
+
+#include
+
+#define TICKNUM_PER_SECOND 10000000
+#define TICKNUM_PER_TIMER (TICKNUM_PER_SECOND / 10)
+
+int hwtimer_init(void);
+int hwtimer_handler(void);
+
+#endif
diff --git a/ports/risc-v32/gnu/example_build/qemu_virt/link.lds b/ports/risc-v32/gnu/example_build/qemu_virt/link.lds
new file mode 100644
index 00000000..522f90d9
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/qemu_virt/link.lds
@@ -0,0 +1,49 @@
+OUTPUT_ARCH( "riscv" )
+ENTRY( _start )
+
+SECTIONS
+{
+ /*
+ * ensure that entry.S / _entry is at 0x80000000,
+ * where qemu's -kernel jumps.
+ */
+ . = 0x80000000;
+
+ .text : {
+ *(.text .text.*)
+ . = ALIGN(0x1000);
+ PROVIDE(etext = .);
+ }
+
+ .rodata : {
+ . = ALIGN(16);
+ *(.srodata .srodata.*) /* do not need to distinguish this from .rodata */
+ . = ALIGN(16);
+ *(.rodata .rodata.*)
+ }
+
+ .data : {
+ . = ALIGN(16);
+ *(.sdata .sdata.*) /* do not need to distinguish this from .data */
+ . = ALIGN(16);
+ *(.data .data.*)
+ }
+
+ .bss : {
+ . = ALIGN(16);
+ _bss_start = .;
+ *(.sbss .sbss.*) /* do not need to distinguish this from .bss */
+ . = ALIGN(16);
+ *(.bss .bss.*)
+ _bss_end = .;
+ }
+
+ .stack : {
+ . = ALIGN(4096);
+ _sysstack_start = .;
+ . += 0x1000;
+ _sysstack_end = .;
+ }
+
+ PROVIDE(_end = .);
+}
diff --git a/ports/risc-v32/gnu/example_build/qemu_virt/plic.c b/ports/risc-v32/gnu/example_build/qemu_virt/plic.c
new file mode 100644
index 00000000..01e5c71a
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/qemu_virt/plic.c
@@ -0,0 +1,72 @@
+#include "plic.h"
+#include
+irq_callback callbacks[MAX_CALLBACK_NUM];
+
+void plic_irq_enable(int irqno)
+{
+ int hart = riscv_get_core();
+ *(uint32_t*)PLIC_MENABLE(hart) = (*(uint32_t*)PLIC_MENABLE(hart) | (1 << irqno));
+ return;
+}
+
+void plic_irq_disable(int irqno)
+{
+ int hart = riscv_get_core();
+ *(uint32_t*)PLIC_MENABLE(hart) = (*(uint32_t*)PLIC_MENABLE(hart) & (~(1 << irqno)));
+ return;
+}
+
+void plic_prio_set(int irqno, int prio)
+{
+ PLIC_SET_PRIO(irqno, prio);
+}
+
+int plic_prio_get(int irqno)
+{
+ return PLIC_GET_PRIO(irqno);
+}
+
+int plic_register_callback(int irqno, irq_callback callback)
+{
+ if(!(irqno >=0 && irqno < MAX_CALLBACK_NUM))
+ return -1;
+ callbacks[irqno] = callback;
+ return 0;
+}
+
+int plic_unregister_callback(int irqno)
+{
+ return plic_register_callback(irqno, NULL);
+}
+
+int plic_init(void)
+{
+ for(int i=0;i
+
+#define PLIC 0x0c000000L
+#define PLIC_PRIORITY (PLIC + 0x0)
+#define PLIC_PENDING (PLIC + 0x1000)
+#define PLIC_MENABLE(hart) (PLIC + 0x2000 + (hart)*0x100)
+#define PLIC_SENABLE(hart) (PLIC + 0x2080 + (hart)*0x100)
+#define PLIC_MPRIORITY(hart) (PLIC + 0x200000 + (hart)*0x2000)
+#define PLIC_SPRIORITY(hart) (PLIC + 0x201000 + (hart)*0x2000)
+#define PLIC_MCLAIM(hart) (PLIC + 0x200004 + (hart)*0x2000)
+#define PLIC_SCLAIM(hart) (PLIC + 0x201004 + (hart)*0x2000)
+#define PLIC_MCOMPLETE(hart) (PLIC + 0x200004 + (hart)*0x2000)
+#define PLIC_SCOMPLETE(hart) (PLIC + 0x201004 + (hart)*0x2000)
+
+
+#define PLIC_GET_PRIO(irqno) (*(uint32_t *)(PLIC_PRIORITY + (irqno)*4))
+#define PLIC_SET_PRIO(irqno, prio) (*(uint32_t *)(PLIC_PRIORITY + (irqno)*4) = (prio))
+
+#define MAX_CALLBACK_NUM 128
+typedef int (*irq_callback)(int irqno);
+
+void plic_irq_enable(int irqno);
+void plic_irq_disable(int irqno);
+int plic_prio_get(int irqno);
+void plic_prio_set(int irqno, int prio);
+int plic_register_callback(int irqno, irq_callback callback);
+int plic_unregister_callback(int irqno);
+int plic_init(void);
+int plic_claim(void);
+void plic_complete(int irqno);
+
+int plic_irq_intr(void);
+
+#endif
+
diff --git a/ports/risc-v32/gnu/example_build/qemu_virt/trap.c b/ports/risc-v32/gnu/example_build/qemu_virt/trap.c
new file mode 100644
index 00000000..a2733e02
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/qemu_virt/trap.c
@@ -0,0 +1,67 @@
+#include "csr.h"
+#include
+#include "uart.h"
+#include "hwtimer.h"
+#include "plic.h"
+#include
+#include
+
+#define OS_IS_INTERUPT(mcause) (mcause & 0x80000000u)
+#define OS_IS_EXCEPTION(mcause) (~(OS_IS_INTERUPT))
+#define OS_IS_TICK_INT(mcause) (mcause == 0x80000007u)
+#define OS_IS_SOFT_INT(mcause) (mcause == 0x80000003u)
+#define OS_IS_EXT_INT(mcause) (mcause == 0x8000000bu)
+#define OS_IS_TRAP_USER(mcause) (mcause == 0x0000000bu)
+extern void _tx_timer_interrupt(void);
+
+extern int uart_putc(int ch);
+
+static void print_hex(uintptr_t val)
+{
+ char digits[] = "0123456789ABCDEF";
+ uart_putc('0');
+ uart_putc('x');
+ for(int i = (sizeof(uintptr_t)*2) - 1; i >= 0; i--) {
+ int d = (val >> (i*4)) & 0xF;
+ uart_putc(digits[d]);
+ }
+ uart_putc('\n');
+}
+
+void trap_handler(uintptr_t mcause, uintptr_t mepc, uintptr_t mtval)
+{
+ // uart_puts("DEBUG : threadx/ports/risc-v32/gnu/example_build/qemu_virt/trap.c, trap_handler\n");
+ if(OS_IS_INTERUPT(mcause))
+ {
+ if(OS_IS_TICK_INT(mcause))
+ {
+ hwtimer_handler();
+ _tx_timer_interrupt();
+ }
+ else if(OS_IS_EXT_INT(mcause))
+ {
+ int ret = plic_irq_intr();
+ if(ret)
+ {
+ puts("[INTERRUPT]: handler irq error!");
+ while(1) ;
+ }
+ }
+ else
+ {
+ puts("[INTERRUPT]: now can't deal with the interrupt!");
+ while(1) ;
+ }
+ }
+ else
+ {
+ puts("[EXCEPTION] : Unkown Error!!");
+ puts("mcause:");
+ print_hex(mcause);
+ puts("mepc:");
+ print_hex(mepc);
+ puts("mtval:");
+ print_hex(mtval);
+ while(1) ;
+ }
+}
diff --git a/ports/risc-v32/gnu/example_build/qemu_virt/tx_initialize_low_level.S b/ports/risc-v32/gnu/example_build/qemu_virt/tx_initialize_low_level.S
new file mode 100644
index 00000000..9a7a74ff
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/qemu_virt/tx_initialize_low_level.S
@@ -0,0 +1,162 @@
+/***************************************************************************
+ * Copyright (c) 2025 10xEngineers
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+#include "csr.h"
+
+ .section .text
+ .align 4
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* trap_entry RISC-V32/GNU */
+/* 6.4.x */
+/* AUTHOR */
+/* */
+/* Akif Ejaz, 10xEngineers */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function is responsible for riscv processor trap handle */
+/* It will do the contex save and call c trap_handler and do contex */
+/* load */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* trap_handler */
+/* */
+/* CALLED BY */
+/* */
+/* hardware exception */
+/* */
+/**************************************************************************/
+
+
+/**************************************************************************/
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** Initialize */
+/** */
+/**************************************************************************/
+/**************************************************************************/
+ .global trap_entry
+ .extern trap_handler
+ .extern _tx_thread_context_restore
+ trap_entry:
+#if defined(__riscv_float_abi_single) || defined(__riscv_float_abi_double)
+ addi sp, sp, -260 // Allocate space for all registers - with floating point enabled (65*4)
+#else
+ addi sp, sp, -128 // Allocate space for all registers - without floating point enabled (32*4)
+#endif
+
+ sw x1, 112(sp) // Store RA (28*4 = 112, because call will override ra [ra is a callee register in riscv])
+
+ call _tx_thread_context_save
+
+ csrr a0, mcause
+ csrr a1, mepc
+ csrr a2, mtval
+ addi sp, sp, -4
+ sw ra, 0(sp)
+ call trap_handler
+ lw ra, 0(sp)
+ addi sp, sp, 4
+ call _tx_thread_context_restore
+ // it will nerver return
+_err:
+ wfi
+ j _err
+ .section .text
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_initialize_low_level RISC-V32/GNU */
+/* 6.4.x */
+/* AUTHOR */
+/* */
+/* Akif Ejaz, 10xEngineers */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function is responsible for any low-level processor */
+/* initialization, including setting up interrupt vectors, setting */
+/* up a periodic timer interrupt source, saving the system stack */
+/* pointer for use in ISR processing later, and finding the first */
+/* available RAM memory address for tx_application_define. */
+/* */
+/* INPUT */
+/* */
+/* None */
+/* */
+/* OUTPUT */
+/* */
+/* None */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_initialize_kernel_enter ThreadX entry function */
+/* */
+/* RELEASE HISTORY */
+/* */
+/* DATE NAME DESCRIPTION */
+/* */
+/* 12-29-2025 Akif Ejaz Adapted for RV32 from RV64 port */
+/* */
+/**************************************************************************/
+/* VOID _tx_initialize_low_level(VOID)
+{ */
+ .global _tx_initialize_low_level
+ .weak _tx_initialize_low_level
+ .extern _end
+ .extern board_init
+_tx_initialize_low_level:
+
+ .section .text
+
+ la t0, _tx_thread_system_stack_ptr
+ sw sp, 0(t0) // Save system stack pointer
+
+ la t0, _end // Pickup first free address
+ la t1, _tx_initialize_unused_memory
+ sw t0, 0(t1) // Save unused memory address
+ li t0, MSTATUS_MIE
+ csrrc zero, mstatus, t0 // clear MSTATUS_MIE bit
+ li t0, (MSTATUS_MPP_M | MSTATUS_MPIE )
+ csrrs zero, mstatus, t0 // set MSTATUS_MPP, MPIE bit
+ li t0, (MIE_MTIE | MIE_MSIE | MIE_MEIE)
+ csrrs zero, mie, t0 // set mie
+#ifdef __riscv_flen
+ li t0, MSTATUS_FS
+ csrrs zero, mstatus, t0 // set MSTATUS_FS bit to open f/d isa in riscv
+ fscsr x0
+#endif
+ addi sp, sp, -4
+ sw ra, 0(sp)
+ call board_init
+ lw ra, 0(sp)
+ addi sp, sp, 4
+ la t0, trap_entry
+ csrw mtvec, t0
+ ret
diff --git a/ports/risc-v32/gnu/example_build/qemu_virt/uart.c b/ports/risc-v32/gnu/example_build/qemu_virt/uart.c
new file mode 100644
index 00000000..a175b7d2
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/qemu_virt/uart.c
@@ -0,0 +1,102 @@
+#include "uart.h"
+#include "csr.h"
+#include "plic.h"
+#include
+
+// the UART control registers are memory-mapped
+// at address UART0. this macro returns the
+// address of one of the registers.
+#define Reg(reg) ((volatile unsigned char *)(UART0 + (reg)))
+
+// the UART control registers.
+// some have different meanings for
+// read vs write.
+// see http://byterunner.com/16550.html
+#define RHR 0 // receive holding register (for input bytes)
+#define THR 0 // transmit holding register (for output bytes)
+#define IER 1 // interrupt enable register
+#define IER_RX_ENABLE (1<<0)
+#define IER_TX_ENABLE (1<<1)
+#define FCR 2 // FIFO control register
+#define FCR_FIFO_ENABLE (1<<0)
+#define FCR_FIFO_CLEAR (3<<1) // clear the content of the two FIFOs
+#define ISR 2 // interrupt status register
+#define LCR 3 // line control register
+#define LCR_EIGHT_BITS (3<<0)
+#define LCR_BAUD_LATCH (1<<7) // special mode to set baud rate
+#define LSR 5 // line status register
+#define LSR_RX_READY (1<<0) // input is waiting to be read from RHR
+#define LSR_TX_IDLE (1<<5) // THR can accept another character to send
+
+#define ReadReg(reg) (*(Reg(reg)))
+#define WriteReg(reg, v) (*(Reg(reg)) = (v))
+
+int uart_init(void)
+{
+ // disable interrupts.
+ WriteReg(IER, 0x00);
+
+ // special mode to set baud rate.
+ WriteReg(LCR, LCR_BAUD_LATCH);
+
+ // LSB for baud rate of 38.4K.
+ WriteReg(0, 0x03);
+
+ // MSB for baud rate of 38.4K.
+ WriteReg(1, 0x00);
+
+ // leave set-baud mode,
+ // and set word length to 8 bits, no parity.
+ WriteReg(LCR, LCR_EIGHT_BITS);
+
+ // reset and enable FIFOs.
+ WriteReg(FCR, FCR_FIFO_ENABLE | FCR_FIFO_CLEAR);
+
+ // enable transmit and receive interrupts.
+ // WriteReg(IER, IER_TX_ENABLE | IER_RX_ENABLE);
+
+ //enable UART0 in PLIC
+ plic_irq_enable(UART0_IRQ);
+
+ //set UART0 priority in PLIC
+ plic_prio_set(UART0_IRQ, 1);
+
+ //register callback for UART0
+ //plic_register_callback(UART0_IRQ, uart_intr);
+ puts("[UART0] : Uart Init Done, this is Test output!");
+ return 0;
+}
+
+void uart_putc_nolock(int ch)
+{
+ // wait for Transmit Holding Empty to be set in LSR.
+ while((ReadReg(LSR) & LSR_TX_IDLE) == 0)
+ ;
+ WriteReg(THR, ch);
+ return;
+}
+
+int uart_putc(int ch)
+{
+ int intr_enable = riscv_mintr_get();
+ riscv_mintr_off();
+ uart_putc_nolock(ch);
+ riscv_mintr_restore(intr_enable);
+ return 1;
+}
+
+int uart_puts(const char* str)
+{
+ int i;
+ int intr_enable = riscv_mintr_get();
+ riscv_mintr_off();
+ for(i=0;str[i]!=0;i++)
+ {
+ uart_putc_nolock(str[i]);
+ }
+ uart_putc_nolock('\n');
+ riscv_mintr_restore(intr_enable);
+ return i;
+}
+
+
diff --git a/ports/risc-v32/gnu/example_build/qemu_virt/uart.h b/ports/risc-v32/gnu/example_build/qemu_virt/uart.h
new file mode 100644
index 00000000..debfd9df
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/qemu_virt/uart.h
@@ -0,0 +1,23 @@
+/***************************************************************************
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+
+#ifndef RISCV_UART_H
+#define RISCV_UART_H
+
+#define UART0 0x10000000L
+#define UART0_IRQ 10
+
+#define puts uart_puts
+int uart_init(void);
+int uart_putc(int ch);
+void uart_putc_nolock(int ch);
+int uart_puts(const char* str);
+#endif
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/CMakeLists.txt b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/CMakeLists.txt
new file mode 100644
index 00000000..0d8c22ea
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/CMakeLists.txt
@@ -0,0 +1,77 @@
+cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
+
+project(demo_threadx
+ LANGUAGES C ASM
+)
+
+set(SRCS
+ ${CMAKE_CURRENT_LIST_DIR}/demo_threadx.c
+ ${CMAKE_CURRENT_LIST_DIR}/pre_main.c
+ ${CMAKE_CURRENT_LIST_DIR}/boards/board_riscv_dummy/src/uart/board_uart.c
+ ${CMAKE_CURRENT_LIST_DIR}/boards/board_riscv_dummy/src/board_init.c
+ ${CMAKE_CURRENT_LIST_DIR}/components/csi/csi2/src/csi_misc.c
+ ${CMAKE_CURRENT_LIST_DIR}/components/libc_threadx/mini_printf.c
+ ${CMAKE_CURRENT_LIST_DIR}/components/libc_threadx/newlib_stub.c
+ ${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/src/arch/e906fdp/startup.S
+ ${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/src/arch/e906fdp/vectors.S
+ ${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/src/arch/e906fdp/system.c
+ ${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/src/arch/e906fdp/trap_c.c
+ ${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/src/drivers/dw_uart_ll.c
+ ${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/src/drivers/uart.c
+ ${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/src/sys/devices.c
+ ${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/src/sys/feature.c
+ ${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/src/sys/irq_port.c
+ ${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/src/sys/irq.c
+ ${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/src/sys/pre_main.c
+ ${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/src/sys/sys_clk.c
+ ${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/src/sys/target_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/src/sys/tick.c
+ ${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/src/sys/weak.c
+)
+
+include_directories(
+ ${CMAKE_CURRENT_LIST_DIR}/../../../../../common/inc
+ ${CMAKE_CURRENT_LIST_DIR}/../../inc
+ ${CMAKE_CURRENT_LIST_DIR}
+ ${CMAKE_CURRENT_LIST_DIR}/boards/board_riscv_dummy/include
+ ${CMAKE_CURRENT_LIST_DIR}/components/csi/csi2/include
+ ${CMAKE_CURRENT_LIST_DIR}/components/libc_threadx/include
+ ${CMAKE_CURRENT_LIST_DIR}/components/libc_threadx/compilers/gcc
+ ${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/include
+ ${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/include/asm
+)
+
+add_compile_options(
+ -Os -g -Wno-main
+ -Wpointer-arith -Wno-undef -ffunction-sections -fdata-sections -fno-inline-functions -fno-builtin -fno-strict-aliasing
+ -DCONFIG_SUPPORT_TSPEND=1
+ -DCONFIG_ARCH_MAINSTACK=4096
+ -DCONFIG_ARCH_INTERRUPTSTACK=4096
+ -DCONFIG_SUPPORT_IRQ_NESTED=1
+ -DCONFIG_INTC_CLIC=1
+ -DCONFIG_INTC_CLINT=1
+ -DCONFIG_XIP=1
+ -DCONFIG_LIBC_MINI_PRINTF_SUPPORT=1
+ -DCONFIG_SYSTICK_HZ=100
+ -DCONFIG_BOARD_SMARTL_EVB=1
+ -DCONFIG_CPU_XUANTIE_E906FDP=1
+ -DCONFIG_KERNEL_THREADX=1
+ -DTX_INCLUDE_USER_DEFINE_FILE
+)
+
+add_link_options(
+ -nostartfiles -Wl,--gc-sections
+ -T${CMAKE_CURRENT_LIST_DIR}/components/chip_riscv_dummy/gcc_flash_smartl.ld
+ -Wl,-zmax-page-size=1024
+ -Wl,-Map=${PROJECT_NAME}.map
+)
+
+link_directories(${CMAKE_CURRENT_LIST_DIR}/../../../../../build)
+add_executable(${PROJECT_NAME} ${SRCS})
+set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}.elf")
+target_link_libraries(${PROJECT_NAME} PRIVATE threadx)
+
+add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
+ COMMAND ${OBJDUMP} -d $ > ${PROJECT_NAME}.asm
+ COMMENT "Generating ASM disassembly files"
+)
\ No newline at end of file
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/boards/board_riscv_dummy/include/board.h b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/boards/board_riscv_dummy/include/board.h
new file mode 100644
index 00000000..a0f81d7a
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/boards/board_riscv_dummy/include/board.h
@@ -0,0 +1,444 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+/*
+ This is an example board.h for Board Component, New Board should follow the macro defines.
+*/
+
+#ifndef __BOARD_H__
+#define __BOARD_H__
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Common Board Features Define
+
+/*
+ The Common BOARD_XXX Macro Defines Boards supported features which may reference by Solutions.
+ Common board macro include:
+ . BOARD_NAME
+ · UART
+ · GPIO
+ · PWM
+ · ADC
+ · BUTTON
+ · LED
+ · WIFI
+ · BT
+ · AUDIO
+ BOARD_XXX Macro described below should be defined if the board support.
+*/
+
+/****************************************************************************/
+
+/*
+ This riscv dummy board include:
+ · UART x1
+ · GPIO x2
+ · PWM x2
+ · ADC x1
+ · BUTTON x2
+ · LED x2
+ · WIFI x0
+ · BT x0
+ · AUDIO x1
+*/
+
+#ifndef CONFIG_BOARD_UART
+#define CONFIG_BOARD_UART 1
+#endif
+
+#ifndef CONFIG_BOARD_GPIO
+#define CONFIG_BOARD_GPIO 0
+#endif
+
+#ifndef CONFIG_BOARD_PWM
+#define CONFIG_BOARD_PWM 0
+#endif
+
+#ifndef CONFIG_BOARD_ADC
+#define CONFIG_BOARD_ADC 0
+#endif
+
+#ifndef CONFIG_BOARD_BUTTON
+#define CONFIG_BOARD_BUTTON 0
+#endif
+
+#ifndef CONFIG_BOARD_LED
+#define CONFIG_BOARD_LED 0
+#endif
+
+#ifndef CONFIG_BOARD_WIFI
+#define CONFIG_BOARD_WIFI 0
+#endif
+
+#ifndef CONFIG_BOARD_BT
+#define CONFIG_BOARD_BT 0
+#endif
+
+#ifndef CONFIG_BOARD_AUDIO
+#define CONFIG_BOARD_AUDIO 0
+#endif
+
+#define BOARD_NAME "RISCV_DUMMY"
+
+/* the board pins, can be used as uart, gpio, pwd... */
+#define BOARD_PIN0 (0)
+#define BOARD_PIN1 (1)
+#define BOARD_PIN2 (2)
+#define BOARD_PIN3 (3)
+#define BOARD_PIN4 (4)
+#define BOARD_PIN5 (5)
+#define BOARD_PIN6 (6)
+#define BOARD_PIN7 (7)
+#define BOARD_PIN8 (8)
+#define BOARD_PIN9 (9)
+#define BOARD_PIN10 (10)
+#define BOARD_PIN11 (11)
+#define BOARD_PIN12 (12)
+//...
+
+#if defined(CONFIG_BOARD_UART) && CONFIG_BOARD_UART
+// UART
+
+/*
+ The total supported uart numbers on this board, 0 means No uart support.
+ the BOARD_UART_XXX, x in range of (0, BOARD_UART_NUM - 1)
+*/
+#ifndef BOARD_UART_NUM
+#define BOARD_UART_NUM (1)
+#endif
+
+#if defined(BOARD_UART_NUM) && BOARD_UART_NUM > 0
+/* the board uart0 tx pin */
+#define BOARD_UART0_TX_PIN (BOARD_PIN0)
+/* the borad uart0 rx pin */
+#define BOARD_UART0_RX_PIN (BOARD_PIN1)
+/* The real UART port reference to board logic port 0 */
+#define BOARD_UART0_IDX (0)
+/* The default baudrate for uart0 */
+#define BOARD_UART0_BAUD (115200)
+
+//#define BOARD_UART1_IDX (1)
+//#define BOARD_UART1_BAUD (115200)
+// ...
+#endif // defined(BOARD_UART_NUM) && BOARD_UART_NUM > 0
+
+#endif // defined(CONFIG_BOARD_UART) && CONFIG_BOARD_UART
+
+#if defined(CONFIG_BOARD_GPIO) && CONFIG_BOARD_GPIO
+// GPIO
+/*
+ The total supported GPIO Pin numbers on this board, 0 meas No uart support.
+ the BOARD_GPIO_PIN, x in rang of (0, BOARD_GPIO_PIN_NUM - 1)
+*/
+#ifndef BOARD_GPIO_PIN_NUM
+#define BOARD_GPIO_PIN_NUM (2)
+#endif
+
+#if defined(BOARD_GPIO_PIN_NUM) && BOARD_GPIO_PIN_NUM > 0
+/* The real gpio reference to board logic gpio pin */
+#define BOARD_GPIO_PIN0 (BOARD_PIN2)
+#define BOARD_GPIO_PIN1 (BOARD_PIN3)
+//#define BOARD_GPIO_PIN2 (x)
+//#define BOARD_GPIO_PIN3 (x)
+#endif // defined(BOARD_GPIO_PIN_NUM) && BOARD_GPIO_PIN_NUM > 0
+#endif // defined(CONFIG_BOARD_GPIO) && CONFIG_BOARD_GPIO
+
+#if defined(CONFIG_BOARD_PWM) && CONFIG_BOARD_PWM
+// PWM
+/* the board supported pwm channels */
+#ifndef BOARD_PWM_NUM
+#define BOARD_PWM_NUM (2)
+#endif
+
+#if defined(BOARD_PWM_NUM) && BOARD_PWM_NUM > 0
+/* the board pwm pin */
+#define BOARD_PWM0_PIN (BOARD_PIN4)
+/* The real pwm channel reference to board logic pwm channel */
+#define BOARD_PWM0_CH (0)
+
+#define BOARD_PWM1_PIN (BOARD_PIN5)
+#define BOARD_PWM1_CH (1)
+#endif // defined(BOARD_PWM_NUM) && BOARD_PWM_NUM > 0
+#endif // defined(CONFIG_BOARD_PWM) && CONFIG_BOARD_PWM
+
+#if defined(CONFIG_BOARD_ADC) && CONFIG_BOARD_ADC > 0
+// ADC
+/* the board supported adc channels */
+#ifndef BOARD_ADC_NUM
+#define BOARD_ADC_NUM (1)
+#endif
+
+#if defined(BOARD_ADC_NUM) && BOARD_ADC_NUM > 0
+/* the board adc pin */
+#define BOARD_ADC0_PIN (BOARD_PIN6)
+/* The real adc channel reference to board logic adc channel */
+#define BOARD_ADC0_CH (0)
+#endif // defined(BOARD_ADC_NUM) && BOARD_ADC_NUM > 0
+#endif // defined(CONFIG_BOARD_ADC) && CONFIG_BOARD_ADC > 0
+
+#if defined(CONFIG_BOARD_BUTTON) && CONFIG_BOARD_BUTTON > 0
+// BUTTON
+#ifndef BOARD_BUTTON_NUM
+/*
+ the board supported buttons, include gpio button and adc button,
+ BOARD_BUTTON_NUM = BOARD_BUTTON_GPIO_NUM + BOARD_BUTTON_ADC_NUM.
+
+*/
+#define BOARD_BUTTON_NUM (4)
+#endif
+
+#if defined(BOARD_BUTTON_NUM) && BOARD_BUTTON_NUM > 0
+
+#define BOARD_BUTTON0_PIN (BOARD_PIN7)
+#define BOARD_BUTTON1_PIN (BOARD_PIN8)
+#define BOARD_BUTTON2_PIN (BOARD_PIN9)
+#define BOARD_BUTTON3_PIN (BOARD_PIN10)
+
+// GPIO BUTTON
+/* the board supported GPIO Buttons */
+#ifndef BOARD_BUTTON_GPIO_NUM
+#define BOARD_BUTTON_GPIO_NUM (2)
+#endif
+
+#if defined(BOARD_BUTTON_GPIO_NUM) && BOARD_BUTTON_GPIO_NUM > 0
+/* the board logic button id, in range of (0, BOARD_BUTTON_GPIO_NUM - 1) */
+#define BOARD_BUTTON0 (0)
+/* for gpio button, define the pin numner. if the gpio pin used as gpio button, it shoudn't reference as BOARD_GPIO_PINx
+ */
+#define BOARD_BUTTON0_GPIO_PIN (BOARD_BUTTON0_PIN)
+
+#define BOARD_BUTTON1 (1)
+#define BOARD_BUTTON1_GPIO_PIN (BOARD_BUTTON1_PIN)
+#endif // defined(BOARD_BUTTON_GPIO_NUM) && BOARD_BUTTON_GPIO_NUM > 0
+
+// ADC BUTTON
+/* the board supported adc Buttons */
+#ifndef BOARD_BUTTON_ADC_NUM
+#define BOARD_BUTTON_ADC_NUM (2)
+#endif
+
+#if defined(BOARD_BUTTON_ADC_NUM) && BOARD_BUTTON_ADC_NUM > 0
+/* the board logic adc button id, in range of (BOARD_BUTTON_GPIO_NUM, BOARD_BUTTON_NUM - 1), if not suuport GPIO Button,
+ * BOARD_BUTTON_GPIO_NUM should be 0 */
+#define BOARD_BUTTON2 (BOARD_BUTTON_GPIO_NUM + 0)
+#define BOARD_BUTTON2_ADC_PIN (BOARD_BUTTON2_PIN)
+/* the adc channel used for button2, if the adc channel used as adc button, it shoudn't reference as BOARD_ADCx_CH*/
+#define BOARD_BUTTON2_ADC_CH (1)
+/* the adc device name */
+#define BOARD_BUTTON2_ADC_NAME "adc1"
+/* adc voltage reference */
+#define BOARD_BUTTON2_ADC_REF (100)
+/* adc voltage range */
+#define BOARD_BUTTON2_ADC_RANG (500)
+
+#define BOARD_BUTTON3 (BOARD_BUTTON_GPIO_NUM + 1)
+#define BOARD_BUTTON3_ADC_PIN (BOARD_BUTTON3_PIN)
+#define BOARD_BUTTON3_ADC_CH (1)
+#define BOARD_BUTTON3_ADC_NAME "adc1"
+#define BOARD_BUTTON3_ADC_REF (600)
+#define BOARD_BUTTON3_ADC_RANG (500)
+
+//#define BOARD_ADC_BUTTON2 (2)
+//#define BOARD_ADC_BUTTON2_CH (1)
+//#define BOARD_ADC_BUTTON2_NAME "adc1"
+//#define BOARD_ADC_BUTTON2_REF xxx
+//#define BOARD_ADC_BUTTON2_RANG xxx
+#endif // defined(BOARD_BUTTON_ADC_NUM) && BOARD_BUTTON_ADC_NUM > 0
+
+#endif // defined(BOARD_BUTTON_NUM) && BOARD_BUTTON_NUM > 0
+
+#endif // defined(BOARD_BUTTON_NUM) && BOARD_BUTTON_NUM > 0
+
+#if defined(CONFIG_BOARD_LED) && CONFIG_BOARD_LED > 0
+// LED
+/* the board supported leds */
+#ifndef BOARD_LED_NUM
+#define BOARD_LED_NUM (2)
+#endif
+
+#define BOARD_LED0_PIN BOARD_PIN11
+#define BOARD_LED1_PIN BOARD_PIN12
+
+// PWM LED
+/* the board supported pwm leds */
+#ifndef BOARD_LED_PWM_NUM
+#define BOARD_LED_PWM_NUM (1)
+#endif
+
+#if defined(BOARD_LED_PWM_NUM) && BOARD_LED_PWM_NUM > 0
+#define BOARD_LED0_PWM_PIN (BOARD_LED0_PIN)
+/* the pwm channel used for led0, if the pwm channel used as led0, it shoudn't reference as BOARD_PWMx_CH */
+#define BOARD_LED0_PWM_CH (0)
+#endif // defined(BOARD_LED_PWM_NUM) && BOARD_LED_PWM_NUM > 0
+
+// GPIO LED
+#ifndef BOARD_LED_GPIO_NUM
+#define BOARD_LED_GPIO_NUM (1)
+#endif
+
+#if defined(BOARD_LED_GPIO_NUM) && BOARD_LED_GPIO_NUM > 0
+/* the gpio pin used for led0, if the gpio pin used as led, it shoudn't reference as BOARD_GPIO_PINx */
+#define BOARD_LED1_GPIO_PIN (BOARD_LED1_PIN)
+#endif // defined(BOARD_LED_GPIO_NUM) && BOARD_LED_GPIO_NUM > 0
+#endif // defined(CONFIG_BOARD_LED) && CONFIG_BOARD_LED > 0
+
+#if defined(CONFIG_BOARD_BT) && CONFIG_BOARD_BT > 0
+// BT
+/* the board support bluetooth */
+#ifndef BOARD_BT_SUPPORT
+#define BOARD_BT_SUPPORT 1
+#endif
+#endif // defined(CONFIG_BOARD_BT) && CONFIG_BOARD_BT > 0
+
+#if defined(CONFIG_BOARD_WIFI) && CONFIG_BOARD_WIFI > 0
+// WIFI
+/* the board support wifi */
+#ifndef BOARD_WIFI_SUPPORT
+#define BOARD_WIFI_SUPPORT 1
+#endif
+#endif // defined(CONFIG_BOARD_WIFI) && CONFIG_BOARD_WIFI > 0
+
+#if defined(CONFIG_BOARD_AUDIO) && CONFIG_BOARD_AUDIO > 0
+// Audio
+/* the board support audio */
+#ifndef BOARD_AUDIO_SUPPORT
+#define BOARD_AUDIO_SUPPORT 1
+#endif
+#endif // defined(CONFIG_BOARD_AUDIO) && CONFIG_BOARD_AUDIO > 0
+
+/****************************************************************************/
+// Common solutions defines
+
+// Console config, Almost all solutions and demos use these.
+#ifndef CONSOLE_UART_IDX
+#define CONSOLE_UART_IDX (BOARD_UART0_IDX)
+#endif
+
+#ifndef CONFIG_CLI_USART_BAUD
+#define CONFIG_CLI_USART_BAUD (BOARD_UART0_BAUD)
+#endif
+
+#ifndef CONFIG_CONSOLE_UART_BUFSIZE
+#define CONFIG_CONSOLE_UART_BUFSIZE (128)
+#endif
+
+/****************************************************************************/
+// Commom test demos defines
+
+// i2c
+#define EXAMPLE_IIC_IDX 0 // 1
+#define EXAMPLE_PIN_IIC_SDA 0 // PC1
+#define EXAMPLE_PIN_IIC_SCL 0 // PC0
+#define EXAMPLE_PIN_IIC_SDA_FUNC 0 // PC1_I2C1_SDA
+#define EXAMPLE_PIN_IIC_SCL_FUNC 0 // PC0_I2C1_SCL
+
+// adc
+#define EXAMPLE_ADC_CH0 0 // PA8
+#define EXAMPLE_ADC_CH0_FUNC 0 // PA8_ADC_A0
+#define EXAMPLE_ADC_CH12 0 // PA26
+#define EXAMPLE_ADC_CH12_FUNC 0 // PA26_ADC_A12
+
+#define EXAMPLE_TIMER_IDX 0
+
+/****************************************************************************/
+// Vendor board defines
+
+/* other board specific defines */
+//#define CUSTOM_BOARD_xxx
+
+/****************************************************************************/
+/**
+ * @brief init the board for default: pin mux, etc.
+ * re-implement if need.
+ * @return
+ */
+void board_init(void);
+
+/**
+ * @brief init the board gpio pin for default: pin mux, etc.
+ * re-implement if need.
+ * @return
+ */
+void board_gpio_pin_init(void);
+
+/**
+ * @brief init the board uart for default: pin mux, etc.
+ * re-implement if need.
+ * @return
+ */
+void board_uart_init(void);
+
+/**
+ * @brief init the board pwm for default: pin mux, etc.
+ * re-implement if need.
+ * @return
+ */
+void board_pwm_init(void);
+
+/**
+ * @brief init the board adc for default: pin mux, etc.
+ * re-implement if need.
+ * @return
+ */
+void board_adc_init(void);
+
+/**
+ * @brief init the board button for default: pin mux, etc.
+ * re-implement if need.
+ * @return
+ */
+void board_button_init(void);
+
+/**
+ * @brief init the board led for default: pin mux, etc.
+ * re-implement if need.
+ * @return
+ */
+void board_led_init(void);
+
+/**
+ * @brief init the board wifi for default: pin mux, etc.
+ * re-implement if need.
+ * @return
+ */
+void board_wifi_init(void);
+
+/**
+ * @brief init the board bt for default: pin mux, etc.
+ * re-implement if need.
+ * @return
+ */
+void board_bt_init(void);
+
+/**
+ * @brief init the board audio for default: pin mux, etc.
+ * re-implement if need.
+ * @return
+ */
+void board_audio_init(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __BOARD_H__ */
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/boards/board_riscv_dummy/include/csi_config.h b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/boards/board_riscv_dummy/include/csi_config.h
new file mode 100644
index 00000000..8e1af58f
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/boards/board_riscv_dummy/include/csi_config.h
@@ -0,0 +1,26 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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 __CSI_CONFIG_H__
+#define __CSI_CONFIG_H__
+
+
+
+
+
+#endif /* __CSI_CONFIG_H__ */
\ No newline at end of file
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/boards/board_riscv_dummy/src/board_init.c b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/boards/board_riscv_dummy/src/board_init.c
new file mode 100644
index 00000000..b994f6ce
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/boards/board_riscv_dummy/src/board_init.c
@@ -0,0 +1,83 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+#include
+#include
+#include
+
+void board_init(void)
+{
+ /* some board preconfig */
+ // board_xxx();
+
+#if defined(BOARD_GPIO_PIN_NUM) && BOARD_GPIO_PIN_NUM > 0
+ board_gpio_pin_init();
+#endif
+
+#if defined(BOARD_UART_NUM) && BOARD_UART_NUM > 0
+#if !defined(RT_DEBUG_INIT) || !RT_DEBUG_INIT
+ board_uart_init();
+#endif
+#endif
+
+#if defined(BOARD_PWM_NUM) && BOARD_PWM_NUM > 0
+ board_pwm_init();
+#endif
+
+#if defined(BOARD_ADC_NUM) && BOARD_ADC_NUM > 0
+ board_adc_init();
+#endif
+
+#if defined(BOARD_BUTTON_NUM) && BOARD_BUTTON_NUM > 0
+ board_button_init();
+#endif
+
+#if defined(BOARD_LED_NUM) && BOARD_LED_NUM > 0
+ board_led_init();
+#endif
+
+#if defined(BOARD_WIFI_SUPPORT) && BOARD_WIFI_SUPPORT > 0
+ board_wifi_init();
+#endif
+
+#if defined(BOARD_BT_SUPPORT) && BOARD_BT_SUPPORT > 0
+ board_bt_init();
+#endif
+
+#if defined(BOARD_AUDIO_SUPPORT) && BOARD_AUDIO_SUPPORT > 0
+ board_audio_init();
+#endif
+}
+
+#ifdef CONFIG_KERNEL_THREADX
+#include
+
+extern unsigned long g_heap_start;
+extern unsigned long g_heap_end;
+
+TX_BYTE_POOL tx_byte_pool_0;
+UCHAR *tx_memory_area;
+
+void tx_mem_pool_init(void)
+{
+ ULONG pool_size = g_heap_end - g_heap_start;
+ tx_memory_area = (UCHAR *)g_heap_start;
+
+ tx_byte_pool_create(&tx_byte_pool_0, "byte pool sys 0", tx_memory_area, pool_size);
+}
+#endif
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/boards/board_riscv_dummy/src/uart/board_uart.c b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/boards/board_riscv_dummy/src/uart/board_uart.c
new file mode 100644
index 00000000..315e3aed
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/boards/board_riscv_dummy/src/uart/board_uart.c
@@ -0,0 +1,45 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+#include
+#include
+#include
+#if CONFIG_DEVICES_RVM_HAL
+#include
+#else
+#include
+#endif
+
+#if CONFIG_DEVICES_RVM_HAL
+void board_uart_init(void)
+{
+ rvm_uart_drv_register(0);
+}
+#else
+__attribute__((weak)) csi_uart_t g_console_handle;
+
+void board_uart_init(void)
+{
+ /* init the console */
+ csi_uart_init(&g_console_handle, CONSOLE_UART_IDX);
+
+ /* config the UART */
+ csi_uart_baud(&g_console_handle, CONFIG_CLI_USART_BAUD);
+ csi_uart_format(&g_console_handle, UART_DATA_BITS_8, UART_PARITY_NONE, UART_STOP_BITS_1);
+}
+#endif
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/build_libthreadx.sh b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/build_libthreadx.sh
new file mode 100755
index 00000000..ff9bb930
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/build_libthreadx.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+pushd ../../../../../
+rm -rf build
+cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE=ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/xuantie_e906_gnu.cmake .
+cmake --build ./build/
+popd
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/build_threadx_sample.sh b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/build_threadx_sample.sh
new file mode 100755
index 00000000..ec91e36a
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/build_threadx_sample.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+bash build_libthreadx.sh
+
+rm -rf build
+cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE=xuantie_e906_gnu.cmake .
+cmake --build ./build/
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/gcc_flash_smartl.ld b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/gcc_flash_smartl.ld
new file mode 100644
index 00000000..19fac7e4
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/gcc_flash_smartl.ld
@@ -0,0 +1,177 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+/******************************************************************************
+ * @file gcc_csky.ld
+ * @brief csky linker file
+ * @version V1.0
+ * @date 02. June 2017
+ ******************************************************************************/
+MEMORY
+{
+ ISRAM : ORIGIN = 0x00000000 , LENGTH = 0x30000 /* ISRAM 192KB*/
+ DSRAM : ORIGIN = 0x20000000 , LENGTH = 0xC0000 /* DSRAM 768KB*/
+ SRAM : ORIGIN = 0x60000000 , LENGTH = 0x20000 /* SRAM 128KB, no cacheable*/
+}
+
+__min_heap_size = 0x200;
+PROVIDE (__ram_end = 0x200C0000);
+PROVIDE (__heap_end = __ram_end);
+
+REGION_ALIAS("REGION_TEXT", ISRAM);
+REGION_ALIAS("REGION_RODATA", ISRAM);
+REGION_ALIAS("REGION_DATA", DSRAM);
+REGION_ALIAS("REGION_BSS", DSRAM);
+
+ENTRY(Reset_Handler)
+SECTIONS
+{
+ .text : {
+ . = ALIGN(0x4) ;
+ __stext = . ;
+ KEEP(*startup.o(*.text))
+ KEEP(*startup.o(*.vectors))
+ KEEP(*vectors.o(*.text))
+ KEEP(*whetstone.o(*.text))
+ KEEP(*startup.S.obj(*.text))
+ KEEP(*startup.S.obj(*.vectors))
+ KEEP(*vectors.S.obj(*.text))
+ KEEP(*whetstone.c.obj(*.text))
+ KEEP(*(.text.entry))
+ *(.text*)
+ *(.gnu.warning)
+ *(.stub)
+ *(.gnu.linkonce.t*)
+ *(.glue_7t)
+ *(.glue_7)
+ *(.jcr)
+ KEEP (*(.init))
+ KEEP (*(.fini))
+ . = ALIGN (0x4) ;
+ PROVIDE(__ctbp = .);
+ *(.call_table_data)
+ *(.call_table_text)
+ . = ALIGN(0x10) ;
+ __etext = . ;
+ } > REGION_TEXT
+ .eh_frame_hdr : {
+ *(.eh_frame_hdr)
+ } > REGION_TEXT
+ .eh_frame : ONLY_IF_RO {
+ KEEP (*(.eh_frame))
+ } > REGION_TEXT
+ .rodata : {
+ . = ALIGN(0x4) ;
+ __srodata = .;
+ *(.rdata)
+ *(.rdata*)
+ *(.rdata1)
+ *(.rdata.*)
+ *(.rodata*)
+ *(.srodata*)
+ . = ALIGN(0x4) ;
+ __init_array_start = .;
+ __ctors_start__ = .;
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array))
+ __init_array_end = .;
+ __ctors_end__ = .;
+
+ __fini_array_start = .;
+ __dtors_start__ = .;
+ KEEP (*(SORT(.fini_array.*)))
+ KEEP (*(.fini_array))
+ __fini_array_end = .;
+ __dtors_end__ = .;
+ . = ALIGN(0x4) ;
+
+ __ctor_start__ = .;
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*(.ctors))
+ __ctor_end__ = .;
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*(.dtors))
+ __dtor_end__ = .;
+ . = ALIGN(0x4) ;
+ __erodata = .;
+ __rodata_end__ = .;
+ } > REGION_RODATA
+ .data : {
+ . = ALIGN(0x4) ;
+ __sdata = . ;
+ __data_start__ = . ;
+ data_start = . ;
+ *(.got.plt)
+ *(.got)
+ *(.gnu.linkonce.r*)
+ *(.data*)
+ *(.gnu.linkonce.d*)
+ *(.gcc_except_table*)
+ __start_init_call = .;
+ *(.initcall.init)
+ __stop_init_call = .;
+ __start_cmd = .;
+ *(.bootloaddata.cmd)
+ . = ALIGN(0x4) ;
+ __stop_cmd = .;
+ __global_pointer$ = .;
+ *(.sdata)
+ *(.sdata.*)
+ *(.sdata2.*)
+ *(.gnu.linkonce.s.*)
+ *(__libc_atexit)
+ *(__libc_subinit)
+ *(__libc_subfreeres)
+ *(.note.ABI-tag)
+ . = ALIGN(0x4) ;
+ __edata = .;
+ __data_end__ = .;
+ } > REGION_DATA AT > REGION_RODATA
+ ._ram_code : {
+ . = ALIGN(0x4) ;
+ __ram_code_start__ = .;
+ *(.ram.code*)
+ . = ALIGN(0x4) ;
+ __ram_code_end__ = .;
+ } > REGION_DATA AT > REGION_RODATA
+ .bss : ALIGN(0x20) {
+ __sbss = . ;
+ __bss_start__ = . ;
+ KEEP(*linpack.o(*.bss*))
+ *(.dynsbss)
+ *(.sbss)
+ *(.sbss.*)
+ *(.scommon)
+ *(.dynbss)
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN(0x4) ;
+ __ebss = . ;
+ __bss_end__ = .;
+ __end = . ;
+ end = . ;
+ } > REGION_BSS AT > REGION_BSS
+ ._user_heap (NOLOAD): {
+ . = ALIGN(0x4) ;
+ *(.stack*)
+ . = ALIGN(0x4) ;
+ __heap_start = .;
+ . += __min_heap_size;
+ . = ALIGN(0x4) ;
+ } > REGION_BSS AT > REGION_BSS
+}
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/asm/riscv_asm_macro.h b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/asm/riscv_asm_macro.h
new file mode 100644
index 00000000..456061ca
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/asm/riscv_asm_macro.h
@@ -0,0 +1,538 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+/*
+ * attention: don't modify this file as a suggest
+ * you should copy from chip_riscv_dummy/include/asm/riscv_asm_macro.h and keep it newer
+ * please contact xuantie-rtos os team if have question
+ */
+
+#ifndef __RISCV_ASM_MACRO_H__
+#define __RISCV_ASM_MACRO_H__
+
+
+#include "riscv_csr.h"
+
+.macro RESTORE_xSTATUS
+ /* t0 and t1 are not restored before using */
+ /* now, sp is at the top of the stack (the lowest address)*/
+ li t1, 0
+#if __riscv_matrix || __riscv_xtheadmatrix /* matrix registers */
+#if __riscv_xlen == 64
+ addi t1, t1, (12 + 12)
+#else
+ addi t1, t1, 12
+#endif /*__riscv_xlen */
+ csrr t0, xmlenb
+ slli t0, t0, 3
+ add t1, t1, t0
+#endif /* __riscv_matrix || __riscv_xtheadmatrix */
+
+#ifdef __riscv_vector /* vector registers */
+ csrr t0, vlenb
+ slli t0, t0, 5
+ add t1, t1, t0
+#if __riscv_xlen == 64
+ addi t1, t1, (20+20)
+#else
+ addi t1, t1, 20
+#endif /* __riscv_xlen */
+#endif /* __riscv_vector */
+
+#if __riscv_flen == 64 /* float registers */
+#if __riscv_xlen == 64
+ addi t1, t1, 168
+#else
+ addi t1, t1, 164
+#endif /* __riscv_xlen */
+
+#elif __riscv_flen == 32
+ addi t1, t1, 84
+#endif /* __riscv_flen */
+
+#ifdef __riscv_dsp /* vxsat register, 32-bit cpu only */
+ addi t1, t1, 4
+#endif /* __riscv_dsp */
+
+#if __riscv_xlen == 64 /*general purpose registers*/
+ addi t1, t1, (72 + 72)
+#elif __riscv_xlen == 32
+ addi t1, t1, 72
+#endif
+ add t1, sp, t1
+
+ /* now, t1 is the position of mstatus */
+ load_x t3, (0)(t1)
+ csrw MODE_PREFIX(status), t3
+.endm
+
+.macro SAVE_VECTOR_REGISTERS
+ /* t0,t1 saved before using */
+ /* mstatus->t3 */
+#ifdef __riscv_vector
+#if CONFIG_CHECK_VECTOR_DIRTY
+ /* check if VS filed of MSTATUS is 'dirty' */
+ li t1, SR_VS_DIRTY
+ and t4, t3, t1
+ bne t4, t1, 1f
+#endif /* CONFIG_CHECK_VECTOR_DIRTY */
+
+ /* if dirty, save vector registers */
+#if __riscv_xlen == 64
+ addi sp, sp, -(20+20)
+ csrr t0, vl
+ store_x t0, (0 +0 )(sp)
+ csrr t0, vtype
+ store_x t0, (4 +4 )(sp)
+ csrr t0, vstart
+ store_x t0, (8 +8 )(sp)
+ csrr t0, vxsat
+ store_x t0, (12 +12 )(sp)
+ csrr t0, vxrm
+ store_x t0, (16 +16 )(sp)
+#else
+ addi sp, sp, -20
+ csrr t0, vl
+ store_x t0, (0)(sp)
+ csrr t0, vtype
+ store_x t0, (4)(sp)
+ csrr t0, vstart
+ store_x t0, (8)(sp)
+ csrr t0, vxsat
+ store_x t0, (12)(sp)
+ csrr t0, vxrm
+ store_x t0, (16)(sp)
+#endif /*__riscv_xlen */
+
+ csrr t0, vlenb
+ slli t0, t0, 3
+ slli t1, t0, 2
+ sub sp, sp, t1
+#if (__riscv_v == 7000)
+ vsetvli zero, zero, e8, m8
+ vsb.v v0, (sp)
+ add sp, sp, t0
+ vsb.v v8, (sp)
+ add sp, sp, t0
+ vsb.v v16, (sp)
+ add sp, sp, t0
+ vsb.v v24, (sp)
+#elif (__riscv_v == 1000000)
+ vsetvli zero, zero, e8, m8, ta, ma
+ vs8r.v v0, (sp)
+ add sp, sp, t0
+ vs8r.v v8, (sp)
+ add sp, sp, t0
+ vs8r.v v16, (sp)
+ add sp, sp, t0
+ vs8r.v v24, (sp)
+#endif
+ sub t0, t1, t0
+ sub sp, sp, t0
+#if CONFIG_CHECK_VECTOR_DIRTY
+ j 2f
+1: /* don't need to save vector registers, set sp */
+#if __riscv_xlen == 64
+ addi sp, sp, -(20+20)
+#else
+ addi sp, sp, -20
+#endif
+ csrr t0, vlenb
+ slli t0, t0, 5
+ sub sp, sp, t0
+2:
+#endif /* CONFIG_CHECK_VECTOR_DIRTY */
+#endif /*__riscv_vector*/
+.endm
+
+.macro RESTORE_VECTOR_REGISTERS
+ /* t0,t1,t2 not restored before using, mstatus has been restored before using */
+#ifdef __riscv_vector
+#if CONFIG_CHECK_VECTOR_DIRTY
+ /* check if VS filed of MSTATUS is 'dirty' */
+ li t1, SR_VS_DIRTY
+ and t4, t3, t1
+ bne t4, t1, 1f
+#endif /* CONFIG_CHECK_VECTOR_DIRTY */
+
+ /* get the range of register */
+ csrr t0, vlenb
+ slli t0, t0, 3
+
+ /* save */
+#if (__riscv_v == 7000)
+ vsetvli zero, zero, e8, m8
+ vlb.v v0, (sp)
+ add sp, sp, t0
+ vlb.v v8, (sp)
+ add sp, sp, t0
+ vlb.v v16, (sp)
+ add sp, sp, t0
+ vlb.v v24, (sp)
+ add sp, sp, t0
+#elif (__riscv_v == 1000000)
+ vsetvli zero, zero, e8, m8, ta, ma
+ vl8r.v v0, (sp)
+ add sp, sp, t0
+ vl8r.v v8, (sp)
+ add sp, sp, t0
+ vl8r.v v16, (sp)
+ add sp, sp, t0
+ vl8r.v v24, (sp)
+ add sp, sp, t0
+#endif
+#if __riscv_xlen == 64
+ load_x t0, (0 +0)(sp)
+ load_x t1, (4 +4)(sp)
+ load_x t2, (8 +8)(sp)
+ vsetvl zero, t0, t1
+ csrw vstart, t2
+ load_x t2, (12 +12)(sp)
+ csrw vxsat, t2
+ load_x t2, (16 +16)(sp)
+ csrw vxrm, t2
+ addi sp, sp, (20+20)
+#else
+ load_x t0, (0)(sp)
+ load_x t1, (4)(sp)
+ load_x t2, (8)(sp)
+ vsetvl zero, t0, t1
+ csrw vstart, t2
+ load_x t2, (12)(sp)
+ csrw vxsat, t2
+ load_x t2, (16)(sp)
+ csrw vxrm, t2
+ addi sp, sp, 20
+#endif /*__riscv_xlen */
+#if CONFIG_CHECK_VECTOR_DIRTY
+ j 2f
+1:
+ /* don't restore, move sp only */
+#if __riscv_xlen == 64
+ addi sp, sp, (20+20)
+#else
+ addi sp, sp, (20)
+#endif
+ csrr t0, vlenb
+ slli t0, t0, 5
+ add sp, sp, t0
+2:
+#endif /* CONFIG_CHECK_VECTOR_DIRTY */
+#endif /*__riscv_vector*/
+.endm
+
+
+.macro SAVE_FLOAT_REGISTERS
+ /* t0, t1 saved before using */
+#if __riscv_flen == 64
+#if CONFIG_CHECK_FPU_DIRTY
+ /* check if FS filed of MSTATUS is 'dirty' */
+ li t1, SR_FS_DIRTY
+ and t4, t3, t1
+ bne t4, t1, 1f
+#endif /*CONFIG_CHECK_FPU_DIRTY*/
+
+ /* save */
+#if __riscv_xlen == 64
+ addi sp, sp, -(4+4)
+ frcsr t0
+ store_x t0, (0 +0 )(sp)
+#else
+ addi sp, sp, -4
+ frcsr t0
+ store_x t0, 0(sp)
+#endif /*__riscv_xlen */
+
+ addi sp, sp, -160
+ fstore_x ft0, (0 +0 )(sp)
+ fstore_x ft1, (4 +4 )(sp)
+ fstore_x ft2, (8 +8 )(sp)
+ fstore_x ft3, (12+12)(sp)
+ fstore_x ft4, (16+16)(sp)
+ fstore_x ft5, (20+20)(sp)
+ fstore_x ft6, (24+24)(sp)
+ fstore_x ft7, (28+28)(sp)
+ fstore_x fa0, (32+32)(sp)
+ fstore_x fa1, (36+36)(sp)
+ fstore_x fa2, (40+40)(sp)
+ fstore_x fa3, (44+44)(sp)
+ fstore_x fa4, (48+48)(sp)
+ fstore_x fa5, (52+52)(sp)
+ fstore_x fa6, (56+56)(sp)
+ fstore_x fa7, (60+60)(sp)
+ fstore_x ft8, (64+64)(sp)
+ fstore_x ft9, (68+68)(sp)
+ fstore_x ft10,(72+72)(sp)
+ fstore_x ft11,(76+76)(sp)
+#elif __riscv_flen == 32
+#if CONFIG_CHECK_FPU_DIRTY
+ /* check if FS filed of MSTATUS is 'dirty' */
+ li t1, SR_FS_DIRTY
+ and t4, t3, t1
+ bne t4, t1, 1f
+#endif /* CONFIG_CHECK_FPU_DIRTY */
+
+ addi sp, sp, -4
+ frcsr t0
+ store_x t0, 0(sp)
+
+ addi sp, sp, -80
+ fstore_x ft0, 0(sp)
+ fstore_x ft1, 4(sp)
+ fstore_x ft2, 8(sp)
+ fstore_x ft3, 12(sp)
+ fstore_x ft4, 16(sp)
+ fstore_x ft5, 20(sp)
+ fstore_x ft6, 24(sp)
+ fstore_x ft7, 28(sp)
+ fstore_x fa0, 32(sp)
+ fstore_x fa1, 36(sp)
+ fstore_x fa2, 40(sp)
+ fstore_x fa3, 44(sp)
+ fstore_x fa4, 48(sp)
+ fstore_x fa5, 52(sp)
+ fstore_x fa6, 56(sp)
+ fstore_x fa7, 60(sp)
+ fstore_x ft8, 64(sp)
+ fstore_x ft9, 68(sp)
+ fstore_x ft10,72(sp)
+ fstore_x ft11,76(sp)
+#endif /*__riscv_flen */
+#if CONFIG_CHECK_FPU_DIRTY
+ j 2f
+1:
+ /* don't store, move sp only */
+#if __riscv_flen == 64
+#if __riscv_xlen == 64
+ addi sp, sp, -168
+#else
+ addi sp, sp, -164
+#endif /*__riscv_xlen */
+#elif __riscv_flen == 32
+ addi sp, sp, -84
+#endif /* __riscv_xlen */
+2:
+#endif
+.endm
+
+.macro RESTORE_FLOAT_REGISTERS
+ /* t0 and t1 are not restored before using, mstatus has been restored before using */
+#if __riscv_flen == 64
+#if CONFIG_CHECK_FPU_DIRTY
+ /* check if FS filed of MSTATUS is 'dirty' */
+ li t1, SR_FS_DIRTY
+ and t4, t3, t1
+ bne t4, t1, 1f
+#endif /* CONFIG_CHECK_FPU_DIRTY */
+
+ /* restore */
+ fload_x ft0, (0 +0 )(sp)
+ fload_x ft1, (4 +4 )(sp)
+ fload_x ft2, (8 +8 )(sp)
+ fload_x ft3, (12+12)(sp)
+ fload_x ft4, (16+16)(sp)
+ fload_x ft5, (20+20)(sp)
+ fload_x ft6, (24+24)(sp)
+ fload_x ft7, (28+28)(sp)
+ fload_x fa0, (32+32)(sp)
+ fload_x fa1, (36+36)(sp)
+ fload_x fa2, (40+40)(sp)
+ fload_x fa3, (44+44)(sp)
+ fload_x fa4, (48+48)(sp)
+ fload_x fa5, (52+52)(sp)
+ fload_x fa6, (56+56)(sp)
+ fload_x fa7, (60+60)(sp)
+ fload_x ft8, (64+64)(sp)
+ fload_x ft9, (68+68)(sp)
+ fload_x ft10,(72+72)(sp)
+ fload_x ft11,(76+76)(sp)
+ addi sp, sp, 160
+
+#if __riscv_xlen == 64
+ load_x t0, (0 +0)(sp)
+ fscsr t0
+ addi sp, sp, (4+4)
+#else
+ load_x t0, 0(sp)
+ fscsr t0
+ addi sp, sp, 4
+#endif /*__riscv_xlen */
+#elif __riscv_flen == 32
+#if CONFIG_CHECK_FPU_DIRTY
+ /* check if FS filed of MSTATUS is 'dirty' */
+ li t1, SR_FS_DIRTY
+ and t4, t3, t1
+ bne t4, t1, 1f
+#endif /* CONFIG_CHECK_FPU_DIRTY */
+
+ /* restore */
+ fload_x ft0, 0(sp)
+ fload_x ft1, 4(sp)
+ fload_x ft2, 8(sp)
+ fload_x ft3, 12(sp)
+ fload_x ft4, 16(sp)
+ fload_x ft5, 20(sp)
+ fload_x ft6, 24(sp)
+ fload_x ft7, 28(sp)
+ fload_x fa0, 32(sp)
+ fload_x fa1, 36(sp)
+ fload_x fa2, 40(sp)
+ fload_x fa3, 44(sp)
+ fload_x fa4, 48(sp)
+ fload_x fa5, 52(sp)
+ fload_x fa6, 56(sp)
+ fload_x fa7, 60(sp)
+ fload_x ft8, 64(sp)
+ fload_x ft9, 68(sp)
+ fload_x ft10,72(sp)
+ fload_x ft11,76(sp)
+ addi sp, sp, 80
+
+ load_x t0, 0(sp)
+ fscsr t0
+ addi sp, sp, 4
+#endif /*__riscv_flen */
+#if CONFIG_CHECK_FPU_DIRTY
+ j 2f
+1:
+ /* don't restore, move sp only */
+#if __riscv_flen == 64
+#if __riscv_xlen == 64
+ addi sp, sp, 168
+#elif __riscv_xlen == 32
+ addi sp, sp, 164
+#endif
+#elif __riscv_flen == 32
+ addi sp, sp, 84
+#endif /* __riscv_flen */
+2:
+#endif /* CONFIG_CHECK_FPU_DIRTY */
+.endm
+
+.macro SAVE_MATRIX_REGISTERS
+ /* t0,t1 saved before using */
+
+#if __riscv_matrix || __riscv_xtheadmatrix
+#if CONFIG_CHECK_MATRIX_DIRTY
+ /* check if FS filed of MSTATUS is 'dirty' */
+ li t1, SR_MS_DIRTY
+ and t4, t3, t1
+ bne t4, t1, 1f
+#endif /* CONFIG_CHECK_MATRIX_DIRTY */
+
+ /* store */
+#if __riscv_xlen == 64
+ addi sp, sp, -(12+12)
+ csrr t0, xmrstart
+ store_x t0, (0 +0 )(sp)
+ csrr t0, xmcsr
+ store_x t0, (4 +4 )(sp)
+ csrr t0, xmsize
+ store_x t0, (8 +8 )(sp)
+#else
+ addi sp, sp, -12
+ csrr t0, xmrstart
+ store_x t0, (0)(sp)
+ csrr t0, xmcsr
+ store_x t0, (4)(sp)
+ csrr t0, xmsize
+ store_x t0, (8)(sp)
+#endif /*__riscv_xlen */
+
+ csrr t0, xmlenb
+ slli t1, t0, 3
+ sub sp, sp, t1
+ csrw xmrstart, x0
+ mst8mb m0, (sp)
+#if CONFIG_CHECK_MATRIX_DIRTY
+ j 2f
+1:
+ /* don't save, move sp only */
+ csrr t0, xmlenb
+ slli t1, t0, 3
+ sub sp, sp, t1
+#if __riscv_xlen == 64
+ addi sp, sp, -24
+#else
+ addi sp, sp, -12
+#endif
+2:
+#endif /* CONFIG_CHECK_MATRIX_DIRTY */
+#endif /* __riscv_matrix || __riscv_xtheadmatrix */
+.endm
+
+.macro RESTORE_MATRIX_REGISTERS
+ /* t0 and t1 are not restored before using, mstatus has been restored before using */
+
+#if __riscv_matrix || __riscv_xtheadmatrix
+#if CONFIG_CHECK_MATRIX_DIRTY
+ /* check if FS filed of MSTATUS is 'dirty' */
+ li t1, SR_MS_DIRTY
+ and t4, t3, t1
+ bne t4, t1, 1f
+#endif /* CONFIG_CHECK_MATRIX_DIRTY */
+
+ /* restore */
+ csrr t0, xmlenb
+ slli t1, t0, 3
+ csrw xmrstart, x0
+ mld8mb m0, (sp)
+ add sp, sp, t1
+#if __riscv_xlen == 64
+ load_x t0, (0 + 0)(sp)
+ csrw xmrstart, t0
+ load_x t0, (4 + 4)(sp)
+ csrw xmcsr, t0
+ load_x t0, (8 + 8)(sp)
+ csrw xmsize, t0
+ addi sp, sp, (12+12)
+#else
+ load_x t0, (0)(sp)
+ csrw xmrstart, t0
+ load_x t0, (4)(sp)
+ csrw xmcsr, t0
+ load_x t0, (8)(sp)
+ csrw xmsize, t0
+ addi sp, sp, 12
+#endif /*__riscv_xlen */
+#if CONFIG_CHECK_MATRIX_DIRTY
+ j 2f
+1:
+ /* don't restore, move sp only */
+ csrr t0, xmlenb
+ slli t1, t0, 3
+ add sp, sp, t1
+#if __riscv_xlen == 64
+ addi sp, sp, 24
+#else
+ addi sp, sp, 12
+#endif
+2:
+#endif /* CONFIG_CHECK_MATRIX_DIRTY */
+#endif /* __riscv_matrix || __riscv_xtheadmatrix */
+.endm
+
+.macro RESTORE_SYS_GP
+ .option push
+ .option norelax
+ la gp, __global_pointer$
+ .option pop
+.endm
+
+#endif /* __RISCV_ASM_MACRO_H__ */
+
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/asm/riscv_csr.h b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/asm/riscv_csr.h
new file mode 100644
index 00000000..22e36ab4
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/asm/riscv_csr.h
@@ -0,0 +1,191 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+/*
+ * attention: don't modify this file as a suggest
+ * you should copy from chip_riscv_dummy/include/asm/riscv_csr.h and keep it newer
+ * please contact xuantie-rtos os team if have question
+ */
+
+#ifndef __RISCV_CSR_H__
+#define __RISCV_CSR_H__
+
+#if __riscv_xlen == 64
+ #define store_x sd
+ #define load_x ld
+ #define portWORD_SIZE 8
+#elif __riscv_xlen == 32
+ #define store_x sw
+ #define load_x lw
+ #define portWORD_SIZE 4
+#else
+ #error Assembler did not define __riscv_xlen
+#endif
+
+#if __riscv_flen == 64
+ #define fstore_x fsd
+ #define fload_x fld
+ #define portFPU_REG_SIZE 8
+#elif __riscv_flen == 32
+ #define fstore_x fsw
+ #define fload_x flw
+ #define portFPU_REG_SIZE 4
+#endif
+
+#if CONFIG_RISCV_SMODE
+#define MODE_PREFIX(suffix) s##suffix
+#else
+#define MODE_PREFIX(suffix) m##suffix
+#endif
+
+/* Status register flags */
+#define SR_SIE 0x00000002UL /* Supervisor Interrupt Enable */
+#define SR_MIE 0x00000008UL /* Machine Interrupt Enable */
+#define SR_SPIE 0x00000020UL /* Previous Supervisor IE */
+#define SR_MPIE 0x00000080UL /* Previous Machine IE */
+#define SR_SPP_U 0x00000000UL /* Previously User mode */
+#define SR_SPP_S 0x00000100UL /* Previously Supervisor mode */
+#define SR_MPP_U 0x00000000UL /* Previously User mode */
+#define SR_MPP_S 0x00000800UL /* Previously Supervisor mode */
+#define SR_MPP_M 0x00001800UL /* Previously Machine mode */
+#define SR_SUM 0x00040000UL /* Supervisor User Memory Access */
+
+#define SR_FS 0x00006000UL /* Floating-point Status */
+#define SR_FS_OFF 0x00000000UL
+#define SR_FS_INITIAL 0x00002000UL
+#define SR_FS_CLEAN 0x00004000UL
+#define SR_FS_DIRTY 0x00006000UL
+
+#if CONFIG_CPU_XUANTIE_C906 || CONFIG_CPU_XUANTIE_C906FD || CONFIG_CPU_XUANTIE_C906FDV \
+ || CONFIG_CPU_XUANTIE_R920 \
+ || CONFIG_CPU_XUANTIE_C920
+#define SR_VS 0x01800000
+#define SR_VS_OFF 0x00000000
+#define SR_VS_INITIAL 0x00800000
+#define SR_VS_CLEAN 0x01000000
+#define SR_VS_DIRTY 0x01800000
+#else
+#define SR_VS 0x00000600
+#define SR_VS_OFF 0x00000000
+#define SR_VS_INITIAL 0x00000200
+#define SR_VS_CLEAN 0x00000400
+#define SR_VS_DIRTY 0x00000600
+#endif
+
+#if __riscv_matrix || __riscv_xtheadmatrix
+#define SR_MS 0x06000000
+#define SR_MS_OFF 0x00000000
+#define SR_MS_INITIAL 0x02000000
+#define SR_MS_CLEAN 0x04000000
+#define SR_MS_DIRTY 0x06000000
+#endif
+
+/* Interrupt-enable Registers */
+#define IE_MTIE 0x00000080UL
+#define IE_MEIE 0x00000800UL
+
+/* ===== Trap/Exception Causes ===== */
+#define CAUSE_MISALIGNED_FETCH 0x0
+#define CAUSE_FETCH_ACCESS 0x1
+#define CAUSE_ILLEGAL_INSTRUCTION 0x2
+#define CAUSE_BREAKPOINT 0x3
+#define CAUSE_MISALIGNED_LOAD 0x4
+#define CAUSE_LOAD_ACCESS 0x5
+#define CAUSE_MISALIGNED_STORE 0x6
+#define CAUSE_STORE_ACCESS 0x7
+#define CAUSE_USER_ECALL 0x8
+#define CAUSE_SUPERVISOR_ECALL 0x9
+#define CAUSE_VIRTUAL_SUPERVISOR_ECALL 0xa
+#define CAUSE_MACHINE_ECALL 0xb
+#define CAUSE_FETCH_PAGE_FAULT 0xc
+#define CAUSE_LOAD_PAGE_FAULT 0xd
+#define CAUSE_STORE_PAGE_FAULT 0xf
+
+#define PRV_U 0
+#define PRV_S 1
+#define PRV_M 3
+
+
+#define MSTATUS_SIE 0x00000002
+#define MSTATUS_MIE 0x00000008
+#define MSTATUS_SPIE_SHIFT 5
+#define MSTATUS_SPIE (1 << MSTATUS_SPIE_SHIFT)
+#define MSTATUS_UBE 0x00000040
+#define MSTATUS_MPIE 0x00000080
+#define MSTATUS_SPP_SHIFT 8
+#define MSTATUS_SPP (1 << MSTATUS_SPP_SHIFT)
+#define MSTATUS_MPP_SHIFT 11
+#define MSTATUS_MPP (3 << MSTATUS_MPP_SHIFT)
+
+#if CONFIG_CPU_XUANTIE_C906 || CONFIG_CPU_XUANTIE_C906FD || CONFIG_CPU_XUANTIE_C906FDV \
+ || CONFIG_CPU_XUANTIE_R910 || CONFIG_CPU_XUANTIE_R920 \
+ || CONFIG_CPU_XUANTIE_C910 || CONFIG_CPU_XUANTIE_C920
+#define MSTATUS_VS_SHIFT 23
+#else
+#define MSTATUS_VS_SHIFT 9
+#endif
+#define MSTATUS_FS_SHIFT 13
+#define MSTATUS_MS_SHIFT 25
+
+#define INSERT_FIELD(val, which, fieldval) (((val) & ~(which)) | ((fieldval) * ((which) & ~((which)-1))))
+
+#if CONFIG_CPU_XUANTIE_C906 || CONFIG_CPU_XUANTIE_C906FD || CONFIG_CPU_XUANTIE_C906FDV \
+ || CONFIG_CPU_XUANTIE_C908 || CONFIG_CPU_XUANTIE_C908V || CONFIG_CPU_XUANTIE_C908I \
+ || CONFIG_CPU_XUANTIE_C908_V2 || CONFIG_CPU_XUANTIE_C908V_V2 || CONFIG_CPU_XUANTIE_C908I_V2 \
+ || CONFIG_CPU_XUANTIE_C908_CP_V2 || CONFIG_CPU_XUANTIE_C908V_CP_V2 || CONFIG_CPU_XUANTIE_C908I_CP_V2 \
+ || CONFIG_CPU_XUANTIE_C908_CP_XT_V2 || CONFIG_CPU_XUANTIE_C908V_CP_XT_V2 || CONFIG_CPU_XUANTIE_C908I_CP_XT_V2 \
+ || CONFIG_CPU_XUANTIE_C908VK_CP_V2 || CONFIG_CPU_XUANTIE_C908VK_CP_XT_V2 \
+ || CONFIG_CPU_XUANTIE_R910 || CONFIG_CPU_XUANTIE_R920 \
+ || CONFIG_CPU_XUANTIE_C910 || CONFIG_CPU_XUANTIE_C920 \
+ || CONFIG_CPU_XUANTIE_XT_C930_CP || CONFIG_CPU_XUANTIE_XT_C930V_CP
+#define ATTR_SO (1ull << 4)
+#define ATTR_CA (1ull << 3)
+#define ATTR_BU (1ull << 2)
+#define ATTR_SH (1ull << 1)
+#define ATTR_SE (1ull << 0)
+
+#define UPPER_ATTRS_SHIFT (59)
+#define UPPER_ATTRS(x) (((x) & 0x1f) << UPPER_ATTRS_SHIFT)
+#else
+#if __riscv_xlen == 32
+#define PTE_PBMT_SHIFT (30)
+#else
+#define PTE_PBMT_SHIFT (61)
+#endif /* end __riscv_xlen */
+#define SVPBMT_PMA ((unsigned long)0x0 << PTE_PBMT_SHIFT)
+#define SVPBMT_NC ((unsigned long)0x1 << PTE_PBMT_SHIFT)
+#define SVPBMT_IO ((unsigned long)0x2 << PTE_PBMT_SHIFT)
+#define SVPBMT_MASK ((unsigned long)0x3 << PTE_PBMT_SHIFT)
+
+#endif
+
+#define DIRTY_FLAG (1 << 6)
+#define ACCESS_FLAG (1 << 5)
+#define GLOBAL_FLAG (1 << 4)
+#define AP_UNPRIV (1 << 3)
+#define AP_X (1 << 2)
+#define AP_W (1 << 1)
+#define AP_R (1 << 0)
+
+#define LOWER_ATTRS_SHIFT 1
+#define LOWER_ATTRS(x) (((x) & 0x1ff) << LOWER_ATTRS_SHIFT)
+
+
+
+#endif /* __RISCV_CSR_H__ */
+
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/drv/dev_tag.h b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/drv/dev_tag.h
new file mode 100644
index 00000000..4e7590c4
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/drv/dev_tag.h
@@ -0,0 +1,104 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+/******************************************************************************
+ * @file drv/dev_tag.h
+ * @brief Header File for DEV TAG Driver
+ * @version V1.0
+ * @date 31. March 2020
+ * @model common
+ ******************************************************************************/
+
+#ifndef _DRV_DEV_TAG_H_
+#define _DRV_DEV_TAG_H_
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ DEV_BLANK_TAG = 0U,
+ DEV_DW_UART_TAG,
+ DEV_DW_AHB_DMA_TAG,
+ DEV_DW_AXI_DMA_TAG,
+ DEV_DW_GPIO_TAG,
+ DEV_DW_IIC_TAG,
+ DEV_DW_QSPI_TAG,
+ DEV_DW_SDMMC_TAG,
+ DEV_DW_SDHCI_TAG,
+ DEV_DW_SPI_TAG,
+ DEV_DW_TIMER_TAG,
+ DEV_DW_WDT_TAG,
+ DEV_WJ_ADC_TAG,
+ DEV_WJ_AES_TAG,
+ DEV_WJ_CODEC_TAG,
+ DEV_WJ_CRC_TAG,
+ DEV_WJ_DMA_TAG,
+ DEV_WJ_EFLASH_TAG,
+ DEV_WJ_EFUSE_TAG,
+ DEV_WJ_ETB_TAG,
+ DEV_WJ_FFT_TAG,
+ DEV_WJ_I2S_TAG,
+ DEV_WJ_MBOX_TAG,
+ DEV_WJ_PADREG_TAG,
+ DEV_WJ_PDM_TAG,
+ DEV_WJ_PINMUX_TAG,
+ DEV_WJ_PMU_TAG,
+ DEV_WJ_PWM_TAG,
+ DEV_WJ_RNG_TAG,
+ DEV_WJ_ROM_TAG,
+ DEV_WJ_RSA_TAG,
+ DEV_WJ_RTC_TAG,
+ DEV_WJ_SASC_TAG,
+ DEV_WJ_SHA_TAG,
+ DEV_WJ_SPDIF_TAG,
+ DEV_WJ_SPIDF_TAG,
+ DEV_WJ_TDM_TAG,
+ DEV_WJ_TIPC_TAG,
+ DEV_WJ_USB_TAG,
+ DEV_WJ_USI_TAG,
+ DEV_WJ_VAD_TAG,
+ DEV_CD_QSPI_TAG,
+ DEV_DCD_ISO7816_TAG,
+ DEV_OSR_RNG_TAG,
+ DEV_QX_RTC_TAG,
+ DEV_RCHBAND_CODEC_TAG,
+ DEV_CMSDK_UART_TAG,
+ DEV_RAMBUS_150B_PKA_TAG,
+ DEV_RAMBUS_150B_TRNG_TAG,
+ DEV_RAMBUS_120SI_TAG,
+ DEV_RAMBUS_120SII_TAG,
+ DEV_RAMBUS_120SIII_TAG,
+ DEV_WJ_AVFS_TAG,
+ DEV_WJ_BMU_TAG,
+ DEV_XT_IOPMP_TAG,
+} csi_dev_tag_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _DRV_TAG_H_ */
+
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/dw_timer_ll.h b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/dw_timer_ll.h
new file mode 100644
index 00000000..cb7bf108
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/dw_timer_ll.h
@@ -0,0 +1,167 @@
+/*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ */
+
+/*******************************************************
+ * @file dw_timer_ll.h
+ * @brief header file for timer ll driver
+ * @version V1.0
+ * @date 9. April 2020
+ * ******************************************************/
+
+#ifndef _DW_TIMER_LL_H_
+#define _DW_TIMER_LL_H_
+
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*! Timer1 Control Reg, offset: 0x08 */
+#define DW_TIMER_CTL_ENABLE_SEL_Pos (0U)
+#define DW_TIMER_CTL_ENABLE_SEL_Msk (0x1U << DW_TIMER_CTL_ENABLE_SEL_Pos)
+#define DW_TIMER_CTL_ENABLE_SEL_EN DW_TIMER_CTL_ENABLE_SEL_Msk
+
+#define DW_TIMER_CTL_MODE_SEL_Pos (1U)
+#define DW_TIMER_CTL_MODE_SEL_Msk (0x1U << DW_TIMER_CTL_MODE_SEL_Pos)
+#define DW_TIMER_CTL_MODE_SEL_EN DW_TIMER_CTL_MODE_SEL_Msk
+
+#define DW_TIMER_CTL_INT_MASK_Pos (2U)
+#define DW_TIMER_CTL_INT_MASK_Msk (0x1U << DW_TIMER_CTL_INT_MASK_Pos)
+#define DW_TIMER_CTL_INT_MAKS_EN DW_TIMER_CTL_INT_MASK_Msk
+
+#define DW_TIMER_CTL_HARD_TRIG_Pos (4U)
+#define DW_TIMER_CTL_HARD_TRIG_Msk (0x1U << DW_TIMER_CTL_HARD_TRIG_Pos)
+#define DW_TIMER_CTL_HARD_TRIG_EN DW_TIMER_CTL_HARD_TRIG_Msk
+
+/*! Timer EOI, offset: 0x0c */
+#define DW_TIMER_EOI_REG_Pos (0U)
+#define DW_TIMER_EOI_REG_Msk (0x1U << DW_TIMER_EOI_REG_Pos)
+#define DW_TIMER_EOI_REG_EN DW_TIMER_EOI_REG_Msk
+
+/*! Timer Int Status, offset: 0x10 */
+#define DW_TIMER_INT_STATUS_Pos (0U)
+#define DW_TIMER_INT_STATUS_Msk (0x1U << DW_TIMER_INT_STATUS_Pos)
+#define DW_TIMER_INT_STATUS_EN DW_TIMER_INT_STATUS_Msk
+
+/*! Timers Int Status, offset: 0xa0 */
+#define DW_TIMERS_INT_STATUS_Pos (0U)
+#define DW_TIMERS_INT_STATUS_Msk (0x2U << DW_TIMERS_INT_STATUS_Pos)
+#define DW_TIMERS_INT_STATUS_EN DW_TIMERS_INT_STATUS_Msk
+
+/*! Timers EOI, offset: 0xa4 */
+#define DW_TIMERS_EOI_REG_Pos (0U)
+#define DW_TIMERS_EOI_REG_Msk (0x2U << DW_TIMERS_EOI_REG_Pos)
+#define DW_TIMERS_EOI_REG_EN DW_TIMERS_EOI_REG_Msk
+
+/*! Timers Raw Int Status,offset: 0xa8 */
+#define DW_TIMERS_RAW_INT_STA_Pos (0U)
+#define DW_TIMERS_RAW_INT_STA_Msk (0x2U << DW_TIMERS_RAW_INT_STA_Pos)
+#define DW_TIMERS_RAW_INT_STA_EN DW_TIMERS_RAW_INT_STA_Msk
+
+typedef struct {
+ __IOM uint32_t TLC; /* Offset: 0x000 (R/W) TimerLoadCount */
+ __IM uint32_t TCV; /* Offset: 0x004 (R/ ) TimerCurrentValue */
+ __IOM uint32_t TCR; /* Offset: 0x008 (R/W) TimerControlReg */
+ __IM uint32_t TEOI; /* Offset: 0x00c (R/ ) TimerEOI */
+ __IM uint32_t TIS; /* Offset: 0x010 (R/ ) TimerIntStatus */
+} dw_timer_regs_t;
+
+typedef struct {
+ dw_timer_regs_t timer[8];
+ __IM uint32_t TSIS; /* Offset: 0x0a0 (R/ ) TimersIntStatus */
+ __IM uint32_t TSEOI; /* Offset: 0x0a4 (R/ ) TimersEOI */
+ __IM uint32_t TSRIS; /* Offset: 0x0a8 (R/ ) TimersRawIntStatus */
+} dw_timer_general_regs_t;
+
+static inline uint32_t dw_timer_read_load(dw_timer_regs_t *timer_base)
+{
+ return (timer_base->TLC);
+}
+static inline void dw_timer_write_load(dw_timer_regs_t *timer_base, uint32_t value)
+{
+ timer_base->TLC = value;
+}
+static inline uint32_t dw_timer_get_current(dw_timer_regs_t *timer_base)
+{
+ return (timer_base->TCV);
+}
+static inline void dw_timer_set_enable(dw_timer_regs_t *timer_base)
+{
+ timer_base->TCR |= (DW_TIMER_CTL_ENABLE_SEL_EN);
+}
+static inline void dw_timer_set_disable(dw_timer_regs_t *timer_base)
+{
+ timer_base->TCR &= ~(DW_TIMER_CTL_ENABLE_SEL_EN);
+}
+static inline uint32_t dw_timer_get_enable(dw_timer_regs_t *timer_base)
+{
+ return (((timer_base->TCR) & DW_TIMER_CTL_ENABLE_SEL_EN) ? (uint32_t)1 : (uint32_t)0);
+}
+static inline void dw_timer_set_mode_free(dw_timer_regs_t *timer_base)
+{
+ timer_base->TCR &= ~(DW_TIMER_CTL_MODE_SEL_EN);
+}
+static inline void dw_timer_set_mode_load(dw_timer_regs_t *timer_base)
+{
+ timer_base->TCR |= (DW_TIMER_CTL_MODE_SEL_EN);
+}
+static inline uint32_t dw_timer_get_model(dw_timer_regs_t *timer_base)
+{
+ return (((timer_base->TCR) & DW_TIMER_CTL_MODE_SEL_EN) ? (uint32_t)1 : (uint32_t)0);
+}
+static inline void dw_timer_set_mask(dw_timer_regs_t *timer_base)
+{
+ timer_base->TCR |= (DW_TIMER_CTL_INT_MAKS_EN);
+}
+static inline void dw_timer_set_unmask(dw_timer_regs_t *timer_base)
+{
+ timer_base->TCR &= ~(DW_TIMER_CTL_INT_MAKS_EN);
+}
+static inline uint32_t dw_timer_get_mask(dw_timer_regs_t *timer_base)
+{
+ return (((timer_base->TCR) & DW_TIMER_CTL_INT_MAKS_EN) ? (uint32_t)1 : (uint32_t)0);
+}
+static inline void dw_timer_set_hardtrigger_en(dw_timer_regs_t *timer_base)
+{
+ timer_base->TCR |= (DW_TIMER_CTL_HARD_TRIG_EN);
+}
+static inline void dw_timer_set_hardtrigger_dis(dw_timer_regs_t *timer_base)
+{
+ timer_base->TCR &= ~(DW_TIMER_CTL_HARD_TRIG_EN);
+}
+static inline uint32_t dw_timer_get_hardtrigger(dw_timer_regs_t *timer_base)
+{
+ return (((timer_base->TCR) & DW_TIMER_CTL_HARD_TRIG_EN) ? (uint32_t)1 : (uint32_t)0);
+}
+static inline uint32_t dw_timer_clear_irq(dw_timer_regs_t *timer_base)
+{
+ return (((timer_base->TEOI) & DW_TIMER_EOI_REG_EN) ? (uint32_t)1 : (uint32_t)0);
+}
+static inline uint32_t dw_timer_get_int_status(dw_timer_regs_t *timer_base)
+{
+ return (((timer_base->TIS) & DW_TIMER_INT_STATUS_EN) ? (uint32_t)1 : (uint32_t)0);
+}
+static inline uint32_t dw_timer_general_active_after_mask(dw_timer_general_regs_t *timer_base)
+{
+ return ((timer_base->TSIS) & DW_TIMERS_INT_STATUS_EN);
+}
+static inline uint32_t dw_timer_general_clear_irq(dw_timer_general_regs_t *timer_base)
+{
+ return ((timer_base->TSEOI) & DW_TIMERS_EOI_REG_EN);
+}
+static inline uint32_t dw_timer_general_active_prior_mask(dw_timer_general_regs_t *timer_base)
+{
+ return ((timer_base->TSRIS) & DW_TIMERS_RAW_INT_STA_EN);
+}
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _DW_TIMER_LL_H_ */
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/dw_uart.h b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/dw_uart.h
new file mode 100644
index 00000000..e69de29b
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/dw_uart_ll.h b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/dw_uart_ll.h
new file mode 100644
index 00000000..50a7de0b
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/dw_uart_ll.h
@@ -0,0 +1,423 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+/******************************************************************************
+ * @file dw_uart_ll.h
+ * @brief header file for uart ll driver
+ * @version V1.0
+ * @date 18. December 2024
+ ******************************************************************************/
+
+#ifndef _DW_UART_LL_H_
+#define _DW_UART_LL_H_
+
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! IER, offset: 0x4 */
+#define DW_UART_IER_ERBFI_Pos (0U)
+#define DW_UART_IER_ERBFI_Msk (0x1U << DW_UART_IER_ERBFI_Pos)
+#define DW_UART_IER_ERBFI_EN DW_UART_IER_ERBFI_Msk
+
+#define DW_UART_IER_ETBEI_Pos (1U)
+#define DW_UART_IER_ETBEI_Msk (0x1U << DW_UART_IER_ETBEI_Pos)
+#define DW_UART_IER_ETBEI_EN DW_UART_IER_ETBEI_Msk
+
+#define DW_UART_IER_ELSI_Pos (2U)
+#define DW_UART_IER_ELSI_Msk (0x1U << DW_UART_IER_ELSI_Pos)
+#define DW_UART_IER_ELSI_EN DW_UART_IER_ELSI_Msk
+
+#define DW_UART_IER_EDSSI_Pos (3U)
+#define DW_UART_IER_EDSSI_Msk (0x1U << DW_UART_IER_EDSSI_Pos)
+#define DW_UART_IER_EDSSI_EN DW_UART_IER_EDSSI_Msk
+
+/*! IIR, offset: 0x8 */
+#define DW_UART_IIR_IID_Pos (0U)
+#define DW_UART_IIR_IID_Msk (0xFU << DW_UART_IIR_IID_Pos)
+#define DW_UART_IIR_IID_MODEM_STATUS (0x0U)
+#define DW_UART_IIR_IID_NO_INTERRUPT (0x1U)
+#define DW_UART_IIR_IID_THR_EMPTY (0x2U)
+#define DW_UART_IIR_IID_RECV_DATA_AVAIL (0x4U)
+#define DW_UART_IIR_IID_RECV_LINE_STATUS (0x6U)
+#define DW_UART_IIR_IID_BUSY_DETECT (0x7U)
+#define DW_UART_IIR_IID_CHARACTER_TIMEOUT (0xCU)
+
+#define DW_UART_IIR_FIFOSE_Pos (6U)
+#define DW_UART_IIR_FIFOSE_Msk (0x3U << DW_UART_IIR_FIFOSE_Pos)
+#define DW_UART_IIR_FIFOSE_EN DW_UART_IIR_FIFOSE_Msk
+
+/*! FCR, offset: 0x8 */
+#define DW_UART_FCR_FIFOE_Pos (0U)
+#define DW_UART_FCR_FIFOE_Msk (0x1U << DW_UART_FCR_FIFOE_Pos)
+#define DW_UART_FCR_FIFOE_EN DW_UART_FCR_FIFOE_Msk
+
+#define DW_UART_FCR_RFIFOR_Pos (1U)
+#define DW_UART_FCR_RFIFOR_Msk (0x1U << DW_UART_FCR_RFIFOR_Pos)
+#define DW_UART_FCR_RFIFOR_RESET DW_UART_FCR_RFIFOR_Msk
+
+#define DW_UART_FCR_XFIFOR_Pos (2U)
+#define DW_UART_FCR_XFIFOR_Msk (0x1U << DW_UART_FCR_XFIFOR_Pos)
+#define DW_UART_FCR_XFIFOR_RESET DW_UART_FCR_XFIFOR_Msk
+
+#define DW_UART_FCR_TET_Pos (4U)
+#define DW_UART_FCR_TET_Msk (0x3U << DW_UART_FCR_TET_Pos)
+#define DW_UART_FCR_TET_FIFO_EMTPY (0x0U)
+#define DW_UART_FCR_TET_FIFO_2_CHAR (0x1U << DW_UART_FCR_TET_Pos)
+#define DW_UART_FCR_TET_FIFO_1_4_FULL (0x2U << DW_UART_FCR_TET_Pos)
+#define DW_UART_FCR_TET_FIFO_1_2_FULL (0x3U << DW_UART_FCR_TET_Pos)
+
+#define DW_UART_FCR_RT_Pos (6U)
+#define DW_UART_FCR_RT_Msk (0x3U << DW_UART_FCR_RT_Pos)
+#define DW_UART_FCR_RT_FIFO_1_CHAR (0x0U)
+#define DW_UART_FCR_RT_FIFO_1_4_FULL (0x1U << DW_UART_FCR_RT_Pos)
+#define DW_UART_FCR_RT_FIFO_1_2_FULL (0x2U << DW_UART_FCR_RT_Pos)
+#define DW_UART_FCR_RT_FIFO_2_LESS_FULL (0x3U << DW_UART_FCR_RT_Pos)
+
+/*! LCR, offset: 0xC */
+#define DW_UART_LCR_DLS_Pos (0U)
+#define DW_UART_LCR_DLS_Msk (0x3U << DW_UART_LCR_DLS_Pos)
+#define DW_UART_LCR_DLS_5_BITS (0x0U)
+#define DW_UART_LCR_DLS_6_BITS (0x1U << DW_UART_LCR_DLS_Pos)
+#define DW_UART_LCR_DLS_7_BITS (0x2U << DW_UART_LCR_DLS_Pos)
+#define DW_UART_LCR_DLS_8_BITS (0x3U << DW_UART_LCR_DLS_Pos)
+
+#define DW_UART_LCR_STOP_Pos (2U)
+#define DW_UART_LCR_STOP_Msk (0x1U << DW_UART_LCR_STOP_Pos)
+#define DW_UART_LCR_STOP_1_BIT (0x0U)
+#define DW_UART_LCR_STOP_2_BIT (0x1U << DW_UART_LCR_STOP_Pos)
+
+#define DW_UART_LCR_PEN_Pos (3U)
+#define DW_UART_LCR_PEN_Msk (0x1U << DW_UART_LCR_PEN_Pos)
+#define DW_UART_LCR_PEN_EN DW_UART_LCR_PEN_Msk
+
+#define DW_UART_LCR_EPS_Pos (4U)
+#define DW_UART_LCR_EPS_Msk (0x1U << DW_UART_LCR_EPS_Pos)
+#define DW_UART_LCR_EPS_EN DW_UART_LCR_EPS_Msk
+
+#define DW_UART_LCR_BC_Pos (6U)
+#define DW_UART_LCR_BC_Msk (0x1U << DW_UART_LCR_BC_Pos)
+#define DW_UART_LCR_BC_EN DW_UART_LCR_BC_Msk
+
+#define DW_UART_LCR_DLAB_Pos (7U)
+#define DW_UART_LCR_DLAB_Msk (0x1U << DW_UART_LCR_DLAB_Pos)
+#define DW_UART_LCR_DLAB_EN DW_UART_LCR_DLAB_Msk
+
+/*! MCR, offset: 0x10 */
+#define DW_UART_MCR_RTS_Pos (1U)
+#define DW_UART_MCR_RTS_Msk (0x1U << DW_UART_MCR_RTS_Pos)
+#define DW_UART_MCR_RTS_EN DW_UART_MCR_RTS_Msk
+
+#define DW_UART_MCR_LB_Pos (4U)
+#define DW_UART_MCR_LB_Msk (0x1U << DW_UART_MCR_LB_Pos)
+#define DW_UART_MCR_LB_EN DW_UART_MCR_LB_Msk
+
+#define DW_UART_MCR_AFCE_Pos (5U)
+#define DW_UART_MCR_AFCE_Msk (0x1U << DW_UART_MCR_AFCE_Pos)
+#define DW_UART_MCR_AFCE_EN DW_UART_MCR_AFCE_Msk
+
+/*! LSR, offset: 0x14 */
+#define DW_UART_LSR_DR_Pos (0U)
+#define DW_UART_LSR_DR_Msk (0x1U << DW_UART_LSR_DR_Pos)
+#define DW_UART_LSR_DR_READY DW_UART_LSR_DR_Msk
+
+#define DW_UART_LSR_OE_Pos (1U)
+#define DW_UART_LSR_OE_Msk (0x1U << DW_UART_LSR_OE_Pos)
+#define DW_UART_LSR_OE_ERROR DW_UART_LSR_OE_Msk
+
+#define DW_UART_LSR_PE_Pos (2U)
+#define DW_UART_LSR_PE_Msk (0x1U << DW_UART_LSR_PE_Pos)
+#define DW_UART_LSR_PE_ERROR DW_UART_LSR_PE_Msk
+
+#define DW_UART_LSR_FE_Pos (3U)
+#define DW_UART_LSR_FE_Msk (0x1U << DW_UART_LSR_FE_Pos)
+#define DW_UART_LSR_FE_ERROR DW_UART_LSR_FE_Msk
+
+#define DW_UART_LSR_BI_Pos (4U)
+#define DW_UART_LSR_BI_Msk (0x1U << DW_UART_LSR_BI_Pos)
+#define DW_UART_LSR_BI_SET DW_UART_LSR_BI_Msk
+
+#define DW_UART_LSR_THRE_Pos (5U)
+#define DW_UART_LSR_THRE_Msk (0x1U << DW_UART_LSR_THRE_Pos)
+#define DW_UART_LSR_THRE_SET DW_UART_LSR_THRE_Msk
+
+#define DW_UART_LSR_TEMT_Pos (6U)
+#define DW_UART_LSR_TEMT_Msk (0x1U << DW_UART_LSR_TEMT_Pos)
+#define DW_UART_LSR_TEMT_SET DW_UART_LSR_TEMT_Msk
+
+#define DW_UART_LSR_RFE_Pos (7U)
+#define DW_UART_LSR_RFE_Msk (0x1U << DW_UART_LSR_RFE_Pos)
+#define DW_UART_LSR_RFE_ERROR DW_UART_LSR_RFE_Msk
+
+/*! MSR, offset: 0x18 */
+#define DW_UART_MSR_DCTS_Pos (0U)
+#define DW_UART_MSR_DCTS_Msk (0x1U << DW_UART_MSR_DCTS_Pos)
+#define DW_UART_MSR_DCTS_CHANGE DW_UART_MSR_DCTS_Msk
+
+#define DW_UART_MSR_DDSR_Pos (1U)
+#define DW_UART_MSR_DDSR_Msk (0x1U << DW_UART_MSR_DDSR_Pos)
+#define DW_UART_MSR_DDSR_CHANGE DW_UART_MSR_DDSR_Msk
+
+#define DW_UART_MSR_TERI_Pos (2U)
+#define DW_UART_MSR_TERI_Msk (0x1U << DW_UART_MSR_TERI_Pos)
+#define DW_UART_MSR_TERI_CHANGE DW_UART_MSR_TERI_Msk
+
+#define DW_UART_MSR_DDCD_Pos (3U)
+#define DW_UART_MSR_DDCD_Msk (0x1U << DW_UART_MSR_DDCD_Pos)
+#define DW_UART_MSR_DDCD_CHANGE DW_UART_MSR_DDCD_Msk
+
+#define DW_UART_MSR_CTS_Pos (4U)
+#define DW_UART_MSR_CTS_Msk (0x1U << DW_UART_MSR_CTS_Pos)
+#define DW_UART_MSR_CTS_ASSERTED DW_UART_MSR_CTS_Msk
+
+#define DW_UART_MSR_DSR_Pos (5U)
+#define DW_UART_MSR_DSR_Msk (0x1U << DW_UART_MSR_DSR_Pos)
+#define DW_UART_MSR_DSR_ASSERTED DW_UART_MSR_DSR_Msk
+
+#define DW_UART_MSR_RI_Pos (6U)
+#define DW_UART_MSR_RI_Msk (0x1U << DW_UART_MSR_RI_Pos)
+#define DW_UART_MSR_RI_ASSERTED DW_UART_MSR_RI_Msk
+
+#define DW_UART_MSR_DCD_Pos (7U)
+#define DW_UART_MSR_DCD_Msk (0x1U << DW_UART_MSR_DCD_Pos)
+#define DW_UART_MSR_DCD_ASSERTED DW_UART_MSR_DCD_Msk
+
+/*! SCR, offset: 0x1C */
+#define DW_UART_SCR_SCRATCHPAD_Pos (0U)
+#define DW_UART_SCR_SCRATCHPAD_Msk (0xFFU << DW_UART_SCR_SCRATCHPAD_Pos)
+
+/*! USR, offset: 0x7C */
+#define DW_UART_USR_BUSY_Pos (0U)
+#define DW_UART_USR_BUSY_Msk (0x1U << DW_UART_USR_BUSY_Pos)
+#define DW_UART_USR_BUSY_SET DW_UART_USR_BUSY_Msk
+
+#define DW_UART_USR_TFNF_Pos (1U)
+#define DW_UART_USR_TFNF_Msk (0x1U << DW_UART_USR_TFNF_Pos)
+#define DW_UART_USR_TFNF_SET DW_UART_USR_TFNF_Msk
+
+#define DW_UART_USR_TFE_Pos (2U)
+#define DW_UART_USR_TFE_Msk (0x1U << DW_UART_USR_TFE_Pos)
+#define DW_UART_USR_TFE_SET DW_UART_USR_TFE_Msk
+
+#define DW_UART_USR_RFNE_Pos (3U)
+#define DW_UART_USR_RFNE_Msk (0x1U << DW_UART_USR_RFNE_Pos)
+#define DW_UART_USR_RFNE_SET DW_UART_USR_RFNE_Msk
+
+#define DW_UART_USR_RFF_Pos (4U)
+#define DW_UART_USR_RFF_Msk (0x1U << DW_UART_USR_RFF_Pos)
+#define DW_UART_USR_RFF_SET DW_UART_USR_RFF_Msk
+
+/*! TFL, offset: 0x80 */
+#define DW_UART_TFL_TFIFOL_Pos (0U)
+#define DW_UART_TFL_TFIFOL_Msk (0x1FU << DW_UART_TFL_TFIFOL_Pos)
+#define DW_UART_TFL_TFIFOL(n) (nU << DW_UART_TFL_TFIFOL_Pos)
+
+/*! RFL, offset: 0x84 */
+#define DW_UART_RFL_RFIFOL_Pos (0U)
+#define DW_UART_RFL_RFIFOL_Msk (0x1FU << DW_UART_RFL_RFIFOL_Pos)
+#define DW_UART_RFL_RFIFOL(n) (nU << DW_UART_TFL_TFIFOL_Pos)
+
+/*! HTX, offset: 0xA4 */
+#define DW_UART_HTX_HALTTX_Pos (0U)
+#define DW_UART_HTX_HALTTX_Msk (0x1U << DW_UART_HTX_HALTTX_Pos)
+#define DW_UART_HTX_HALTTX_EN DW_UART_HTX_HALTTX_Msk
+
+#define DW_UART_HTX_RX_ETB_FUNC_Pos (6U)
+#define DW_UART_HTX_RX_ETB_FUNC_Msk (0x1U << DW_UART_HTX_RX_ETB_FUNC_Pos)
+#define DW_UART_HTX_RX_ETB_FUNC_EN DW_UART_HTX_RX_ETB_FUNC_Msk
+
+#define DW_UART_HTX_TX_ETB_FUNC_Pos (7U)
+#define DW_UART_HTX_TX_ETB_FUNC_Msk (0x1U << DW_UART_HTX_TX_ETB_FUNC_Pos)
+#define DW_UART_HTX_TX_ETB_FUNC_EN DW_UART_HTX_TX_ETB_FUNC_Msk
+
+/*! DMASA, offset: 0xA8 */
+#define DW_UART_DMASA_DMASACK_Pos (0U)
+#define DW_UART_DMASA_DMASACK_Msk (0x1U << DW_UART_DMASA_DMASACK_Pos)
+#define DW_UART_DMASA_DMASACK_SET DW_UART_DMASA_DMASACK_Msk
+
+/* FIFO CONFIG */
+#define UART_FIFO_INIT_CONFIG (DW_UART_FCR_FIFOE_EN | DW_UART_FCR_RT_FIFO_1_2_FULL|DW_UART_FCR_RFIFOR_RESET|DW_UART_FCR_XFIFOR_RESET)
+
+/*! UART_RATE, offset: 0x3FC */
+#define DW_UART_SUPPORT_RATE 0x10102U
+
+#define UART_BUSY_TIMEOUT 0x70000000U
+
+typedef struct {
+ union {
+ __IM uint32_t RBR; /* Offset: 0x000 (R/ ) Receive buffer register */
+ __OM uint32_t THR; /* Offset: 0x000 ( /W) Transmission hold register */
+ __IOM uint32_t DLL; /* Offset: 0x000 (R/W) Clock frequency division low section register */
+ };
+ union {
+ __IOM uint32_t DLH; /* Offset: 0x004 (R/W) Clock frequency division high section register */
+ __IOM uint32_t IER; /* Offset: 0x004 (R/W) Interrupt enable register */
+ };
+ union {
+ __IM uint32_t IIR; /* Offset: 0x008 (R/ ) Interrupt identification register */
+ __OM uint32_t FCR; /* Offset: 0x008 ( /W) FIFO control register */
+ };
+ __IOM uint32_t LCR; /* Offset: 0x00C (R/W) Line control register */
+ __IOM uint32_t MCR; /* Offset: 0x010 (R/W) Modem control register */
+ __IM uint32_t LSR; /* Offset: 0x014 (R/ ) Line state register */
+ __IM uint32_t MSR; /* Offset: 0x018 (R/ ) Modem state register */
+ uint32_t RESERVED1[21];
+ __IM uint32_t USR; /* Offset: 0x07c (R/ ) UART state register */
+} dw_uart_regs_t;
+
+static inline void dw_uart_enable_recv_irq(dw_uart_regs_t *uart_base)
+{
+ uart_base->IER |= (DW_UART_IER_ERBFI_EN | DW_UART_IER_ELSI_EN);
+}
+
+static inline void dw_uart_disable_recv_irq(dw_uart_regs_t *uart_base)
+{
+ uart_base->IER &= ~(DW_UART_IER_ERBFI_EN | DW_UART_IER_ELSI_EN);
+}
+
+static inline void dw_uart_enable_trans_irq(dw_uart_regs_t *uart_base)
+{
+ uart_base->IER |= DW_UART_IER_ETBEI_EN;
+}
+
+static inline void dw_uart_disable_trans_irq(dw_uart_regs_t *uart_base)
+{
+ uart_base->IER &= ~(DW_UART_IER_ETBEI_EN);
+}
+
+static inline void dw_uart_fifo_init(dw_uart_regs_t *uart_base)
+{
+ /* FIFO enable */
+ uart_base->FCR = UART_FIFO_INIT_CONFIG;
+}
+
+static inline void dw_uart_fifo_enable(dw_uart_regs_t *uart_base)
+{
+ uart_base->FCR |= DW_UART_FCR_FIFOE_EN;
+}
+
+static inline void dw_uart_fifo_disable(dw_uart_regs_t *uart_base)
+{
+ uart_base->FCR &= ~(DW_UART_FCR_FIFOE_EN);
+}
+
+static inline uint32_t dw_uart_putready(dw_uart_regs_t *uart_base)
+{
+ uint32_t status = 0U, ret = 0U;
+
+ status = uart_base->LSR & DW_UART_LSR_THRE_SET;
+
+ if (status != 0U) {
+ ret = 1U;
+ }
+
+ return ret;
+}
+
+static inline uint32_t dw_uart_getready(dw_uart_regs_t *uart_base)
+{
+ uint32_t status = 0U, ret = 0U;
+
+ status = uart_base->LSR & DW_UART_LSR_DR_READY;
+
+ if (status != 0U) {
+ ret = 1U;
+ }
+
+ return ret;
+}
+
+static inline uint32_t dw_uart_get_line_status(dw_uart_regs_t *uart_base)
+{
+ return uart_base->LSR;
+}
+
+static inline void dw_uart_config_stop_bits_1(dw_uart_regs_t *uart_base)
+{
+ uart_base->LCR &= ~(DW_UART_LCR_STOP_Msk);
+}
+
+static inline void dw_uart_config_stop_bits_2(dw_uart_regs_t *uart_base)
+{
+ uart_base->LCR |= DW_UART_LCR_STOP_2_BIT;
+}
+
+static inline void dw_uart_putchar(dw_uart_regs_t *uart_base, uint8_t ch)
+{
+ uart_base->THR = ch;
+}
+
+static inline uint8_t dw_uart_getchar(dw_uart_regs_t *uart_base)
+{
+ return (uint8_t)(uart_base->RBR);
+}
+
+static inline uint32_t dw_uart_get_intr_en_status(dw_uart_regs_t *uart_base)
+{
+ return uart_base->IER;
+}
+
+static inline void dw_uart_set_intr_en_status(dw_uart_regs_t *uart_base, uint32_t status)
+{
+ uart_base->IER = status;
+}
+
+static inline void dw_uart_set_fcr_reg(dw_uart_regs_t *uart_base, uint32_t value)
+{
+ uart_base->FCR = value;
+}
+
+static inline void dw_uart_enable_auto_flow_control(dw_uart_regs_t *uart_base)
+{
+ uart_base->MCR |= DW_UART_MCR_AFCE_EN;
+ uart_base->MCR |= DW_UART_MCR_RTS_EN;
+}
+
+static inline void dw_uart_disable_auto_flow_control(dw_uart_regs_t *uart_base)
+{
+ uart_base->MCR &= ~DW_UART_MCR_AFCE_EN;
+ uart_base->MCR &= ~DW_UART_MCR_RTS_EN;
+}
+
+int32_t dw_uart_wait_timeout(dw_uart_regs_t *uart_base);
+
+int32_t dw_uart_wait_idle(dw_uart_regs_t *uart_base);
+
+int32_t dw_uart_config_baudrate(dw_uart_regs_t *uart_base, uint32_t baud, uint32_t uart_freq);
+
+int32_t dw_uart_config_stop_bits(dw_uart_regs_t *uart_base, uint32_t stop_bits);
+
+int32_t dw_uart_config_parity_none(dw_uart_regs_t *uart_base);
+
+int32_t dw_uart_config_parity_odd(dw_uart_regs_t *uart_base);
+
+int32_t dw_uart_config_parity_even(dw_uart_regs_t *uart_base);
+
+int32_t dw_uart_config_data_bits(dw_uart_regs_t *uart_base, uint32_t data_bits);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _DW_UART_LL_H_ */
+
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/soc.h b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/soc.h
new file mode 100644
index 00000000..e77cb305
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/soc.h
@@ -0,0 +1,409 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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 _SOC_H_
+#define _SOC_H_
+
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef EHS_VALUE
+#define EHS_VALUE 20000000U
+#endif
+
+#ifndef ELS_VALUE
+#define ELS_VALUE 32768U
+#endif
+
+#ifndef IHS_VALUE
+#define IHS_VALUE 20000000U
+#endif
+
+#ifndef ILS_VALUE
+#define ILS_VALUE 32768U
+#endif
+
+#if __riscv_xlen == 32
+#define INVALID_ADDRESS 0xFFFFFFFFU
+#elif __riscv_xlen == 64
+#define INVALID_ADDRESS 0xFFFFFFFFFFFFFFFFULL
+#else
+#error "Unsupported RISC-V XLEN."
+#endif
+
+typedef enum {
+ DW_UART0_RX_DMAN = 0U,
+ DW_UART0_TX_DMAN = 1U,
+ DW_UART1_RX_DMAN = 2U,
+ DW_UART1_TX_DMAN = 3U,
+ MEMORY_DMAN = 4U,
+} dman_type_t;
+
+typedef enum {
+ PA0 = 0U,
+ PA1,
+ PA2,
+ PA3,
+ PA4,
+ PA5,
+ PA6,
+ PA7,
+ PA8,
+ PA9,
+ PA10,
+ PA11,
+ PA12,
+ PA13,
+ PA14,
+ PA15,
+ PA16,
+ PA17,
+ PA18,
+ PA19,
+ PA20,
+ PA21,
+ PA22,
+ PA23,
+ PA24,
+ PA25,
+ PA26,
+ PA27,
+ PA28,
+ PA29,
+ PA30,
+ PA31,
+ PIN_END = 0xFFFFFFFFU
+} pin_name_t;
+
+
+typedef enum {
+ PA0_I2S0_SCLK = 0U,
+ PA0_SPI0_CS = 1U,
+ PA0_UART0_RX = 2U,
+ PA0_PWM_CH0 = 3U,
+ PA1_I2S0_WSCLK = 0U,
+ PA1_SPI0_SCK = 1U,
+ PA1_UART0_TX = 2U,
+ PA1_PWM_CH1 = 3U,
+ PA2_I2S1_SCLK = 0U,
+ PA2_IIC0_SCL = 1U,
+ PA2_SPI1_CS = 2U,
+ PA2_PWM_CH2 = 3U,
+ PA2_ADC_A0 = 7U,
+ PA3_I2S1_WSCLK = 0U,
+ PA3_IIC0_SDA = 1U,
+ PA3_SPI1_SCK = 2U,
+ PA3_PWM_CH3 = 3U,
+ PA3_ADC_A1 = 8U,
+ PA4_I2S0_SDA = 0U,
+ PA4_SPI0_MOSI = 1U,
+ PA4_UART1_CTS = 2U,
+ PA4_PWM_CH4 = 3U,
+ PA4_ADC_A2 = 9U,
+ PA5_I2S1_SDA = 0U,
+ PA5_SPI0_MISO = 1U,
+ PA5_UART1_RTS = 2U,
+ PA5_PWM_CH5 = 3U,
+ PA5_ADC_A3 = 10U,
+ PA6_I2S0_SCLK = 0U,
+ PA6_UART0_TX = 1U,
+ PA6_SPI1_MOSI = 2U,
+ PA6_PWM_CH6 = 3U,
+ PA6_ADC_A4 = 11U,
+ PA7_I2S0_WSCLK = 0U,
+ PA7_PWMR_OUT = 1U,
+ PA7_SPI1_MISO = 2U,
+ PA7_PWM_CH7 = 3U,
+ PA7_ADC_A5 = 12U,
+ PA8_I2S0_SDA = 0U,
+ PA8_IIC0_SCL = 1U,
+ PA8_UART0_RX = 2U,
+ PA8_PWM_CH8 = 3U,
+ PA8_ADC_A6 = 13U,
+ PA9_I2S1_SDA = 0U,
+ PA9_IIC0_SDA = 1U,
+ PA9_PWMR_OUT = 2U,
+ PA9_PWM_CH9 = 3U,
+ PA9_ADC_A7 = 14U,
+ PA10_I2S0_MCLK = 0U,
+ PA10_UART0_TX = 1U,
+ PA10_SPI1_MOSI = 2U,
+ PA10_SPI1_MISO = 3U,
+ PA10_ADC_A8 = 15U,
+ PA15_IIC0_SCL = 0U,
+ PA15_SPI0_CS = 1U,
+ PA15_PWMR_OUT = 2U,
+ PA15_PWM_CH4 = 3U,
+ PA15_ADC_A9 = 20U,
+ PA16_IIC0_SDA = 0U,
+ PA16_SPI0_SCK = 1U,
+ PA16_UART1_TX = 2U,
+ PA16_PWM_CH5 = 3U,
+ PA16_ADC_A10 = 21U,
+ PA17_UART0_RX = 0U,
+ PA17_SPI0_MOSI = 1U,
+ PA17_I2S0_SCLK = 2U,
+ PA17_PWM_CH10 = 3U,
+ PA17_ADC_A11 = 22U,
+ PA18_UART0_TX = 0U,
+ PA18_SPI0_MISO = 1U,
+ PA18_I2S0_WSCLK = 2U,
+ PA18_PWM_CH11 = 3U,
+ PA18_ADC_A12 = 23U,
+ PA19_JTAG_TMS = 0U,
+ PA19_UART1_RX = 1U,
+ PA19_I2S1_SCLK = 2U,
+ PA19_IIC0_SCL = 3U,
+ PA19_ADC_A13 = 24U,
+ PA20_JTAG_TCK = 0U,
+ PA20_UART1_TX = 1U,
+ PA20_I2S1_WSCLK = 2U,
+ PA20_IIC0_SDA = 3U,
+ PA20_ADC_A14 = 25U,
+ PA21_UART0_CTS = 0U,
+ PA21_UART1_CTS = 1U,
+ PA21_I2S0_SDA = 2U,
+ PA21_IIC0_SCL = 3U,
+ PA21_ADC_A15 = 26U,
+ PA22_UART0_RTS = 0U,
+ PA22_UART1_RTS = 1U,
+ PA22_I2S1_SDA = 2U,
+ PA22_IIC0_SDA = 3U,
+ PA23_IIC0_SCL = 0U,
+ PA23_UART0_TX = 1U,
+ PA23_PWM_CH0 = 2U,
+ PA23_SPI0_CS = 3U,
+ PA24_IIC0_SDA = 0U,
+ PA24_UART0_RX = 1U,
+ PA24_PWM_CH1 = 2U,
+ PA24_SPI0_SCK = 3U,
+ PA25_PWMR_OUT = 0U,
+ PA25_UART0_CTS = 1U,
+ PA25_PWM_CH2 = 2U,
+ PA25_SPI0_MOSI = 3U,
+ PA26_I2S1_MCLK = 0U,
+ PA26_UART0_RTS = 1U,
+ PA26_PWM_CH3 = 2U,
+ PA26_SPI0_MISO = 3U,
+ PA27_I2S0_SCLK = 0U,
+ PA27_UART1_RX = 1U,
+ PA27_PWM_CH4 = 2U,
+ PA27_SPI1_CS = 3U,
+ PA28_I2S0_WSCLK = 0U,
+ PA28_UART1_TX = 1U,
+ PA28_PWM_CH5 = 2U,
+ PA28_SPI1_SCK = 3U,
+ PA29_I2S1_SCLK = 0U,
+ PA29_UART1_CTS = 1U,
+ PA29_PWM_CH6 = 2U,
+ PA29_SPI1_MOSI = 3U,
+ PA30_I2S1_WSCLK = 0U,
+ PA30_UART1_RTS = 1U,
+ PA30_PWM_CH7 = 2U,
+ PA30_SPI1_MISO = 3U,
+ PA31_I2S0_SDA = 0U,
+ PA31_PWMR_OUT = 1U,
+ PA31_PWM_CH8 = 2U,
+ PA31_UART0_TX = 3U,
+ PIN_FUNC_GPIO = 4U,
+ PIN_FUNC_END = 0xFFFFFFFFU
+} pin_func_t;
+
+#define CONFIG_IRQ_NUM 64U
+#if CONFIG_INTC_CLIC_PLIC
+#undef CONFIG_IRQ_NUM
+#define CONFIG_IRQ_NUM (64U + PLIC_IRQ_OFFSET)
+#endif
+
+#if CONFIG_INTC_CLIC_APLIC
+#undef CONFIG_IRQ_NUM
+#define CONFIG_IRQ_NUM (64U + APLIC_IRQ_OFFSET)
+#endif
+
+#if CONFIG_INTC_IMSIC_APLIC
+#undef CONFIG_IRQ_NUM
+#define CONFIG_IRQ_NUM (IMSIC_MAX_INTERRUPTS)
+#endif
+
+///< AHB
+#define SPIFLASH_BASE 0x18000000UL
+#define SPIFLASH_SIZE 0x800000U
+#define SRAM_BASE 0x20000000UL
+#define SRAM_SIZE 0x20000U
+
+#if CONFIG_CPU_XUANTIE_E9XX
+
+typedef enum {
+ User_Software_IRQn = 0U, /* User software interrupt */
+ Supervisor_Software_IRQn = 1U, /* Supervisor software interrupt */
+ Machine_Software_IRQn = 3U, /* Machine software interrupt */
+ User_Timer_IRQn = 4U, /* User timer interrupt */
+ Supervisor_Timer_IRQn = 5U, /* Supervisor timer interrupt */
+ CORET_IRQn = 7U, /* Machine timer interrupt */
+ Machine_External_IRQn = 11U, /* Machine external interrupt */
+ DW_UART0_IRQn = 16U,
+ TIM0_IRQn = 18U, /* timer0 Interrupt */
+ TIM1_IRQn = 19U, /* timer1 Interrupt */
+ TIM2_IRQn = 20U, /* timer2 Interrupt */
+ TIM3_IRQn = 21U, /* timer3 Interrupt */
+} irqn_type_t;
+
+#if CONFIG_BOARD_SMARTM_EVB
+#define DW_UART0_BASE 0x180000UL
+#define DW_TIMER0_BASE 0x181000UL
+#define DW_TIMER1_BASE 0x181014UL
+#define DW_TIMER2_BASE 0x181028UL
+#define DW_TIMER3_BASE 0x18103CUL
+
+#else
+
+#define DW_UART0_BASE 0x40015000UL
+#define DW_TIMER0_BASE 0x40011000UL
+#define DW_TIMER0_SIZE 0x14U
+#define DW_TIMER1_BASE (DW_TIMER0_BASE+DW_TIMER0_SIZE)
+#define DW_TIMER1_SIZE DW_TIMER0_SIZE
+#define DW_TIMER2_BASE 0x40011028UL
+#define DW_TIMER2_SIZE 0x14U
+#define DW_TIMER3_BASE (DW_TIMER2_BASE+DW_TIMER2_SIZE)
+#define DW_TIMER3_SIZE DW_TIMER2_SIZE
+#if CONFIG_SUPPORT_NMI_DEMO
+/* fake irq is not work, just for nmi test with smartl fpga(connected TIMER4 to nmi-exception on soc bit of smartl) */
+#define FAKE_IRQ_TIMER4 (-1)
+#define DW_TIMER4_BASE (0x40021000UL)
+#endif
+#endif /* CONFIG_BOARD_SMARTM_EVB */
+
+#else
+
+/* ------------------------- Interrupt Number Definition ------------------------ */
+
+#define Supervisor_Software_IRQn (1U)
+#define Machine_Software_IRQn (3U)
+#define Supervisor_Timer_IRQn (5U)
+#define CORET_IRQn (7U)
+#define Supervisor_External_IRQn (9U)
+#define Machine_External_IRQn (11U)
+#define L1_CACHE_ECC_IRQn (16U)
+
+#if CONFIG_BOARD_XIAOHUI_EVB
+
+#if CONFIG_INTC_CLIC_PLIC
+typedef enum IRQn {
+ L2_CACHE_ECC_IRQn = 1U + PLIC_IRQ_OFFSET, /* l2 cache ecc Interrupt */
+
+ DW_DMA0_IRQn = 17U, /* dma0 Interrupt */
+ DW_UART0_IRQn = 20U + PLIC_IRQ_OFFSET, /* uart Interrupt */
+ TIM0_IRQn = 25U, /* timer0 Interrupt for CLIC*/
+ TIM1_IRQn = 26U, /* timer1 Interrupt for CLIC*/
+ TIM2_IRQn = 27U + PLIC_IRQ_OFFSET, /* timer2 Interrupt */
+ TIM3_IRQn = 28U + PLIC_IRQ_OFFSET, /* timer3 Interrupt */
+ IOPMP0_IRQn = 32U, /* iopmp0 Interrupt */
+ END_IRQn = 1024U + PLIC_IRQ_OFFSET
+} irqn_type_t;
+#elif CONFIG_INTC_CLIC_APLIC
+typedef enum IRQn {
+ L2_CACHE_ECC_IRQn = 1U + APLIC_IRQ_OFFSET, /* l2 cache ecc Interrupt */
+
+ DW_DMA0_IRQn = 17U, /* dma0 Interrupt */
+ DW_UART0_IRQn = 20U + APLIC_IRQ_OFFSET, /* uart Interrupt */
+ TIM0_IRQn = 25U, /* timer0 Interrupt for CLIC*/
+ TIM1_IRQn = 26U, /* timer1 Interrupt for CLIC*/
+ TIM2_IRQn = 27U + APLIC_IRQ_OFFSET, /* timer2 Interrupt */
+ TIM3_IRQn = 28U + APLIC_IRQ_OFFSET, /* timer3 Interrupt */
+ IOPMP0_IRQn = 32U, /* iopmp0 Interrupt */
+ END_IRQn = 1024U + APLIC_IRQ_OFFSET
+} irqn_type_t;
+#else
+/* extern irq number, 1-16 are reserved for inner-cpu */
+typedef enum IRQn {
+ L2_CACHE_ECC_IRQn = 1U, /* l2 cache ecc Interrupt */
+
+ DW_DMA0_IRQn = 17U, /* dma0 Interrupt */
+ DW_UART0_IRQn = 20U, /* uart Interrupt */
+ TIM0_IRQn = 25U, /* timer0 Interrupt */
+ TIM1_IRQn = 26U, /* timer1 Interrupt */
+ TIM2_IRQn = 27U, /* timer2 Interrupt */
+ TIM3_IRQn = 28U, /* timer3 Interrupt */
+ IOPMP0_IRQn = 32U, /* iopmp0 Interrupt */
+} irqn_type_t;
+#endif /* CONFIG_INTC_CLIC_PLIC */
+
+#define DW_UART0_BASE (0x1900d000UL)
+#define DW_TIMER0_BASE (0x19001000UL)
+#define DW_TIMER1_BASE (0x19001014UL)
+#define DW_TIMER2_BASE (0x19001028UL)
+#define DW_TIMER3_BASE (0x1900103CUL)
+#if CONFIG_SUPPORT_NMI_DEMO
+/* fake irq is not work, just for nmi test with smartl fpga(connected TIMER4 to nmi-exception on soc bit of smartl) */
+#define FAKE_IRQ_TIMER4 (-1)
+#define DW_TIMER4_BASE (0x40021000UL)
+#endif
+
+/////////////////////////////////////////////////
+#define DW_DMA0_BASE (0x18000000UL)
+#define XT_IOPMP0_BASE (0x26f00000UL)
+
+#define CONFIG_AXI_DMA_CHANNEL_NUM 8U
+#define CONFIG_AXI_DMA_FIFO_SIZE 0x8U
+#define CONFIG_AXI_DMA_BLK_MAX_SIZE 0x3FFFFFU
+
+// #define CONFIG_AHB_DMA_CHANNEL_NUM 8U
+// #define CONFIG_AHB_DMA_FIFO_SIZE 0x8U
+// #define CONFIG_AHB_DMA_BLK_MAX_SIZE 0xFFFU
+/////////////////////////////////////////////////
+
+#else
+#error "Not support soc!!!"
+#endif /* CONFIG_BOARD_XIAOHUI_EVB */
+
+#endif /* end exx*/
+
+#if CONFIG_INTC_CLIC && CONFIG_INTC_PLIC
+#error "CONFIG_INTC_CLIC and CONFIG_INTC_PLIC cannot coexist"
+#endif
+
+#if CONFIG_INTC_CLIC && CONFIG_INTC_APLIC
+#error "CONFIG_INTC_CLIC and CONFIG_INTC_APLIC cannot coexist"
+#endif
+
+#if CONFIG_INTC_PLIC && CONFIG_INTC_APLIC
+#error "CONFIG_INTC_PLIC and CONFIG_INTC_APLIC cannot coexist"
+#endif
+
+#if CONFIG_INTC_CLIC && CONFIG_INTC_CLIC_PLIC
+#error "CONFIG_INTC_CLIC and CONFIG_INTC_CLIC_PLIC cannot coexist"
+#endif
+
+#if CONFIG_INTC_CLIC && CONFIG_INTC_CLIC_APLIC
+#error "CONFIG_INTC_CLIC and CONFIG_INTC_CLIC_APLIC cannot coexist"
+#endif
+
+#if CONFIG_INTC_CLIC_PLIC && CONFIG_INTC_CLIC_APLIC
+#error "CONFIG_INTC_CLIC_PLIC and CONFIG_INTC_CLIC_APLIC cannot coexist"
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SOC_H_ */
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/sys_clk.h b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/sys_clk.h
new file mode 100644
index 00000000..3d74f5e9
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/include/sys_clk.h
@@ -0,0 +1,117 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+/******************************************************************************
+ * @file sys_clk.h
+ * @brief header file for setting system frequency.
+ * @version V1.0
+ * @date 9. April 2020
+ ******************************************************************************/
+#ifndef _SYS_CLK_H_
+#define _SYS_CLK_H_
+
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define PMU_REG_BASE (wj_pmu_reg_t *)WJ_PMU_BASE
+
+typedef enum {
+ IHS_CLK = 0U, /* internal high speed clock */
+ EHS_CLK, /* external high speed clock */
+ ILS_CLK, /* internal low speed clock */
+ ELS_CLK, /* external low speed clock */
+ PLL_CLK /* PLL clock */
+} clk_src_t;
+
+typedef enum {
+ CPU_24MHZ = 24000000U
+} sys_freq_t;
+
+
+/* pllclkout : ( pllclkin / 2)*( FN + Frac/4096 ) */
+typedef struct {
+
+ uint32_t pll_is_used; /* pll is used */
+
+ uint32_t pll_source; /* select pll input source clock */
+
+ uint32_t pll_src_clk_divider; /* ratio between pll_srcclk clock and pll_clkin clock */
+
+ uint32_t fn; /* integer value of frequency division */
+
+ uint32_t frac; /* decimal value of frequency division */
+
+} pll_config_t;
+
+
+typedef struct {
+ uint32_t system_clk; /* system clock */
+
+ pll_config_t pll_config; /* pll config struct */
+
+ uint32_t sys_clk_source; /* select sysclk source clock */
+
+ uint32_t rtc_clk_source; /* select rtcclk source clock */
+
+ uint32_t mclk_divider; /* ratio between fs_mclk clock and mclk clock */
+
+ uint32_t apb0_clk_divider; /* ratio between mclk clock and apb0 clock */
+
+ uint32_t apb1_clk_divider; /* ratio between mclk clock and apb1 clock */
+
+} system_clk_config_t;
+
+typedef enum {
+ CLK_DIV1 = 0U,
+} apb_div_t;
+
+typedef enum {
+ PLL_FN_18 = 0U,
+} pll_fn_t;
+
+typedef enum {
+ UART0_CLK,
+} clk_module_t;
+
+
+/**
+ \brief Set the system clock according to the parameter
+ \param[in] config system clock config.
+ \return error code
+*/
+csi_error_t soc_sysclk_config(system_clk_config_t *config);
+
+/**
+ \brief Set iic reset
+ \param[in] idx iic idx.
+ \return Null
+*/
+void soc_reset_iic(uint32_t idx);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SYS_CLK_H_ */
+
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/arch/e906fdp/startup.S b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/arch/e906fdp/startup.S
new file mode 100644
index 00000000..2c6f8c3e
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/arch/e906fdp/startup.S
@@ -0,0 +1,224 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+#include
+
+#if !CONFIG_SUPPORT_NON_VECTOR_IRQ
+.section .vectors, "aw", @progbits
+ .align 6
+ .globl __Vectors
+ .type __Vectors, @object
+__Vectors:
+ .long Default_Handler
+ .long Default_Handler
+ .long Default_Handler
+ .long tspend_handler
+ .long Default_Handler
+ .long Default_Handler
+ .long Default_Handler
+ .long Default_IRQHandler
+ .long Default_Handler
+ .long Default_Handler
+ .long Default_Handler
+ .long Default_Handler
+ .long Default_Handler
+ .long Default_Handler
+ .long Default_Handler
+ .long Default_Handler
+
+ /* External interrupts */
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+ .long Default_IRQHandler
+#else /* CONFIG_SUPPORT_NON_VECTOR_IRQ */
+.section .vectors, "aw", @progbits
+ .align 6
+ .globl __Vectors
+ .type __Vectors, @object
+__Vectors:
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long tspend_handler
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+
+ /* External interrupts */
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+ .long do_irq
+#endif /* CONFIG_SUPPORT_NON_VECTOR_IRQ */
+
+ .size __Vectors, . - __Vectors
+
+ .text
+ .align 2
+ j Reset_Handler
+ .align 2
+ .long 0x594B5343 /* CSKY ASCII */
+ .long 0x594B5343 /* CSKY ASCII */
+ .align 2
+_start:
+ .text
+ .align 2
+ .global Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+.option push
+.option norelax
+ la gp, __global_pointer$
+.option pop
+ la a0, Default_Handler
+ ori a0, a0, 3
+ csrw mtvec, a0
+
+ la a0, __Vectors
+ csrw mtvt, a0
+
+ la sp, g_top_irqstack
+ csrw mscratch, sp
+#ifdef CONFIG_KERNEL_NONE
+ la sp, g_top_mainstack
+#endif
+
+#ifndef __NO_SYSTEM_INIT
+ jal SystemInit
+#endif
+
+ jal pre_main
+
+ .size Reset_Handler, . - Reset_Handler
+
+__exit:
+ j __exit
+
+.section .stack, "aw", @nobits
+ .align 4
+ .global g_base_irqstack
+ .global g_top_irqstack
+g_base_irqstack:
+ .space CONFIG_ARCH_INTERRUPTSTACK
+g_top_irqstack:
+#ifdef CONFIG_KERNEL_NONE
+ .align 4
+ .global g_base_mainstack
+ .global g_top_mainstack
+g_base_mainstack:
+ .space CONFIG_ARCH_MAINSTACK
+g_top_mainstack:
+#endif
+
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/arch/e906fdp/system.c b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/arch/e906fdp/system.c
new file mode 100644
index 00000000..468eeda3
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/arch/e906fdp/system.c
@@ -0,0 +1,119 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include "riscv_csr.h"
+
+#if (defined(CONFIG_KERNEL_RHINO) || defined(CONFIG_KERNEL_FREERTOS) || defined(CONFIG_KERNEL_RTTHREAD)) && defined(CONFIG_KERNEL_NONE)
+#error "Please check the current system is baremetal or not!!!"
+#endif
+
+extern void section_data_copy(void);
+extern void section_ram_code_copy(void);
+extern void section_bss_clear(void);
+
+static void cache_init(void)
+{
+ csi_dcache_enable();
+ csi_icache_enable();
+}
+
+static void section_init(void)
+{
+#if CONFIG_XIP
+ section_data_copy();
+ section_ram_code_copy();
+ csi_dcache_clean();
+ csi_icache_invalid();
+#endif
+ section_bss_clear();
+}
+
+static void clic_init(void)
+{
+ int i;
+
+ /* get interrupt level from info */
+ CLIC->CLICCFG = (((CLIC->CLICINFO & CLIC_INFO_CLICINTCTLBITS_Msk) >> CLIC_INFO_CLICINTCTLBITS_Pos) << CLIC_CLICCFG_NLBIT_Pos);
+
+ for (i = 0; i < 64; i++) {
+ CLIC->CLICINT[i].IP = 0;
+#if !CONFIG_SUPPORT_NON_VECTOR_IRQ
+ CLIC->CLICINT[i].ATTR = 1; /* use vector interrupt */
+#else
+ CLIC->CLICINT[i].ATTR = 0; /* use non-vector interrupt */
+#endif
+ csi_vic_set_prio(i, 3);
+ }
+ /* tspend use vector&positive interrupt */
+ CLIC->CLICINT[Machine_Software_IRQn].ATTR = 0x3;
+ csi_vic_set_prio(Machine_Software_IRQn, 1);
+ csi_irq_enable(Machine_Software_IRQn);
+}
+
+static void interrupt_init(void)
+{
+ clic_init();
+#ifdef CONFIG_KERNEL_NONE
+ __enable_excp_irq();
+#endif
+}
+
+/**
+ * @brief initialize the system
+ * Initialize the psr and vbr.
+ * @param None
+ * @return None
+ */
+void SystemInit(void)
+{
+ extern int cpu_features_init(void);
+ cpu_features_init();
+
+ /* enable theadisaee & MM */
+ uint32_t status = __get_MXSTATUS();
+ status |= (1 << 22 | 1 << 15);
+ __set_MXSTATUS(status);
+
+#if __riscv_flen
+ /* enable float ISA */
+ status = __get_MSTATUS();
+ status |= (1 << MSTATUS_FS_SHIFT);
+ __set_MSTATUS(status);
+#endif
+ /* enable mexstatus SPUSHEN and disable SPSWAPEN */
+#if CONFIG_CPU_XUANTIE_E906 || CONFIG_CPU_XUANTIE_E906F || CONFIG_CPU_XUANTIE_E906FD || CONFIG_CPU_XUANTIE_E906P || CONFIG_CPU_XUANTIE_E906FP || CONFIG_CPU_XUANTIE_E906FDP \
+ || CONFIG_CPU_XUANTIE_E907 || CONFIG_CPU_XUANTIE_E907F || CONFIG_CPU_XUANTIE_E907FD || CONFIG_CPU_XUANTIE_E907P || CONFIG_CPU_XUANTIE_E907FP || CONFIG_CPU_XUANTIE_E907FDP
+ status = __get_MEXSTATUS();
+ status |= (0x1 << 16);
+ status &= ~(0x2 << 16);
+ __set_MEXSTATUS(status);
+#endif
+
+ cache_init();
+ section_init();
+ interrupt_init();
+ soc_set_sys_freq(20000000);
+ csi_tick_init();
+}
+
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/arch/e906fdp/trap_c.c b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/arch/e906fdp/trap_c.c
new file mode 100644
index 00000000..f36e86b2
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/arch/e906fdp/trap_c.c
@@ -0,0 +1,64 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+#include
+#include
+#include
+#include
+#if defined(AOS_COMP_DEBUG) && (AOS_COMP_DEBUG > 0)
+#include
+#else
+#define printk printf
+#endif
+
+void (*trap_c_callback)(void);
+
+void trap_c(uintptr_t *regs)
+{
+ int i;
+ unsigned long vec = 0;
+
+ vec = __get_MCAUSE();
+
+ printk("CPU Exception(mcause);: NO.0x%lx", vec);
+ printk("\n");
+
+ for (i = 0; i < 31; i++) {
+ printk("x%d: %p\t", i + 1, (void *)regs[i]);
+
+ if ((i % 4) == 3) {
+ printk("\n");
+ }
+ }
+
+ printk("\n");
+ printk("mepc : %p\n", (void *)regs[31]);
+ printk("mstatus: %p\n", (void *)regs[32]);
+
+ if (trap_c_callback) {
+ trap_c_callback();
+ }
+
+ while (1);
+}
+
+__attribute__((weak)) void exceptionHandler(void *context)
+{
+ trap_c((uintptr_t *)context);
+}
+
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/arch/e906fdp/vectors.S b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/arch/e906fdp/vectors.S
new file mode 100644
index 00000000..20840bc5
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/arch/e906fdp/vectors.S
@@ -0,0 +1,900 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+#include "riscv_asm_macro.h"
+
+#define RISCV_MCAUSE_IRQ_POS 31
+
+.section .stack, "aw", @nobits
+ .align 4
+ .global g_trapstackbase
+ .global g_top_trapstack
+g_trapstackbase:
+ .space CONFIG_ARCH_INTERRUPTSTACK
+g_top_trapstack:
+
+#if CONFIG_SUPPORT_IRQ_NESTED
+#define IRQ_NESTED_MAX (6)
+.section .bss
+ .align 2
+ irq_nested_level:
+ .long 0
+
+ irq_nested_mcause:
+ .long 0, 0, 0, 0, 0, 0
+#endif
+
+/* for interrupt tail-chaining debug */
+#if CONFIG_DEBUG_TAIL_CHAINING
+.global g_irq_tailchain_loops
+g_irq_tailchain_loops:
+.long 0
+#endif
+
+.text
+
+#if !CONFIG_SUPPORT_IRQ_NESTED
+ .align 2
+ .weak Default_IRQHandler
+ .type Default_IRQHandler, %function
+Default_IRQHandler:
+#if CONFIG_PROFILING_PERF && CONFIG_PERF_BACKTRACE_USE_FP
+ addi sp, sp, -4
+ sw s0, (sp)
+#endif
+
+ csrw mscratch, sp
+ la sp, g_top_irqstack
+ addi sp, sp, -76
+ sw t0, 4(sp)
+ sw t1, 8(sp)
+ csrr t0, mepc
+ csrr t1, mcause
+ sw t1, 64(sp)
+ sw t0, 68(sp)
+ csrr t1, mstatus
+ sw t1, 72(sp)
+ sw ra, 0(sp)
+ sw t2, 12(sp)
+ sw a0, 16(sp)
+ sw a1, 20(sp)
+ sw a2, 24(sp)
+ sw a3, 28(sp)
+ sw a4, 32(sp)
+ sw a5, 36(sp)
+ sw a6, 40(sp)
+ sw a7, 44(sp)
+ sw t3, 48(sp)
+ sw t4, 52(sp)
+ sw t5, 56(sp)
+ sw t6, 60(sp)
+
+#if __riscv_dsp
+ addi sp, sp, -4
+ csrr t0, vxsat
+ sw t0, 0(sp)
+#endif /*__riscv_dsp */
+
+#if CONFIG_CHECK_FPU_DIRTY
+ mv t3, t1
+#endif
+ SAVE_FLOAT_REGISTERS
+
+ la t0, do_irq
+ jalr t0
+
+ /* get mcause from sp */
+ addi t0, sp, 64
+#if __riscv_dsp
+ addi t0, t0, 4
+#endif /*__riscv_dsp */
+#if __riscv_flen == 64
+ addi t0, t0, 164
+#elif __riscv_flen == 32
+ addi t0, t0, 84
+#endif
+ lw a1, (t0)
+ andi a0, a1, 0x3FF
+ slli a0, a0, 2
+
+ /* clear pending */
+ li a2, 0xE0801000
+ add a2, a2, a0
+ lb a3, 0(a2)
+ li a4, 1
+ not a4, a4
+ and a5, a4, a3
+ sb a5, 0(a2)
+
+ RESTORE_xSTATUS
+
+ csrw mcause, a1
+
+ RESTORE_FLOAT_REGISTERS
+
+#if __riscv_dsp
+ lw t0, 0(sp)
+ csrw vxsat, t0
+ addi sp, sp, 4
+#endif /*__riscv_dsp */
+
+ lw t0, 68(sp)
+ csrw mepc, t0
+ lw ra, 0(sp)
+ lw t0, 4(sp)
+ lw t1, 8(sp)
+ lw t2, 12(sp)
+ lw a0, 16(sp)
+ lw a1, 20(sp)
+ lw a2, 24(sp)
+ lw a3, 28(sp)
+ lw a4, 32(sp)
+ lw a5, 36(sp)
+ lw a6, 40(sp)
+ lw a7, 44(sp)
+ lw t3, 48(sp)
+ lw t4, 52(sp)
+ lw t5, 56(sp)
+ lw t6, 60(sp)
+
+ addi sp, sp, 76
+ csrr sp, mscratch
+
+#if CONFIG_PROFILING_PERF && CONFIG_PERF_BACKTRACE_USE_FP
+ addi sp, sp, 4
+#endif
+ mret
+#else /* CONFIG_SUPPORT_IRQ_NESTED */
+ .align 2
+ .weak Default_IRQHandler
+ .type Default_IRQHandler, %function
+Default_IRQHandler:
+ addi sp, sp, -8
+ sw t0, 0(sp)
+ sw t1, 4(sp)
+
+ la t0, irq_nested_level
+ lw t1, (t0)
+ addi t1, t1, 1
+ sw t1, (t0)
+
+ li t0, IRQ_NESTED_MAX
+ /* nested too deeply, may be error happens */
+ bgt t1, t0, Default_Handler
+
+ addi t1, t1, -1
+ la t0, irq_nested_mcause
+ slli t1, t1, 2
+ add t0, t0, t1
+ csrr t1, mcause
+ sw t1, (t0)
+
+ la t0, irq_nested_level
+ lw t1, (t0)
+ li t0, 1
+ bgt t1, t0, .Lnested1
+
+#if CONFIG_PROFILING_PERF && CONFIG_PERF_BACKTRACE_USE_FP
+ addi sp, sp, -8
+ sw s0, (sp)
+ csrr t0, mepc
+ sw t0, 4(sp)
+#endif
+
+ csrw mscratch, sp
+ la sp, g_top_irqstack
+ j .Lnested2
+.Lnested1:
+ lw t0, 0(sp)
+ lw t1, 4(sp)
+ addi sp, sp, 8
+.Lnested2:
+ addi sp, sp, -76
+ sw t0, 4(sp)
+ sw t1, 8(sp)
+ csrr t0, mepc
+ csrr t1, mcause
+ sw t1, 64(sp)
+ sw t0, 68(sp)
+ csrr t1, mstatus
+ sw t1, 72(sp)
+
+ csrs mstatus, 8
+
+ sw ra, 0(sp)
+ sw t2, 12(sp)
+ sw a0, 16(sp)
+ sw a1, 20(sp)
+ sw a2, 24(sp)
+ sw a3, 28(sp)
+ sw a4, 32(sp)
+ sw a5, 36(sp)
+ sw a6, 40(sp)
+ sw a7, 44(sp)
+ sw t3, 48(sp)
+ sw t4, 52(sp)
+ sw t5, 56(sp)
+ sw t6, 60(sp)
+
+#if __riscv_dsp
+ addi sp, sp, -4
+ csrr t0, vxsat
+ sw t0, 0(sp)
+#endif /*__riscv_dsp */
+
+#if CONFIG_CHECK_FPU_DIRTY
+ mv t3, t1
+#endif
+ SAVE_FLOAT_REGISTERS
+
+ la t0, do_irq
+ jalr t0
+
+ csrc mstatus, 8
+
+ /* get mcause from sp */
+ addi t0, sp, 64
+#if __riscv_dsp
+ addi t0, t0, 4
+#endif /*__riscv_dsp */
+#if __riscv_flen == 64
+ addi t0, t0, 164
+#elif __riscv_flen == 32
+ addi t0, t0, 84
+#endif
+ lw a1, (t0)
+ andi a0, a1, 0x3FF
+ slli a0, a0, 2
+
+ /* clear pending */
+ li a2, 0xE0801000
+ add a2, a2, a0
+ lb a3, 0(a2)
+ li a4, 1
+ not a4, a4
+ and a5, a4, a3
+ sb a5, 0(a2)
+
+ la t0, irq_nested_level
+ lw t1, (t0)
+ addi t1, t1, -1
+ sw t1, (t0)
+ bgt t1, zero, .Lnested3
+
+ RESTORE_xSTATUS
+
+ csrw mcause, a1
+
+ RESTORE_FLOAT_REGISTERS
+
+#if __riscv_dsp
+ lw t0, 0(sp)
+ csrw vxsat, t0
+ addi sp, sp, 4
+#endif /*__riscv_dsp */
+
+ lw t0, 68(sp)
+ csrw mepc, t0
+ lw ra, 0(sp)
+ lw t0, 4(sp)
+ lw t1, 8(sp)
+ lw t2, 12(sp)
+ lw a0, 16(sp)
+ lw a1, 20(sp)
+ lw a2, 24(sp)
+ lw a3, 28(sp)
+ lw a4, 32(sp)
+ lw a5, 36(sp)
+ lw a6, 40(sp)
+ lw a7, 44(sp)
+ lw t3, 48(sp)
+ lw t4, 52(sp)
+ lw t5, 56(sp)
+ lw t6, 60(sp)
+
+ addi sp, sp, 76
+ csrr sp, mscratch
+#if CONFIG_PROFILING_PERF && CONFIG_PERF_BACKTRACE_USE_FP
+ addi sp, sp, 8
+#endif
+ lw t0, 0(sp)
+ lw t1, 4(sp)
+ addi sp, sp, 8
+ mret
+
+.Lnested3:
+ /* keep mpil in current mcause & load exception code before */
+ addi t1, t1, -1
+ la t0, irq_nested_mcause
+ slli t1, t1, 2
+ add t1, t0, t1
+ lw t0, (t1)
+ andi t0, t0, 0x3FF
+ andi a0, a1, 0xFFFFFC00
+ or t0, a0, t0
+ csrw mcause, t0
+
+ RESTORE_xSTATUS
+
+ RESTORE_FLOAT_REGISTERS
+
+#if __riscv_dsp
+ lw t0, 0(sp)
+ csrw vxsat, t0
+ addi sp, sp, 4
+#endif /*__riscv_dsp */
+
+ lw t0, 68(sp)
+ csrw mepc, t0
+
+ lw ra, 0(sp)
+ lw t0, 4(sp)
+ lw t1, 8(sp)
+ lw t2, 12(sp)
+ lw a0, 16(sp)
+ lw a1, 20(sp)
+ lw a2, 24(sp)
+ lw a3, 28(sp)
+ lw a4, 32(sp)
+ lw a5, 36(sp)
+ lw a6, 40(sp)
+ lw a7, 44(sp)
+ lw t3, 48(sp)
+ lw t4, 52(sp)
+ lw t5, 56(sp)
+ lw t6, 60(sp)
+
+ addi sp, sp, 76
+ mret
+#endif /* CONFIG_SUPPORT_IRQ_NESTED */
+
+/******************************************************************************
+ * Functions:
+ * void trap(void);
+ * default exception handler
+ ******************************************************************************/
+ .align 2
+ .global trap
+ .type trap, %function
+trap:
+ csrw mscratch, sp
+ la sp, g_top_trapstack
+ addi sp, sp, -140
+ sw x1, ( 0 )(sp)
+ sw x3, ( 8 )(sp)
+ sw x4, ( 12)(sp)
+ sw x5, ( 16)(sp)
+ sw x6, ( 20)(sp)
+ sw x7, ( 24)(sp)
+ sw x8, ( 28)(sp)
+ sw x9, ( 32)(sp)
+ sw x10,( 36)(sp)
+ sw x11,( 40)(sp)
+ sw x12,( 44)(sp)
+ sw x13,( 48)(sp)
+ sw x14,( 52)(sp)
+ sw x15,( 56)(sp)
+ sw x16,( 60)(sp)
+ sw x17,( 64)(sp)
+ sw x18,( 68)(sp)
+ sw x19,( 72)(sp)
+ sw x20,( 76)(sp)
+ sw x21,( 80)(sp)
+ sw x22,( 84)(sp)
+ sw x23,( 88)(sp)
+ sw x24,( 92)(sp)
+ sw x25,( 96)(sp)
+ sw x26,(100)(sp)
+ sw x27,(104)(sp)
+ sw x28,(108)(sp)
+ sw x29,(112)(sp)
+ sw x30,(116)(sp)
+ sw x31,(120)(sp)
+ csrr a0, mepc
+ sw a0, (124)(sp)
+ csrr a0, mstatus
+ sw a0, (128)(sp)
+ csrr a0, mcause
+ sw a0, (132)(sp)
+ csrr a0, mtval
+ sw a0, (136)(sp)
+ csrr a0, mscratch
+ sw a0, ( 4 )(sp)
+
+ mv a0, sp
+ la a1, exceptionHandler
+ jalr a1
+
+/*******************************************************************************
+ * Functions:
+ * void Default_Handler(void);
+ * Non-Vector Interrupt Handler,Exception Handler,NMI Handler
+ ******************************************************************************/
+#if !CONFIG_SUPPORT_IRQ_NESTED
+ .align 6
+ .weak Default_Handler
+ .type Default_Handler, %function
+Default_Handler:
+ /* Check for nmi */
+ addi sp, sp, -8
+ sw t0, 0x0(sp)
+ sw t1, 0x4(sp)
+ csrr t0, mcause
+
+ srli t1, t0, RISCV_MCAUSE_IRQ_POS
+ bnez t1, is_interrupt
+
+ andi t0, t0, 0x3FF
+ li t1, 24
+ beq t0, t1, .NMI_Handler
+ lw t0, 0x0(sp)
+ lw t1, 0x4(sp)
+ addi sp, sp, 8
+ j trap
+
+is_interrupt:
+ lw t0, 0x0(sp)
+ lw t1, 0x4(sp)
+ addi sp, sp, 8
+#if CONFIG_PROFILING_PERF && CONFIG_PERF_BACKTRACE_USE_FP
+ addi sp, sp, -4
+ sw s0, (sp)
+#endif
+ csrw mscratch, sp
+ la sp, g_top_irqstack
+ addi sp, sp, -76
+ sw t0, 4(sp)
+ sw t1, 8(sp)
+ csrr t0, mepc
+ csrr t1, mcause
+ sw t1, 64(sp)
+ sw t0, 68(sp)
+ csrr t1, mstatus
+ sw t1, 72(sp)
+
+ sw ra, 0(sp)
+ sw t2, 12(sp)
+ sw a0, 16(sp)
+ sw a1, 20(sp)
+ sw a2, 24(sp)
+ sw a3, 28(sp)
+ sw a4, 32(sp)
+ sw a5, 36(sp)
+ sw a6, 40(sp)
+ sw a7, 44(sp)
+ sw t3, 48(sp)
+ sw t4, 52(sp)
+ sw t5, 56(sp)
+ sw t6, 60(sp)
+
+#if __riscv_dsp
+ addi sp, sp, -4
+ csrr t0, vxsat
+ sw t0, 0(sp)
+#endif /*__riscv_dsp */
+
+#if CONFIG_CHECK_FPU_DIRTY
+ mv t3, t1
+#endif
+ SAVE_FLOAT_REGISTERS
+
+#if CONFIG_DEBUG_TAIL_CHAINING
+ li t2, 0
+ la t1, g_irq_tailchain_loops
+ sw t2, 0(t1)
+#endif
+
+ csrrci t0, mnxti, MSTATUS_MIE
+ beqz t0, irq_done
+
+irq_loop:
+#if CONFIG_DEBUG_TAIL_CHAINING
+ la t2, g_irq_tailchain_loops
+ lw t1, 0(t2)
+ addi t1, t1, 1
+ sw t1, 0(t2)
+#endif
+ lw t1, 0(t0)
+ jalr t1
+ csrrci t0, mnxti, MSTATUS_MIE
+ bnez t0, irq_loop
+
+irq_done:
+ RESTORE_xSTATUS
+
+ RESTORE_FLOAT_REGISTERS
+
+#if __riscv_dsp
+ lw t0, 0(sp)
+ csrw vxsat, t0
+ addi sp, sp, 4
+#endif /*__riscv_dsp */
+
+ lw a1, 64(sp)
+ csrw mcause, a1
+
+ lw t0, 68(sp)
+ csrw mepc, t0
+
+ lw ra, 0(sp)
+ lw t0, 4(sp)
+ lw t1, 8(sp)
+ lw t2, 12(sp)
+ lw a0, 16(sp)
+ lw a1, 20(sp)
+ lw a2, 24(sp)
+ lw a3, 28(sp)
+ lw a4, 32(sp)
+ lw a5, 36(sp)
+ lw a6, 40(sp)
+ lw a7, 44(sp)
+ lw t3, 48(sp)
+ lw t4, 52(sp)
+ lw t5, 56(sp)
+ lw t6, 60(sp)
+
+ addi sp, sp, 76
+ csrr sp, mscratch
+
+#if CONFIG_PROFILING_PERF && CONFIG_PERF_BACKTRACE_USE_FP
+ addi sp, sp, 4
+#endif
+ mret
+
+#else /* CONFIG_SUPPORT_IRQ_NESTED */
+
+ .align 6
+ .weak Default_Handler
+ .type Default_Handler, %function
+Default_Handler:
+ addi sp, sp, -8
+ sw t0, 0x0(sp)
+ sw t1, 0x4(sp)
+
+ csrr t0, mcause
+
+ /* Check is interrupt */
+ srli t1, t0, RISCV_MCAUSE_IRQ_POS
+ bnez t1, is_interrupt
+
+ /* Check for nmi */
+ andi t0, t0, 0x3FF
+ li t1, 24
+ beq t0, t1, .NMI_Handler
+
+ lw t0, 0x0(sp)
+ lw t1, 0x4(sp)
+ addi sp, sp, 8
+
+ /* is exception */
+ j trap
+
+is_interrupt:
+ la t0, irq_nested_level
+ lw t1, (t0)
+ addi t1, t1, 1
+ sw t1, (t0)
+
+ li t0, IRQ_NESTED_MAX
+ /* nested too deeply, may be error happens */
+ bgt t1, t0, trap
+
+ addi t1, t1, -1
+ la t0, irq_nested_mcause
+ slli t1, t1, 2
+ add t0, t0, t1
+ csrr t1, mcause
+ sw t1, (t0)
+
+ la t0, irq_nested_level
+ lw t1, (t0)
+ li t0, 1
+ bgt t1, t0, .Nested_Context
+
+#if CONFIG_PROFILING_PERF && CONFIG_PERF_BACKTRACE_USE_FP
+ addi sp, sp, -8
+ sw s0, (sp)
+ csrr t0, mepc
+ sw t0, 4(sp)
+#endif
+
+ csrw mscratch, sp
+ la sp, g_top_irqstack
+ j .Save_Context
+
+.Nested_Context:
+ lw t0, 0(sp)
+ lw t1, 4(sp)
+ addi sp, sp, 8
+.Save_Context:
+ addi sp, sp, -76
+ sw t0, 4(sp)
+ sw t1, 8(sp)
+ csrr t0, mepc
+ csrr t1, mcause
+ sw t1, 64(sp)
+ sw t0, 68(sp)
+ csrr t1, mstatus
+ sw t1, 72(sp)
+
+ sw ra, 0(sp)
+ sw t2, 12(sp)
+ sw a0, 16(sp)
+ sw a1, 20(sp)
+ sw a2, 24(sp)
+ sw a3, 28(sp)
+ sw a4, 32(sp)
+ sw a5, 36(sp)
+ sw a6, 40(sp)
+ sw a7, 44(sp)
+ sw t3, 48(sp)
+ sw t4, 52(sp)
+ sw t5, 56(sp)
+ sw t6, 60(sp)
+
+#if __riscv_dsp
+ addi sp, sp, -4
+ csrr t0, vxsat
+ sw t0, 0(sp)
+#endif /*__riscv_dsp */
+
+#if CONFIG_CHECK_FPU_DIRTY
+ mv t3, t1
+#endif
+ SAVE_FLOAT_REGISTERS
+
+ csrrci t0, mnxti, MSTATUS_MIE
+ csrs mstatus, 8 /* enable irq for preemption */
+ lw t1, 0(t0) /* Get handler from vector table */
+ jalr t1 /* Call handler */
+
+ csrc mstatus, 8 /* disable irq for critical section */
+
+ /* get mcause from sp */
+ addi t0, sp, 64
+#if __riscv_dsp
+ addi t0, t0, 4
+#endif /*__riscv_dsp */
+#if __riscv_flen == 64
+ addi t0, t0, 164
+#elif __riscv_flen == 32
+ addi t0, t0, 84
+#endif
+ lw a1, (t0)
+
+ la t0, irq_nested_level
+ lw t1, (t0)
+ addi t1, t1, -1
+ sw t1, (t0)
+ bgt t1, zero, .Nested_Return
+
+ RESTORE_xSTATUS
+
+ csrw mcause, a1
+
+ RESTORE_FLOAT_REGISTERS
+
+#if __riscv_dsp
+ lw t0, 0(sp)
+ csrw vxsat, t0
+ addi sp, sp, 4
+#endif /*__riscv_dsp */
+
+ lw t0, 68(sp)
+ csrw mepc, t0
+ lw ra, 0(sp)
+ lw t0, 4(sp)
+ lw t1, 8(sp)
+ lw t2, 12(sp)
+ lw a0, 16(sp)
+ lw a1, 20(sp)
+ lw a2, 24(sp)
+ lw a3, 28(sp)
+ lw a4, 32(sp)
+ lw a5, 36(sp)
+ lw a6, 40(sp)
+ lw a7, 44(sp)
+ lw t3, 48(sp)
+ lw t4, 52(sp)
+ lw t5, 56(sp)
+ lw t6, 60(sp)
+
+ addi sp, sp, 76
+ csrr sp, mscratch
+#if CONFIG_PROFILING_PERF && CONFIG_PERF_BACKTRACE_USE_FP
+ addi sp, sp, 8
+#endif
+ lw t0, 0(sp)
+ lw t1, 4(sp)
+ addi sp, sp, 8
+ mret
+
+.Nested_Return:
+ /* keep mpil in current mcause & load exception code before */
+ addi t1, t1, -1
+ la t0, irq_nested_mcause
+ slli t1, t1, 2
+ add t1, t0, t1
+ lw t0, (t1)
+ andi t0, t0, 0x3FF
+ andi a0, a1, 0xFFFFFC00
+ or t0, a0, t0
+ csrw mcause, t0
+
+ RESTORE_xSTATUS
+
+ RESTORE_FLOAT_REGISTERS
+
+#if __riscv_dsp
+ lw t0, 0(sp)
+ csrw vxsat, t0
+ addi sp, sp, 4
+#endif /*__riscv_dsp */
+
+ lw t0, 68(sp)
+ csrw mepc, t0
+
+ lw ra, 0(sp)
+ lw t0, 4(sp)
+ lw t1, 8(sp)
+ lw t2, 12(sp)
+ lw a0, 16(sp)
+ lw a1, 20(sp)
+ lw a2, 24(sp)
+ lw a3, 28(sp)
+ lw a4, 32(sp)
+ lw a5, 36(sp)
+ lw a6, 40(sp)
+ lw a7, 44(sp)
+ lw t3, 48(sp)
+ lw t4, 52(sp)
+ lw t5, 56(sp)
+ lw t6, 60(sp)
+
+ addi sp, sp, 76
+ mret
+#endif /* CONFIG_SUPPORT_IRQ_NESTED */
+.NMI_Handler:
+ /* mscratch may be used before */
+ addi sp, sp, -4
+ csrr t0, mscratch
+ sw t0, 0x0(sp)
+
+ csrw mscratch, sp
+ la sp, g_top_trapstack
+ addi sp, sp, -76
+ sw t0, 4(sp)
+ sw t1, 8(sp)
+ csrr t0, mepc
+ csrr t1, mcause
+ sw t1, 64(sp)
+ sw t0, 68(sp)
+ csrr t1, mstatus
+ sw t1, 72(sp)
+
+ sw ra, 0(sp)
+ sw t2, 12(sp)
+ sw a0, 16(sp)
+ sw a1, 20(sp)
+ sw a2, 24(sp)
+ sw a3, 28(sp)
+ sw a4, 32(sp)
+ sw a5, 36(sp)
+ sw a6, 40(sp)
+ sw a7, 44(sp)
+ sw t3, 48(sp)
+ sw t4, 52(sp)
+ sw t5, 56(sp)
+ sw t6, 60(sp)
+
+#if __riscv_dsp
+ addi sp, sp, -4
+ csrr t0, vxsat
+ sw t0, 0(sp)
+#endif /*__riscv_dsp */
+
+#if CONFIG_CHECK_FPU_DIRTY
+ mv t3, t1
+#endif
+ SAVE_FLOAT_REGISTERS
+
+ la t0, handle_nmi_exception
+ jalr t0
+
+ /* get mcause from sp */
+ addi t0, sp, 64
+#if __riscv_dsp
+ addi t0, t0, 4
+#endif /*__riscv_dsp */
+#if __riscv_flen == 64
+ addi t0, t0, 164
+#elif __riscv_flen == 32
+ addi t0, t0, 84
+#endif
+ lw a1, (t0)
+ andi a0, a1, 0x3FF
+ slli a0, a0, 2
+
+ /* clear pending */
+ li a2, 0xE0801000
+ add a2, a2, a0
+ lb a3, 0(a2)
+ li a4, 1
+ not a4, a4
+ and a5, a4, a3
+ sb a5, 0(a2)
+
+ RESTORE_xSTATUS
+
+ csrw mcause, a1
+
+ RESTORE_FLOAT_REGISTERS
+
+#if __riscv_dsp
+ lw t0, 0(sp)
+ csrw vxsat, t0
+ addi sp, sp, 4
+#endif /*__riscv_dsp */
+
+ lw t0, 68(sp)
+ csrw mepc, t0
+ lw t0, 72(sp)
+ csrw mstatus, t0
+
+ lw ra, 0(sp)
+ lw t0, 4(sp)
+ lw t1, 8(sp)
+ lw t2, 12(sp)
+ lw a0, 16(sp)
+ lw a1, 20(sp)
+ lw a2, 24(sp)
+ lw a3, 28(sp)
+ lw a4, 32(sp)
+ lw a5, 36(sp)
+ lw a6, 40(sp)
+ lw a7, 44(sp)
+ lw t3, 48(sp)
+ lw t4, 52(sp)
+ lw t5, 56(sp)
+ lw t6, 60(sp)
+
+ addi sp, sp, 76
+ csrr sp, mscratch
+
+ /* restore mscratch */
+ lw t0, 0x0(sp)
+ csrw mscratch, t0
+ addi sp, sp, 4
+
+ lw t0, 0x0(sp)
+ lw t1, 0x4(sp)
+ addi sp, sp, 8
+
+ mret
+
+ .size Default_Handler, . - Default_Handler
+
+/* Macro to define default handlers. Default handler
+ * will be weak symbol and just dead loops. They can be
+ * overwritten by other handlers */
+ .macro def_irq_handler handler_name
+ .weak \handler_name
+ .set \handler_name, Default_Handler
+ .endm
+
+ def_irq_handler tspend_handler
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/drivers/dw_uart_ll.c b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/drivers/dw_uart_ll.c
new file mode 100644
index 00000000..15ae00be
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/drivers/dw_uart_ll.c
@@ -0,0 +1,164 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+/******************************************************************************
+ * @file dw_uart_ll.c
+ * @brief dw uart ll driver
+ * @version V1.0
+ * @date 18. December 2024
+ ******************************************************************************/
+#include
+
+int32_t dw_uart_wait_idle(dw_uart_regs_t *uart_base)
+{
+ uint32_t timecount = 0U;
+ int32_t ret = 0;
+
+ while ((uart_base->USR & DW_UART_USR_BUSY_SET) && (timecount < UART_BUSY_TIMEOUT)) {
+ timecount++;
+ }
+
+ if (timecount >= UART_BUSY_TIMEOUT) {
+ ret = -1;
+ }
+
+ return ret;
+}
+
+int32_t dw_uart_wait_timeout(dw_uart_regs_t *uart_base)
+{
+ uint32_t timecount = 0U;
+ int32_t ret = 0;
+
+ while ((uart_base->LSR & 0x81U) || (uart_base->USR & 0x1U)) {
+ uart_base->LSR;
+ uart_base->RBR;
+ timecount++;
+
+ if (timecount >= UART_BUSY_TIMEOUT) {
+ ret = -1;
+ break;
+ }
+ }
+
+ if (ret == 0) {
+ ret = dw_uart_wait_idle(uart_base);
+ }
+
+ return ret;
+}
+
+int32_t dw_uart_config_baudrate(dw_uart_regs_t *uart_base, uint32_t baud, uint32_t uart_freq)
+{
+ uint32_t divisor;
+ int32_t ret = 0;
+ ret = dw_uart_wait_timeout(uart_base);
+
+ if (ret == 0) {
+ if ((uart_freq / 16) % baud >= (baud / 2))
+ divisor = (uart_freq / 16) / baud + 1;
+ else
+ divisor = (uart_freq / 16) / baud;
+
+ uart_base->LCR |= DW_UART_LCR_DLAB_EN;
+
+ /* DLL and DLH is lower 8-bits and higher 8-bits of divisor.*/
+ uart_base->DLH = (divisor >> 8U) & 0xFFU;
+ uart_base->DLL = divisor & 0xFFU;
+ /*
+ * The DLAB must be cleared after the baudrate is setted
+ * to access other registers.
+ */
+ uart_base->LCR &= (~DW_UART_LCR_DLAB_EN);
+ }
+
+ return ret;
+}
+
+int32_t dw_uart_config_stop_bits(dw_uart_regs_t *uart_base, uint32_t stop_bits)
+{
+ int32_t ret;
+ ret = dw_uart_wait_timeout(uart_base);
+
+ if (ret == 0) {
+
+ //when data length is 5 bits, use dw_uart_config_stop_bits_2 will be 1.5 stop bits
+ if (stop_bits == 1U) {
+ dw_uart_config_stop_bits_1(uart_base);
+ } else if (stop_bits == 2U) {
+ dw_uart_config_stop_bits_2(uart_base);
+ }
+ }
+
+ //FIXME: no console output sometimes
+ mdelay(1);
+
+ return ret;
+}
+
+int32_t dw_uart_config_parity_none(dw_uart_regs_t *uart_base)
+{
+ int32_t ret;
+ ret = dw_uart_wait_timeout(uart_base);
+
+ if (ret == 0) {
+ uart_base->LCR &= (~DW_UART_LCR_PEN_EN);
+ }
+
+ return ret;
+}
+
+int32_t dw_uart_config_parity_odd(dw_uart_regs_t *uart_base)
+{
+ int32_t ret;
+
+ ret = dw_uart_wait_timeout(uart_base);
+
+ if (ret == 0) {
+ uart_base->LCR |= DW_UART_LCR_PEN_EN;
+ uart_base->LCR &= ~(DW_UART_LCR_EPS_EN);
+ }
+
+ return ret;
+}
+
+int32_t dw_uart_config_parity_even(dw_uart_regs_t *uart_base)
+{
+ int32_t ret;
+
+ ret = dw_uart_wait_timeout(uart_base);
+
+ if (ret == 0) {
+ uart_base->LCR |= DW_UART_LCR_PEN_EN;
+ uart_base->LCR |= DW_UART_LCR_EPS_EN;
+ }
+
+ return ret;
+}
+
+int32_t dw_uart_config_data_bits(dw_uart_regs_t *uart_base, uint32_t data_bits)
+{
+ int32_t ret;
+
+ ret = dw_uart_wait_timeout(uart_base);
+
+ uart_base->LCR &= 0xFCU;
+ uart_base->LCR |= (data_bits - 5U);
+
+ return ret;
+}
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/drivers/uart.c b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/drivers/uart.c
new file mode 100644
index 00000000..5f335b4d
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/drivers/uart.c
@@ -0,0 +1,809 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+/******************************************************************************
+ * @file uart.c
+ * @brief CSI Source File for uart Driver
+ * @version V2.01
+ * @date 2020-04-09
+ ******************************************************************************/
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#define UART_TIMEOUT 0x10000000U
+#define UART_MAX_FIFO 0x10U
+
+extern uint16_t uart_tx_hs_num[];
+extern uint16_t uart_rx_hs_num[];
+extern const csi_pinmap_t uart_pinmap[];
+
+static uint8_t find_max_prime_num(uint32_t num)
+{
+ uint8_t ret;
+
+ if (!(num % 8U)) {
+ ret = 8U;
+ } else if (!(num % 4U)) {
+ ret = 4U;
+ } else {
+ ret = 1U;
+ }
+
+ return ret;
+}
+
+static void dw_uart_intr_recv_data(csi_uart_t *uart)
+{
+ dw_uart_regs_t *uart_base = (dw_uart_regs_t *)HANDLE_REG_BASE(uart);
+ uint32_t rxfifo_num = 1;/// uart->rx_size) ? uart->rx_size : rxfifo_num;
+
+ if ((uart->rx_data == NULL) || (uart->rx_size == 0U)) {
+ if (uart->callback) {
+ uart->callback(uart, UART_EVENT_RECEIVE_FIFO_READABLE, uart->arg);
+ } else {
+ do {
+ dw_uart_getchar(uart_base);
+ } while (--rxfifo_num);
+ }
+ } else {
+ do {
+ *uart->rx_data = dw_uart_getchar(uart_base);
+ uart->rx_size--;
+ uart->rx_data++;
+ } while (--rxdata_num);
+
+ if (uart->rx_size == 0U) {
+ uart->state.readable = 1U;
+
+ if (uart->callback) {
+ uart->callback(uart, UART_EVENT_RECEIVE_COMPLETE, uart->arg);
+ }
+ }
+ }
+}
+
+static void uart_intr_send_data(csi_uart_t *uart)
+{
+ uint32_t i = 0U, trans_num = 0U;
+ dw_uart_regs_t *uart_base = (dw_uart_regs_t *)uart->dev.reg_base;
+
+ if (uart->tx_size > UART_MAX_FIFO) {
+ trans_num = UART_MAX_FIFO;
+ } else {
+ trans_num = uart->tx_size;
+ }
+
+ for (i = 0U; i < trans_num; i++) {
+ //dw_uart_putchar(uart_base, *uart->tx_data);
+ csi_uart_putc(uart, *uart->tx_data);
+ uart->tx_size--;
+ uart->tx_data++;
+ }
+
+ if (uart->tx_size == 0U) {
+ dw_uart_disable_trans_irq(uart_base);
+ uart->state.writeable = 1U;
+
+ if (uart->callback) {
+ uart->callback(uart, UART_EVENT_SEND_COMPLETE, uart->arg);
+ }
+ }
+}
+
+static void uart_intr_line_error(csi_uart_t *uart)
+{
+ uint32_t uart_status;
+ dw_uart_regs_t *uart_base = (dw_uart_regs_t *)HANDLE_REG_BASE(uart);
+
+ uart->state.readable = 1U;
+ uart->state.writeable = 1U;
+ uart_status = dw_uart_get_line_status(uart_base);
+
+ if (uart->callback) {
+ if (uart_status & DW_UART_LSR_OE_ERROR) {
+ uart->callback(uart, UART_EVENT_ERROR_OVERFLOW, uart->arg);
+ }
+
+ if (uart_status & DW_UART_LSR_PE_ERROR) {
+ uart->callback(uart, UART_EVENT_ERROR_PARITY, uart->arg);
+ }
+
+ if (uart_status & DW_UART_LSR_FE_ERROR) {
+ uart->callback(uart, UART_EVENT_ERROR_FRAMING, uart->arg);
+ }
+
+ if (uart_status & DW_UART_LSR_BI_SET) {
+ uart->callback(uart, UART_ENENT_BREAK_INTR, uart->arg);
+ }
+ }
+}
+
+void dw_uart_irq_handler(void *arg)
+{
+ csi_uart_t *uart = (csi_uart_t *)arg;
+ dw_uart_regs_t *uart_base = (dw_uart_regs_t *)uart->dev.reg_base;
+
+ uint8_t intr_state;
+
+ intr_state = (uint8_t)(uart_base->IIR & 0xfU);
+
+ switch (intr_state) {
+ case DW_UART_IIR_IID_RECV_LINE_STATUS: /* interrupt source: Overrun/parity/framing errors or break interrupt */
+ uart_intr_line_error(uart);
+ break;
+
+ case DW_UART_IIR_IID_THR_EMPTY: /* interrupt source:sendter holding register empty */
+ uart_intr_send_data(uart);
+ break;
+
+ case DW_UART_IIR_IID_RECV_DATA_AVAIL: /* interrupt source:receiver data available or receiver fifo trigger level reached */
+ case DW_UART_IIR_IID_CHARACTER_TIMEOUT:
+ dw_uart_intr_recv_data(uart);
+ break;
+
+ default:
+ break;
+ }
+}
+
+csi_error_t csi_uart_init(csi_uart_t *uart, uint32_t idx)
+{
+ CSI_PARAM_CHK(uart, CSI_ERROR);
+
+ csi_error_t ret = CSI_OK;
+ dw_uart_regs_t *uart_base;
+
+ ret = target_get(DEV_DW_UART_TAG, idx, &uart->dev);
+
+ if (ret == CSI_OK) {
+ uart_base = (dw_uart_regs_t *)HANDLE_REG_BASE(uart);
+
+ dw_uart_fifo_init(uart_base);
+
+ uart->rx_size = 0U;
+ uart->tx_size = 0U;
+ uart->rx_data = NULL;
+ uart->tx_data = NULL;
+ uart->tx_dma = NULL;
+ uart->rx_dma = NULL;
+ dw_uart_disable_trans_irq(uart_base);
+ dw_uart_disable_recv_irq(uart_base);
+ dw_uart_disable_auto_flow_control(uart_base);
+ }
+
+ return ret;
+}
+
+void csi_uart_uninit(csi_uart_t *uart)
+{
+ CSI_PARAM_CHK_NORETVAL(uart);
+
+ dw_uart_regs_t *uart_base;
+ uart_base = (dw_uart_regs_t *)HANDLE_REG_BASE(uart);
+
+ uart->rx_size = 0U;
+ uart->tx_size = 0U;
+ uart->rx_data = NULL;
+ uart->tx_data = NULL;
+
+ dw_uart_disable_trans_irq(uart_base);
+ dw_uart_disable_recv_irq(uart_base);
+ csi_irq_disable((uint32_t)(uart->dev.irq_num));
+ csi_irq_detach((uint32_t)(uart->dev.irq_num));
+}
+
+csi_error_t csi_uart_baud(csi_uart_t *uart, uint32_t baud)
+{
+ CSI_PARAM_CHK(uart, CSI_ERROR);
+
+ int32_t ret = 0;
+ csi_error_t csi_ret = CSI_OK;
+ dw_uart_regs_t *uart_base;
+ uart_base = (dw_uart_regs_t *)HANDLE_REG_BASE(uart);
+
+ ret = dw_uart_config_baudrate(uart_base, baud, soc_get_uart_freq((uint32_t)(uart->dev.idx)));
+
+ if (ret == 0) {
+ csi_ret = CSI_OK;
+ } else {
+ csi_ret = CSI_ERROR;
+ }
+
+ return csi_ret;
+}
+
+csi_error_t csi_uart_format(csi_uart_t *uart, csi_uart_data_bits_t data_bits,
+ csi_uart_parity_t parity, csi_uart_stop_bits_t stop_bits)
+{
+ CSI_PARAM_CHK(uart, CSI_ERROR);
+
+ int32_t ret = 0;
+ csi_error_t csi_ret = CSI_OK;
+ dw_uart_regs_t *uart_base;
+ uart_base = (dw_uart_regs_t *)HANDLE_REG_BASE(uart);
+
+ switch (data_bits) {
+ case UART_DATA_BITS_5:
+ ret = dw_uart_config_data_bits(uart_base, 5U);
+ break;
+
+ case UART_DATA_BITS_6:
+ ret = dw_uart_config_data_bits(uart_base, 6U);
+ break;
+
+ case UART_DATA_BITS_7:
+ ret = dw_uart_config_data_bits(uart_base, 7U);
+ break;
+
+ case UART_DATA_BITS_8:
+ ret = dw_uart_config_data_bits(uart_base, 8U);
+ break;
+
+ default:
+ ret = -1;
+ break;
+ }
+
+ if (ret == 0) {
+ switch (parity) {
+ case UART_PARITY_NONE:
+ ret = dw_uart_config_parity_none(uart_base);
+ break;
+
+ case UART_PARITY_ODD:
+ ret = dw_uart_config_parity_odd(uart_base);
+ break;
+
+ case UART_PARITY_EVEN:
+ ret = dw_uart_config_parity_even(uart_base);
+ break;
+
+ default:
+ ret = -1;
+ break;
+ }
+
+ if (ret == 0) {
+ switch (stop_bits) {
+ case UART_STOP_BITS_1:
+ ret = dw_uart_config_stop_bits(uart_base, 1U);
+ break;
+
+ case UART_STOP_BITS_2:
+ ret = dw_uart_config_stop_bits(uart_base, 2U);
+ break;
+
+ case UART_STOP_BITS_1_5:
+ if (data_bits == UART_DATA_BITS_5) {
+ ret = dw_uart_config_stop_bits(uart_base, 2U);
+ break;
+ }
+
+ default:
+ ret = -1;
+ break;
+ }
+
+ if (ret != 0) {
+ csi_ret = CSI_ERROR;
+ }
+
+ } else {
+ csi_ret = CSI_ERROR;
+ }
+
+ } else {
+ csi_ret = CSI_ERROR;
+ }
+
+ return csi_ret;
+}
+
+csi_error_t csi_uart_flowctrl(csi_uart_t *uart, csi_uart_flowctrl_t flowctrl)
+{
+ CSI_PARAM_CHK(uart, CSI_ERROR);
+ csi_error_t csi_ret = CSI_OK;
+ dw_uart_regs_t *uart_base;
+ uart_base = (dw_uart_regs_t *)HANDLE_REG_BASE(uart);
+
+ switch (flowctrl) {
+ case UART_FLOWCTRL_CTS:
+ dw_uart_wait_idle(uart_base);
+ dw_uart_enable_auto_flow_control(uart_base);
+ break;
+
+ case UART_FLOWCTRL_RTS_CTS:
+ dw_uart_wait_idle(uart_base);
+ dw_uart_enable_auto_flow_control(uart_base);
+ break;
+
+ case UART_FLOWCTRL_NONE:
+ dw_uart_wait_idle(uart_base);
+ break;
+
+ case UART_FLOWCTRL_RTS:
+ default:
+ csi_ret = CSI_UNSUPPORTED;
+ break;
+ }
+
+ return csi_ret;
+}
+
+void csi_uart_putc(csi_uart_t *uart, uint8_t ch)
+{
+ CSI_PARAM_CHK_NORETVAL(uart);
+
+ volatile int i = 10;
+ uint32_t timeout = UART_TIMEOUT;
+ dw_uart_regs_t *uart_base = (dw_uart_regs_t *)HANDLE_REG_BASE(uart);
+
+ while (!dw_uart_putready(uart_base) && timeout--);
+
+ if (timeout) {
+ //FIXME: fix print luanma on irq-mode sometimes. maybe hw bug
+ while (i--);
+ dw_uart_putchar(uart_base, ch);
+ }
+}
+
+uint8_t csi_uart_getc(csi_uart_t *uart)
+{
+ CSI_PARAM_CHK(uart, 0U);
+
+ dw_uart_regs_t *uart_base = (dw_uart_regs_t *)HANDLE_REG_BASE(uart);
+
+ while (!dw_uart_getready(uart_base));
+
+ return dw_uart_getchar(uart_base);
+}
+
+int32_t csi_uart_receive(csi_uart_t *uart, void *data, uint32_t size, uint32_t timeout)
+{
+ CSI_PARAM_CHK(uart, CSI_ERROR);
+ CSI_PARAM_CHK(data, CSI_ERROR);
+
+ uint8_t *temp_data = (uint8_t *)data;
+ int32_t recv_num = 0;
+ uint32_t recv_start, timeout_flag = 0U;
+ uint32_t intr_en_status;
+
+ recv_start = csi_tick_get_ms();
+ dw_uart_regs_t *uart_base = (dw_uart_regs_t *)uart->dev.reg_base;
+ intr_en_status = dw_uart_get_intr_en_status(uart_base);
+ dw_uart_disable_recv_irq(uart_base);
+
+ while (recv_num < (int32_t)size) {
+ while (!dw_uart_getready(uart_base)) {
+ if ((csi_tick_get_ms() - recv_start) >= timeout) {
+ timeout_flag = 1U;
+ break;
+ }
+ };
+
+ if (timeout_flag == 0U) {
+ *temp_data = dw_uart_getchar(uart_base);
+ temp_data++;
+ recv_num++;
+ recv_start = csi_tick_get_ms();
+ } else {
+ break;
+ }
+ }
+
+ dw_uart_set_intr_en_status(uart_base, intr_en_status);
+
+ return recv_num;
+}
+
+csi_error_t dw_uart_receive_intr(csi_uart_t *uart, void *data, uint32_t num)
+{
+ dw_uart_regs_t *uart_base = (dw_uart_regs_t *)HANDLE_REG_BASE(uart);
+ uart->rx_data = (uint8_t *)data;
+ uart->rx_size = num;
+
+ dw_uart_enable_recv_irq(uart_base);
+
+ return CSI_OK;
+}
+
+csi_error_t csi_uart_receive_async(csi_uart_t *uart, void *data, uint32_t size)
+{
+ CSI_PARAM_CHK(uart, CSI_ERROR);
+ CSI_PARAM_CHK(data, CSI_ERROR);
+ CSI_PARAM_CHK(uart->callback, CSI_ERROR);
+ CSI_PARAM_CHK(uart->receive, CSI_ERROR);
+
+ csi_error_t ret;
+
+ ret = uart->receive(uart, data, size);
+
+ if (ret == CSI_OK) {
+ uart->state.readable = 0U;
+ }
+
+ return ret;
+}
+
+int32_t csi_uart_send(csi_uart_t *uart, const void *data, uint32_t size, uint32_t timeout)
+{
+ /* check data and uart */
+ CSI_PARAM_CHK(uart, CSI_ERROR);
+ CSI_PARAM_CHK(data, CSI_ERROR);
+ CSI_PARAM_CHK(size, CSI_ERROR);
+
+ dw_uart_regs_t *uart_base;
+ uint8_t *ch = (uint8_t *)data;
+ int32_t trans_num = 0;
+ uint32_t send_start, timeout_flag = 0U;
+ uint32_t intr_en_status;
+
+ uart_base = (dw_uart_regs_t *)uart->dev.reg_base;
+ /* store the status of intr */
+ intr_en_status = dw_uart_get_intr_en_status(uart_base);
+ dw_uart_disable_trans_irq(uart_base);
+
+ send_start = csi_tick_get_ms();
+
+ while (trans_num < (int32_t)size) {
+ while (!dw_uart_putready(uart_base)) {
+ if ((csi_tick_get_ms() - send_start) >= timeout) {
+ timeout_flag = 1U;
+ break;
+ }
+ };
+
+ if (timeout_flag == 0U) {
+ dw_uart_putchar(uart_base, *ch++);
+ /* update the timeout */
+ send_start = csi_tick_get_ms();
+ trans_num++;
+ } else {
+ break;
+ }
+ }
+
+ dw_uart_set_intr_en_status(uart_base, intr_en_status);
+
+ return trans_num;
+}
+
+csi_error_t dw_uart_send_intr(csi_uart_t *uart, const void *data, uint32_t size)
+{
+ dw_uart_regs_t *uart_base = (dw_uart_regs_t *)uart->dev.reg_base;
+
+ uart->tx_data = (uint8_t *)data;
+ uart->tx_size = size;
+ dw_uart_enable_trans_irq(uart_base);
+
+ return CSI_OK;
+}
+
+csi_error_t csi_uart_send_async(csi_uart_t *uart, const void *data, uint32_t size)
+{
+ CSI_PARAM_CHK(uart, CSI_ERROR);
+ CSI_PARAM_CHK(data, CSI_ERROR);
+ CSI_PARAM_CHK(uart->callback, CSI_ERROR);
+ CSI_PARAM_CHK(uart->send, CSI_ERROR);
+
+ csi_error_t ret;
+ ret = uart->send(uart, data, size);
+
+ if (ret == CSI_OK) {
+ uart->state.writeable = 0U;
+ }
+
+ return ret;
+}
+
+csi_error_t csi_uart_attach_callback(csi_uart_t *uart, void *callback, void *arg)
+{
+ CSI_PARAM_CHK(uart, CSI_ERROR);
+
+ dw_uart_regs_t *uart_base;
+ uart_base = (dw_uart_regs_t *)HANDLE_REG_BASE(uart);
+
+ uart->callback = callback;
+ uart->arg = arg;
+ uart->send = dw_uart_send_intr;
+ uart->receive = dw_uart_receive_intr;
+ csi_irq_attach((uint32_t)(uart->dev.irq_num), &dw_uart_irq_handler, &uart->dev);
+ csi_irq_enable((uint32_t)(uart->dev.irq_num));
+ dw_uart_enable_recv_irq(uart_base);
+
+ return CSI_OK;
+}
+
+void csi_uart_detach_callback(csi_uart_t *uart)
+{
+ CSI_PARAM_CHK_NORETVAL(uart);
+
+ dw_uart_regs_t *uart_base;
+ uart_base = (dw_uart_regs_t *)HANDLE_REG_BASE(uart);
+
+ uart->callback = NULL;
+ uart->arg = NULL;
+ uart->send = NULL;
+ uart->receive = NULL;
+ dw_uart_disable_recv_irq(uart_base);
+ csi_irq_disable((uint32_t)(uart->dev.irq_num));
+ csi_irq_detach((uint32_t)(uart->dev.irq_num));
+}
+
+csi_error_t csi_uart_get_state(csi_uart_t *uart, csi_state_t *state)
+{
+ CSI_PARAM_CHK(uart, CSI_ERROR);
+ CSI_PARAM_CHK(state, CSI_ERROR);
+
+ *state = uart->state;
+
+ return CSI_OK;
+}
+
+static void dw_uart_dma_event_cb(csi_dma_ch_t *dma, csi_dma_event_t event, void *arg)
+{
+ csi_uart_t *uart = (csi_uart_t *)dma->parent;
+ dw_uart_regs_t *uart_base = (dw_uart_regs_t *)HANDLE_REG_BASE(uart);
+
+ if (event == DMA_EVENT_TRANSFER_ERROR) {/* DMA transfer ERROR */
+ if ((uart->tx_dma != NULL) && (uart->tx_dma->ch_id == dma->ch_id)) {
+ csi_dma_ch_stop(dma);
+ dw_uart_fifo_init(uart_base);
+
+ uart->state.writeable = 1U;
+
+ if (uart->callback) {
+ uart->callback(uart, UART_EVENT_ERROR_OVERFLOW, uart->arg);
+ }
+ } else {
+ csi_dma_ch_stop(dma);
+ dw_uart_fifo_init(uart_base);
+ /* enable received data available */
+ dw_uart_enable_recv_irq(uart_base);
+
+ uart->state.readable = 1U;
+
+ if (uart->callback) {
+ uart->callback(uart, UART_EVENT_ERROR_FRAMING, uart->arg);
+ }
+ }
+ } else if (event == DMA_EVENT_TRANSFER_DONE) {/* DMA transfer complete */
+ if ((uart->tx_dma != NULL) && (uart->tx_dma->ch_id == dma->ch_id)) {
+
+ csi_dma_ch_stop(dma);
+ dw_uart_fifo_init(uart_base);
+
+ uart->state.writeable = 1U;
+
+ if (uart->callback) {
+ uart->callback(uart, UART_EVENT_SEND_COMPLETE, uart->arg);
+ }
+ } else {
+ csi_dma_ch_stop(dma);
+ dw_uart_fifo_init(uart_base);
+ /* enable received data available */
+ dw_uart_enable_recv_irq(uart_base);
+
+ uart->state.readable = 1U;
+
+ if (uart->callback) {
+ uart->callback(uart, UART_EVENT_RECEIVE_COMPLETE, uart->arg);
+ }
+ }
+ }
+}
+
+csi_error_t dw_uart_send_dma(csi_uart_t *uart, const void *data, uint32_t num)
+{
+ csi_dma_ch_config_t config;
+ memset(&config, 0, sizeof(csi_dma_ch_config_t));
+ uint32_t fcr_reg = UART_FIFO_INIT_CONFIG;
+ dw_uart_regs_t *uart_base = (dw_uart_regs_t *)HANDLE_REG_BASE(uart);
+ csi_dma_ch_t *dma_ch = (csi_dma_ch_t *)uart->tx_dma;
+
+ uart->tx_data = (uint8_t *)data;
+ uart->tx_size = num;
+ dw_uart_disable_recv_irq(uart_base);
+ dw_uart_disable_trans_irq(uart_base);
+ config.src_inc = DMA_ADDR_INC;
+ config.dst_inc = DMA_ADDR_CONSTANT;
+ config.src_tw = DMA_DATA_WIDTH_8_BITS;
+ config.dst_tw = DMA_DATA_WIDTH_8_BITS;
+
+ /* config for wj_dma */
+ config.group_len = find_max_prime_num(num);
+ config.trans_dir = DMA_MEM2PERH;
+
+ /* config for etb */
+ config.handshake = uart_tx_hs_num[uart->dev.idx];
+
+ csi_dma_ch_config(dma_ch, &config);
+
+ fcr_reg &= ~(DW_UART_FCR_TET_Msk);
+
+ if (config.group_len >= (UART_MAX_FIFO / 2U)) {
+ fcr_reg |= DW_UART_FCR_TET_FIFO_1_2_FULL;
+ } else if (config.group_len >= (UART_MAX_FIFO / 4U)) {
+ fcr_reg |= DW_UART_FCR_TET_FIFO_1_4_FULL;
+ } else if (config.group_len >= (UART_MAX_FIFO / 8U)) {
+ fcr_reg |= DW_UART_FCR_TET_FIFO_2_CHAR;
+ } else {
+ fcr_reg |= DW_UART_FCR_TET_FIFO_EMTPY;
+ }
+
+ soc_dcache_clean_invalid_range((unsigned long)uart->tx_data, uart->tx_size);
+ dw_uart_set_fcr_reg(uart_base, fcr_reg);
+ csi_dma_ch_start(uart->tx_dma, (void *)uart->tx_data, (uint8_t *) & (uart_base->THR), uart->tx_size);
+
+ return CSI_OK;
+}
+
+csi_error_t dw_uart_receive_dma(csi_uart_t *uart, void *data, uint32_t num)
+{
+ csi_dma_ch_config_t config;
+ memset(&config, 0, sizeof(csi_dma_ch_config_t));
+ csi_error_t ret = CSI_OK;
+ uint32_t fcr_reg = UART_FIFO_INIT_CONFIG;
+ dw_uart_regs_t *uart_base = (dw_uart_regs_t *)HANDLE_REG_BASE(uart);
+ csi_dma_ch_t *dma = (csi_dma_ch_t *)uart->rx_dma;
+
+ dw_uart_disable_trans_irq(uart_base);
+ dw_uart_disable_recv_irq(uart_base);
+ uart->rx_data = (uint8_t *)data;
+ uart->rx_size = num;
+ config.src_inc = DMA_ADDR_CONSTANT;
+ config.dst_inc = DMA_ADDR_INC;
+ config.src_tw = DMA_DATA_WIDTH_8_BITS;
+ config.dst_tw = DMA_DATA_WIDTH_8_BITS;
+ config.group_len = find_max_prime_num(num);
+ config.trans_dir = DMA_PERH2MEM;
+ config.handshake = uart_rx_hs_num[uart->dev.idx];
+
+ ret = csi_dma_ch_config(dma, &config);
+
+ if (ret == CSI_OK) {
+
+ fcr_reg &= ~(DW_UART_FCR_RT_Msk);
+
+ if (config.group_len >= (UART_MAX_FIFO / 2U)) {
+ fcr_reg |= DW_UART_FCR_RT_FIFO_1_2_FULL;
+ } else if (config.group_len >= (UART_MAX_FIFO / 4U)) {
+ fcr_reg |= DW_UART_FCR_RT_FIFO_1_4_FULL;
+ } else {
+ fcr_reg |= DW_UART_FCR_RT_FIFO_1_CHAR;
+ }
+
+ soc_dcache_clean_invalid_range((unsigned long)uart->rx_data, uart->rx_size);
+ dw_uart_set_fcr_reg(uart_base, fcr_reg | DW_UART_FCR_RFIFOR_RESET);
+ csi_dma_ch_start(uart->rx_dma, (uint8_t *) & (uart_base->RBR), (void *)uart->rx_data, uart->rx_size);
+ }
+
+ return ret;
+}
+
+csi_error_t csi_uart_link_dma(csi_uart_t *uart, csi_dma_ch_t *tx_dma, csi_dma_ch_t *rx_dma)
+{
+ CSI_PARAM_CHK(uart, CSI_ERROR);
+ CSI_PARAM_CHK(uart->callback, CSI_ERROR);
+ csi_error_t ret = CSI_OK;
+
+ if (tx_dma != NULL) {
+ tx_dma->parent = uart;
+ ret = csi_dma_ch_alloc(tx_dma, -1, -1);
+
+ if (ret == CSI_OK) {
+ csi_dma_ch_attach_callback(tx_dma, dw_uart_dma_event_cb, NULL);
+ uart->tx_dma = tx_dma;
+ uart->send = dw_uart_send_dma;
+ } else {
+ tx_dma->parent = NULL;
+ }
+ } else {
+ if (uart->tx_dma) {
+ csi_dma_ch_detach_callback(uart->tx_dma);
+ csi_dma_ch_free(uart->tx_dma);
+ uart->tx_dma = NULL;
+ }
+
+ uart->send = dw_uart_send_intr;
+ }
+
+ if (ret != CSI_ERROR) {
+ if (rx_dma != NULL) {
+ rx_dma->parent = uart;
+ ret = csi_dma_ch_alloc(rx_dma, -1, -1);
+
+ if (ret == CSI_OK) {
+ csi_dma_ch_attach_callback(rx_dma, dw_uart_dma_event_cb, NULL);
+ uart->rx_dma = rx_dma;
+ uart->receive = dw_uart_receive_dma;
+ } else {
+ rx_dma->parent = NULL;
+ }
+ } else {
+ if (uart->rx_dma) {
+ csi_dma_ch_detach_callback(uart->rx_dma);
+ csi_dma_ch_free(uart->rx_dma);
+ uart->rx_dma = NULL;
+ }
+
+ uart->receive = dw_uart_receive_intr;
+ }
+ }
+ return ret;
+}
+
+#ifdef CONFIG_PM
+csi_error_t dw_uart_pm_action(csi_dev_t *dev, csi_pm_dev_action_t action)
+{
+ CSI_PARAM_CHK(dev, CSI_ERROR);
+
+ csi_error_t ret = CSI_OK;
+ csi_pm_dev_t *pm_dev = &dev->pm_dev;
+ dw_uart_regs_t *uart_base = (dw_uart_regs_t *)dev->reg_base;
+
+ switch (action) {
+ case PM_DEV_SUSPEND:
+ dw_uart_fifo_disable(uart_base);
+ dw_uart_fifo_enable(uart_base);
+ dw_uart_wait_idle(uart_base);
+ uart_base->LCR |= DW_UART_LCR_DLAB_EN;
+ csi_pm_dev_save_regs(pm_dev->reten_mem, (uint32_t *)dev->reg_base, 2U);
+ uart_base->LCR &= (~DW_UART_LCR_DLAB_EN);
+ csi_pm_dev_save_regs(pm_dev->reten_mem + 2, (uint32_t *)(dev->reg_base + 4U), 1U);
+ csi_pm_dev_save_regs(pm_dev->reten_mem + 2 + 1, (uint32_t *)(dev->reg_base + 12U), 2U);
+ break;
+
+ case PM_DEV_RESUME:
+ dw_uart_fifo_disable(uart_base);
+ dw_uart_fifo_enable(uart_base);
+ dw_uart_wait_idle(uart_base);
+ uart_base->LCR |= DW_UART_LCR_DLAB_EN;
+ csi_pm_dev_restore_regs(pm_dev->reten_mem, (uint32_t *)dev->reg_base, 2U);
+ uart_base->LCR &= (~DW_UART_LCR_DLAB_EN);
+ csi_pm_dev_restore_regs(pm_dev->reten_mem + 2, (uint32_t *)(dev->reg_base + 4U), 1U);
+ csi_pm_dev_restore_regs(pm_dev->reten_mem + 2 + 1, (uint32_t *)(dev->reg_base + 12U), 2U);
+ break;
+
+ default:
+ ret = CSI_ERROR;
+ break;
+ }
+
+ return ret;
+}
+
+csi_error_t csi_uart_enable_pm(csi_uart_t *uart)
+{
+ return csi_pm_dev_register(&uart->dev, dw_uart_pm_action, 20U, 0U);
+}
+
+void csi_uart_disable_pm(csi_uart_t *uart)
+{
+ csi_pm_dev_unregister(&uart->dev);
+}
+#endif
+
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/devices.c b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/devices.c
new file mode 100644
index 00000000..48011f2a
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/devices.c
@@ -0,0 +1,87 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+// #include
+// #include
+// #include
+// #include
+#include
+#include
+#include
+
+const csi_perip_info_t g_soc_info[] = {
+ {DW_UART0_BASE, DW_UART0_IRQn, 0, DEV_DW_UART_TAG},
+ {DW_TIMER0_BASE, TIM0_IRQn, 0, DEV_DW_TIMER_TAG},
+ {DW_TIMER1_BASE, TIM1_IRQn, 1, DEV_DW_TIMER_TAG},
+ {DW_TIMER2_BASE, TIM2_IRQn, 2, DEV_DW_TIMER_TAG},
+ {DW_TIMER3_BASE, TIM3_IRQn, 3, DEV_DW_TIMER_TAG},
+#if CONFIG_SUPPORT_NMI_DEMO
+ {DW_TIMER4_BASE, FAKE_IRQ_TIMER4, 4, DEV_DW_TIMER_TAG},
+#endif
+#if defined(DW_DMA0_BASE)
+ {DW_DMA0_BASE, DW_DMA0_IRQn, 0, DEV_DW_AHB_DMA_TAG},
+ {DW_DMA0_BASE, DW_DMA0_IRQn, 0, DEV_DW_AXI_DMA_TAG},
+#endif
+#if defined(XT_IOPMP0_BASE)
+ {XT_IOPMP0_BASE, IOPMP0_IRQn, 0, DEV_XT_IOPMP_TAG},
+#endif
+ {0, 0, 0, 0}
+};
+
+const csi_dma_ch_info_t g_dma_chnum[] = {
+ {0, 8},
+ {DEV_IDX_INVALID, 0},
+};
+
+const uint16_t uart_tx_hs_num[1] = {};
+const uint16_t uart_rx_hs_num[1] = {};
+
+const csi_dma_ch_desc_t uart0_dma_ch_list[] = {
+ {0xff, 0xff}
+};
+
+const csi_dma_ch_spt_list_t dma_spt_list[] = {
+ {0xFFFFU, 0xFFU, NULL},
+};
+
+const csi_pinmap_t gpio_pinmap[] = {
+ {0xFFFFFFFFU, 0xFFU, 0xFFU, 0xFFFFFFFFU },
+};
+
+const csi_pinmap_t uart_pinmap[] = {
+ {0xFFFFFFFFU, 0xFFU, 0xFFU, 0xFFFFFFFFU },
+};
+
+const csi_clkmap_t clk_map[] = {
+ {0xFFFFFFFFU, 0xFFFFU, 0xFFU}
+};
+
+const csi_dma_handshake_ctrl_t xs0_dma0_handshake_ctrl_list[] = {
+ {DEV_IDX_INVALID, DEV_BLANK_TAG, 0xFFU, 0xFFU},
+};
+
+const csi_dma_handshake_list_t g_handshake_list[] = {
+ {0, xs0_dma0_handshake_ctrl_list},
+ {DEV_IDX_INVALID, NULL},
+};
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/feature.c b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/feature.c
new file mode 100644
index 00000000..4895e52c
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/feature.c
@@ -0,0 +1,311 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+#include
+
+// I/D Cache will enable in cache_init
+void cpu_features_init(void)
+{
+#if CONFIG_CPU_XUANTIE_E901PLUS_CP || CONFIG_CPU_XUANTIE_E901PLUS_B_CP || CONFIG_CPU_XUANTIE_E901PLUS_M_CP || CONFIG_CPU_XUANTIE_E901PLUS_BM_CP
+ return;
+#endif
+
+#if CONFIG_CPU_XUANTIE_E901_CP || CONFIG_CPU_XUANTIE_E901_B_CP || CONFIG_CPU_XUANTIE_E901_ZM_CP || CONFIG_CPU_XUANTIE_E901_BZM_CP
+ return;
+#endif
+
+#if CONFIG_CPU_XUANTIE_E902 || CONFIG_CPU_XUANTIE_E902M
+ return;
+#endif
+
+#if CONFIG_CPU_XUANTIE_E906 || CONFIG_CPU_XUANTIE_E906F || CONFIG_CPU_XUANTIE_E906FD || CONFIG_CPU_XUANTIE_E906P || CONFIG_CPU_XUANTIE_E906FP || CONFIG_CPU_XUANTIE_E906FDP
+ rv_csr_write(CSR_MXSTATUS, 0x440800);
+ rv_csr_write(CSR_MHCR, 0x103f & (~0x3));
+ return;
+#endif
+
+#if CONFIG_CPU_XUANTIE_E907 || CONFIG_CPU_XUANTIE_E907F || CONFIG_CPU_XUANTIE_E907FD || CONFIG_CPU_XUANTIE_E907P || CONFIG_CPU_XUANTIE_E907FP || CONFIG_CPU_XUANTIE_E907FDP
+ rv_csr_write(CSR_MXSTATUS, 0x440800);
+ rv_csr_write(CSR_MHINT, 0x600c);
+ rv_csr_write(CSR_MHCR, 0x103f & (~0x3));
+ return;
+#endif
+
+ volatile unsigned int i, cpu_type, cpu_ver, cpu_tnmodel;
+ unsigned long version[8];
+
+ /* As CPUID is a fifo register, try to find
+ * the CPUID[0] whose index(bit[31:28]) == 0 */
+ for (i = 0; i < 8; i++) {
+ version[0] = rv_csr_read(CSR_MCPUID);
+ if (((version[0]&0xf0000000) >> 28) == 0)
+ break;
+ }
+
+ for (i = 1; i < 8; i++)
+ version[i] = rv_csr_read(CSR_MCPUID);
+
+ cpu_type = (version[0] >> 18) & 0xf;
+ cpu_tnmodel = (version[0] >> 14) & 0x1;
+ cpu_ver = (version[1] >> 12) & 0xffff;
+
+ rv_csr_write(CSR_MCOR, 0x70013);
+
+ /*
+ * Warning: CSR_MCCR2 contains an L2 cache latency setting,
+ * you need to confirm it by your own soc design.
+ */
+ switch (cpu_type) {
+ case 0x1:
+ if (cpu_ver >= 0x0) {
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xe249000b);
+ rv_csr_write(CSR_MXSTATUS, 0x638000);
+ rv_csr_write(CSR_MHINT, 0x1ee30c);
+ rv_csr_write(CSR_MHCR, 0x11ff & (~0x3));
+ rv_csr_write(CSR_MHINT2,0x180);
+ } else {
+ while(1);
+ }
+ break;
+ case 0x2:
+ if (cpu_ver >= 0x0) {
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xa042000a);
+ rv_csr_write(CSR_MXSTATUS, 0x438100);
+ rv_csr_write(CSR_MHINT, 0x21aa10c);
+ rv_csr_write(CSR_MHCR, 0x10011ff & (~0x3));
+ rv_csr_write(CSR_MHINT4, 0x10000080);
+#if __riscv_xlen == 64
+ rv_csr_write(CSR_MENVCFG, 0x4000000000000000);
+#endif
+ } else {
+ while(1);
+ }
+ break;
+ case 0x3:
+ if (cpu_ver >= 0x1080 && cpu_ver <= 0x10bf) { //1.2.0~1.2.x
+ rv_csr_write(CSR_MCCR2, 0xe0010009);
+ rv_csr_write(CSR_MXSTATUS, 0x638000);
+ rv_csr_write(CSR_MHINT, 0x6e30c);
+ rv_csr_write(CSR_MHCR, 0x1ff & (~0x3));
+ } else if (cpu_ver == 0x10ca) { //1.3.10
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xe2490009);
+ rv_csr_write(CSR_MXSTATUS, 0x638000);
+ rv_csr_write(CSR_MHINT, 0x66e30c);
+ rv_csr_write(CSR_MHCR, 0x17f & (~0x3));
+ rv_csr_write(CSR_MHINT2, 0x420000);
+ rv_csr_write(CSR_MHINT4, 0x410);
+ } else if (cpu_ver >= 0x1100 && cpu_ver <= 0x113f) { //1.4.0~1.4.x
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xe2490009);
+ rv_csr_write(CSR_MXSTATUS, 0x638000);
+ rv_csr_write(CSR_MHINT, 0x16e30c);
+ rv_csr_write(CSR_MHCR, 0x1ff & (~0x3));
+ } else if (cpu_ver >= 0x1140 && cpu_ver <= 0x117f) { //1.5.0~1.5.x
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xe2490009);
+ rv_csr_write(CSR_MXSTATUS, 0x638000);
+ rv_csr_write(CSR_MHINT, 0xe6e30c);
+ rv_csr_write(CSR_MHINT2, 0x180);
+ rv_csr_write(CSR_MHCR, 0x1ff & (~0x3));
+ } else if (cpu_ver >= 0x1180 && cpu_ver <= 0x1183) { //1.6.0~1.6.3
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xe249000b);
+ rv_csr_write(CSR_MXSTATUS, 0x638000);
+ rv_csr_write(CSR_MHINT, 0x1ee30c);
+ rv_csr_write(CSR_MHINT2, 0x180);
+ rv_csr_write(CSR_MHCR, 0x1ff & (~0x3));
+ } else if (cpu_ver >= 0x1184 && cpu_ver <= 0x123f) { //1.6.4~1.8.x
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xe249000b);
+ rv_csr_write(CSR_MXSTATUS, 0x638000);
+ rv_csr_write(CSR_MHINT, 0x1ee30c);
+ rv_csr_write(CSR_MHINT2, 0x180);
+ rv_csr_write(CSR_MHCR, 0x11ff & (~0x3));
+ } else if (cpu_ver >= 0x2000 && cpu_ver <= 0x200e) { //2.0.0~2.0.14
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xe249000b);
+ rv_csr_write(CSR_MXSTATUS, 0x438000);
+ rv_csr_write(CSR_MHINT, 0x31ea32c);
+ rv_csr_write(CSR_MHINT2, 0x180);
+ rv_csr_write(CSR_MHCR, 0x11ff & (~0x3));
+#if __riscv_xlen == 64
+ rv_csr_write(CSR_MENVCFG, 0x4000000000000000);
+#endif
+ } else if (cpu_ver >= 0x200f && cpu_ver <= 0x2045) { //2.0.15~2.1.5
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xe249000b);
+ rv_csr_write(CSR_MXSTATUS, 0x438000);
+ rv_csr_write(CSR_MHINT, 0x11ea32c);
+ rv_csr_write(CSR_MHINT2, 0x180);
+ rv_csr_write(CSR_MHCR, 0x11ff & (~0x3));
+#if __riscv_xlen == 64
+ rv_csr_write(CSR_MENVCFG, 0x4000000000000000);
+#endif
+ } else if (cpu_ver >= 0x2046 && cpu_ver <= 0x20c3) { //2.1.6~2.3.3
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xe249000b);
+ rv_csr_write(CSR_MXSTATUS, 0x438000);
+ rv_csr_write(CSR_MHINT, 0x31ea32c);
+ rv_csr_write(CSR_MHINT2, 0x180);
+ rv_csr_write(CSR_MHCR, 0x11ff & (~0x3));
+#if __riscv_xlen == 64
+ rv_csr_write(CSR_MENVCFG, 0x4000000000000000);
+#endif
+ } else if (cpu_ver >= 0x20c4 && cpu_ver <= 0x2fff) { //2.3.4~2.x.x
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xe249000b);
+ rv_csr_write(CSR_MXSTATUS, 0x438100);
+ rv_csr_write(CSR_MHINT, 0x31ea32c);
+ rv_csr_write(CSR_MHINT2, 0x180);
+ rv_csr_write(CSR_MHCR, 0x11ff & (~0x3));
+ rv_csr_write(CSR_MHINT4, 0x2080);
+#if __riscv_xlen == 64
+ rv_csr_write(CSR_MENVCFG, 0x4000000000000000);
+#endif
+ } else if (cpu_ver >= 0x3000 && cpu_ver <= 0x3fff) { //3.0.0~3.x.x
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xe249000b);
+ rv_csr_write(CSR_MXSTATUS, 0x438100);
+ rv_csr_write(CSR_MHINT, 0x31ea32c);
+ rv_csr_write(CSR_MHINT2, 0x180);
+ rv_csr_write(CSR_MHCR, 0x11ff & (~0x3));
+ rv_csr_write(CSR_MHINT4, 0x2080);
+#if __riscv_xlen == 64
+ rv_csr_write(CSR_MENVCFG, 0x4000000000000000);
+#endif
+ } else {
+ while(1);
+ }
+ break;
+ case 0x4:
+ if (cpu_ver >= 0x1002 && cpu_ver <= 0xffff) {
+ rv_csr_write(CSR_MHCR, 0x17f & (~0x3));
+ rv_csr_write(CSR_MXSTATUS, 0x638000);
+ rv_csr_write(CSR_MHINT, 0x650c);
+ } else {
+ while(1);
+ }
+ break;
+ case 0x5:
+ if(cpu_tnmodel == 0) { //c908
+ if (cpu_ver >= 0x0000 && cpu_ver <= 0x0007) { //0.0.0~0.0.7
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xe0420008);
+ rv_csr_write(CSR_MXSTATUS, 0x638000);
+ rv_csr_write(CSR_MHINT, 0x2c50c);
+ rv_csr_write(CSR_MHCR, 0x11ff & (~0x3));
+ } else if (cpu_ver >= 0x0040 && cpu_ver <= 0x1002) { //0.1.0~1.0.2
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xa042000a);
+ rv_csr_write(CSR_MXSTATUS, 0x438000);
+ rv_csr_write(CSR_MHINT, 0x21aa10c);
+ rv_csr_write(CSR_MHCR, 0x10011ff & (~0x3));
+#if __riscv_xlen == 64
+ rv_csr_write(CSR_MENVCFG, 0x4000000000000000);
+#endif
+ } else if (cpu_ver >= 0x1003 && cpu_ver <= 0x100b) { //1.0.3~1.0.11
+
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xa042000a);
+ rv_csr_write(CSR_MXSTATUS, 0x438000);
+ rv_csr_write(CSR_MHINT, 0x1aa10c);
+ rv_csr_write(CSR_MHCR, 0x10011ff & (~0x3));
+#if __riscv_xlen == 64
+ rv_csr_write(CSR_MENVCFG, 0x4000000000000000);
+#endif
+ } else if (cpu_ver >= 0x100c && cpu_ver <= 0x1fff) { //1.0.12~
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xa042000a);
+ rv_csr_write(CSR_MXSTATUS, 0x438100);
+ rv_csr_write(CSR_MHINT, 0x21aa10c);
+ rv_csr_write(CSR_MHCR, 0x10011ff & (~0x3));
+ rv_csr_write(CSR_MHINT4, 0x10000080);
+#if __riscv_xlen == 64
+ rv_csr_write(CSR_MENVCFG, 0x4000000000000000);
+#endif
+ } else if (cpu_ver >= 0x2000 && cpu_ver <= 0xffff) { //2.0.0~
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xa042000a);
+ rv_csr_write(CSR_MXSTATUS, 0x438100);
+ rv_csr_write(CSR_MHINT, 0x21aa10c);
+ rv_csr_write(CSR_MHCR, 0x10011ff & (~0x3));
+ rv_csr_write(CSR_MHINT4, 0x10000080);
+#if __riscv_xlen == 64
+ rv_csr_write(CSR_MENVCFG, 0x4000000000000000);
+#endif
+ } else {
+ while(1);
+ }
+ } else if (cpu_tnmodel == 1) {
+ if (cpu_ver >= 0x0) {
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xA0420002);
+ rv_csr_write(CSR_MXSTATUS, 0x438100);
+ rv_csr_write(CSR_MHINT, 0x21AA10C);
+ rv_csr_write(CSR_MHCR, 0x10011FF & (~0x3));
+ rv_csr_write(CSR_MHINT4, 0x10000080);
+#if __riscv_xlen == 64
+ rv_csr_write(CSR_MENVCFG, 0x4000000000000000);
+#endif
+ } else {
+ while(1);
+ }
+ } else {
+ while(1);
+ }
+ break;
+ case 0x6:
+ if (cpu_ver >= 0x0) {
+ rv_csr_write(CSR_MSMPR, 0x1);
+ rv_csr_write(CSR_MCCR2, 0xA0420002);
+ rv_csr_write(CSR_MXSTATUS, 0x438000);
+ rv_csr_write(CSR_MHINT, 0x3A1AA10C);
+ rv_csr_write(CSR_MHCR, 0x10011BF & (~0x3));
+#if __riscv_xlen == 64
+ rv_csr_write(CSR_MENVCFG, 0x4000000000000000);
+#endif
+ } else {
+ while(1);
+ }
+ break;
+ case 0x7:
+ if (cpu_ver >= 0x0) {
+ rv_csr_clear(CSR_MXSTATUS, 0x1);
+ rv_csr_write(CSR_MISELECT,CSR_MNASTATUS);
+ rv_csr_write(CSR_MIREG,0x1e);
+ } else {
+ while(1);
+ }
+ break;
+ case 0x8:
+ if (cpu_ver >= 0x0) {
+ rv_csr_clear(CSR_MXSTATUS, 0x1);
+ rv_csr_write(CSR_MISELECT,CSR_MNASTATUS);
+ rv_csr_write(CSR_MIREG,0x1e);
+ } else {
+ while(1);
+ }
+ break;
+ default:
+ // FIXME: maybe qemu
+ break;
+ }
+}
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/irq.c b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/irq.c
new file mode 100644
index 00000000..dd38678e
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/irq.c
@@ -0,0 +1,282 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+#include
+#include
+#include
+#include
+#include
+
+extern uint32_t soc_irq_get_irq_num(void);
+extern void soc_irq_end(uint32_t irq_num);
+
+#if CONFIG_AOS_OSAL
+#include
+#include
+#define CSI_INTRPT_ENTER() aos_kernel_intrpt_enter()
+#define CSI_INTRPT_EXIT() aos_kernel_intrpt_exit()
+#else
+#ifdef CONFIG_KERNEL_FREERTOS
+#include
+extern int freertos_intrpt_enter(void);
+extern int freertos_intrpt_exit(void);
+#define CSI_INTRPT_ENTER() freertos_intrpt_enter()
+#define CSI_INTRPT_EXIT() freertos_intrpt_exit()
+#elif defined(CONFIG_KERNEL_RTTHREAD)
+#include
+#define printk rt_kprintf
+extern void rt_interrupt_enter(void);
+extern void rt_interrupt_leave(void);
+#define CSI_INTRPT_ENTER() rt_interrupt_enter()
+#define CSI_INTRPT_EXIT() rt_interrupt_leave()
+#else
+#define printk printf
+#define CSI_INTRPT_ENTER()
+#define CSI_INTRPT_EXIT()
+#endif
+#endif /* end CONFIG_AOS_OSAL */
+
+
+#if CONFIG_INTC_IMSIC_APLIC
+csi_dev_t *g_cpu_irq_table[CONFIG_NR_CPUS][CONFIG_IRQ_NUM];
+volatile msi_entry_t g_msi_map[CONFIG_NR_CPUS][CONFIG_IRQ_NUM];
+#define g_irq_table g_cpu_irq_table[csi_get_cpu_id()]
+#else
+csi_dev_t *g_irq_table[CONFIG_IRQ_NUM];
+#endif
+
+#if defined(CONFIG_SMP) && CONFIG_SMP
+volatile uint32_t g_irq_nested_level[CONFIG_NR_CPUS];
+#else
+volatile uint32_t g_irq_nested_level;
+#endif
+
+/**
+ \brief register irq handler(deprecated).
+ \param[in] irq_num Number of IRQ.
+ \return None.
+*/
+void csi_irq_attach(uint32_t irq_num, void *irq_handler, csi_dev_t *dev)
+{
+#if CONFIG_INTC_IMSIC_APLIC
+ int cpu_id = csi_get_cpu_id();
+ int msi_num = csi_imsic_irqnum_alloc(cpu_id, MSI_SOURCE_APLIC, irq_num);
+ g_cpu_irq_table[cpu_id][msi_num] = dev;
+ csi_imsic_irq_attach(cpu_id, msi_num, irq_handler);
+#else
+ dev->irq_handler = irq_handler;
+ g_irq_table[irq_num] = dev;
+#endif
+}
+
+/**
+ \brief Attach irq handler2 for compatible(Recommended).
+ \param[in] irq_num Number of IRQ.
+ \param[in] irq_handler2 IRQ Handler.
+ \param[in] dev The dev to operate
+ \param[in] arg user data of irq_handler2
+ \return None.
+*/
+void csi_irq_attach2(uint32_t irq_num, void *irq_handler2, csi_dev_t *dev, void *arg)
+{
+#if CONFIG_INTC_IMSIC_APLIC
+ int cpu_id = csi_get_cpu_id();
+ int msi_num = csi_imsic_irqnum_alloc(cpu_id, MSI_SOURCE_APLIC, irq_num);
+ g_cpu_irq_table[cpu_id][msi_num] = dev;
+ csi_imsic_irq_attach2(cpu_id, msi_num, irq_handler2, arg);
+#else
+ dev->arg = arg;
+ dev->irq_handler2 = irq_handler2;
+ g_irq_table[irq_num] = dev;
+#endif
+}
+
+/**
+ \brief unregister irq handler.
+ \param[in] irq_num Number of IRQ.
+ \param[in] irq_handler IRQ Handler.
+ \return None.
+*/
+void csi_irq_detach(uint32_t irq_num)
+{
+#if CONFIG_INTC_IMSIC_APLIC
+ int msi_num = csi_aplic_get_target_eiid(APLIC_BASE, irq_num);
+ int cpu_id = csi_aplic_get_target_hart(APLIC_BASE, irq_num);
+ CSI_ASSERT(csi_imsic_irq_detach(cpu_id, msi_num) == CSI_OK);
+ CSI_ASSERT(csi_imsic_irqnum_free(cpu_id, msi_num) == CSI_OK);
+ CSI_ASSERT(g_cpu_irq_table[cpu_id][msi_num] != NULL);
+ g_cpu_irq_table[cpu_id][msi_num] = NULL;
+#else
+ g_irq_table[irq_num] = NULL;
+#endif
+}
+
+/**
+ \brief gets whether in irq context
+ \return true or false.
+*/
+bool csi_irq_context(void)
+{
+#if defined(CONFIG_SMP) && CONFIG_SMP
+ return ((g_irq_nested_level[csi_get_cpu_id()] > 0U) ? true : false);
+#else
+ return ((g_irq_nested_level > 0U) ? true : false);
+#endif
+}
+
+static volatile int g_nmi_cnt;
+__attribute__((weak)) void handle_nmi_exception(void)
+{
+ g_nmi_cnt++;
+#if CONFIG_SUPPORT_NMI_DEMO
+ extern void timer_clear_irq();
+ timer_clear_irq();
+#endif
+}
+
+//FIXME: For Non CLIC mode
+extern void tick_irq_handler(void *arg);
+void CORET_IRQHandler(void)
+{
+#if defined(CONFIG_SMP) && CONFIG_SMP
+ g_irq_nested_level[csi_get_cpu_id()]++;
+#else
+ g_irq_nested_level++;
+#endif
+ CSI_INTRPT_ENTER();
+ tick_irq_handler(NULL);
+ CSI_INTRPT_EXIT();
+#if defined(CONFIG_SMP) && CONFIG_SMP
+ g_irq_nested_level[csi_get_cpu_id()]--;
+#else
+ g_irq_nested_level--;
+#endif
+}
+
+#if CONFIG_ECC_L1_ENABLE || CONFIG_ECC_L2_ENABLE
+static struct {
+ int err_cnt_l1;
+ int err_cnt_l2;
+} g_ecc_stat;
+
+void __attribute__((weak)) ecc_l1_irqhandler(void *arg)
+{
+ g_ecc_stat.err_cnt_l1++;
+
+ if (!(__get_MCER() >> 31) || (__get_MCER() & (0x1 << 30))) {
+ /* may be ecc fatal error happens */
+ while (1);
+ } else {
+ /* clear MCER EE_VLD */
+#if __riscv_xlen == 32
+ __set_MCER(0);
+ __set_MCERH(0);
+#else
+ __set_MCER(0);
+#endif
+ }
+}
+
+void __attribute__((weak)) ecc_l2_irqhandler(void *arg)
+{
+ g_ecc_stat.err_cnt_l2++;
+
+#if __riscv_xlen == 32
+ if((__get_MCER2H() >> 30) == 0x2) {
+ /* clear MCER EE_VLD */
+ __set_MCER2(0);
+ __set_MCER2H(0);
+ } else {
+ /* may be ecc fatal error happens */
+ while (1);
+ }
+#else
+ if((__get_MCER2() >> 62) == 0x2) {
+ /* clear MCER EE_VLD */
+ __set_MCER2(0);
+ } else {
+ /* may be ecc fatal error happens */
+ while (1);
+ }
+#endif
+}
+
+void ECC_L1_IRQHandler(void)
+{
+#if defined(CONFIG_SMP) && CONFIG_SMP
+ g_irq_nested_level[csi_get_cpu_id()]++;
+#else
+ g_irq_nested_level++;
+#endif
+ CSI_INTRPT_ENTER();
+ ecc_l1_irqhandler(NULL);
+ CSI_INTRPT_EXIT();
+#if defined(CONFIG_SMP) && CONFIG_SMP
+ g_irq_nested_level[csi_get_cpu_id()]--;
+#else
+ g_irq_nested_level--;
+#endif
+}
+#endif /* CONFIG_ECC_L1_ENABLE || CONFIG_ECC_L2_ENABLE */
+
+/**
+ \brief dispatching irq handlers(only handle external irq)
+ \return None.
+*/
+void do_irq(void)
+{
+ uint32_t irqn;
+
+#if defined(CONFIG_SMP) && CONFIG_SMP
+ g_irq_nested_level[csi_get_cpu_id()]++;
+#else
+ g_irq_nested_level++;
+#endif
+ CSI_INTRPT_ENTER();
+ irqn = soc_irq_get_irq_num();
+
+ if (irqn > sizeof(g_irq_table) / sizeof(g_irq_table[0]) - 1 ) {
+ printk("undefined interrupt: irqn = 0x%x\n", irqn);
+ while(1);
+ }
+ if (g_irq_table[irqn]) {
+ if (g_irq_table[irqn]->irq_handler) {
+ /* for compatibility */
+ g_irq_table[irqn]->irq_handler(g_irq_table[irqn]);
+ }
+ else if (g_irq_table[irqn]->irq_handler2) {
+ g_irq_table[irqn]->irq_handler2(irqn, g_irq_table[irqn]->arg);
+ }
+ else {
+ printk("undefined interrupt2: irqn = 0x%x\n", irqn);
+ /*the interrupt has no registered isr*/
+ while(1);
+ }
+ } else {
+ printk("null irq_handler: irqn = 0x%x\n", irqn);
+ while(1);
+ }
+
+ soc_irq_end(irqn);
+ CSI_INTRPT_EXIT();
+#if defined(CONFIG_SMP) && CONFIG_SMP
+ g_irq_nested_level[csi_get_cpu_id()]--;
+#else
+ g_irq_nested_level--;
+#endif
+}
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/irq_port.c b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/irq_port.c
new file mode 100644
index 00000000..8caa0588
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/irq_port.c
@@ -0,0 +1,147 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+#include
+#include
+#include
+#include
+
+void soc_irq_enable(uint32_t irq_num)
+{
+ csi_vic_enable_irq((int32_t)irq_num);
+}
+
+void soc_irq_disable(uint32_t irq_num)
+{
+ csi_vic_disable_irq((int32_t)irq_num);
+}
+
+bool soc_irq_is_enabled(uint32_t irq_num)
+{
+ bool ret;
+
+ if (csi_vic_get_enabled_irq((int32_t)irq_num)) {
+ ret = true;
+ } else {
+ ret = false;
+ }
+
+ return ret;
+}
+
+void soc_irq_priority(uint32_t irq_num, uint32_t priority)
+{
+ csi_vic_set_prio((int32_t)irq_num, priority);
+}
+
+/**
+ * @brief get irq vector num
+ * @return irq no
+ */
+uint32_t soc_irq_get_irq_num(void)
+{
+ int hartid = csi_get_cpu_id();
+#if CONFIG_INTC_CLIC
+ (void) hartid;
+#if CONFIG_RISCV_SMODE
+ return (__get_SCAUSE() & 0x3FFU);
+#else
+ return (__get_MCAUSE() & 0x3FFU);
+#endif /* CONFIG_RISCV_SMODE */
+#endif /* CONFIG_INTC_CLIC */
+
+#if CONFIG_INTC_PLIC || CONFIG_INTC_CLIC_PLIC
+ uint32_t num;
+#if CONFIG_RISCV_SMODE
+ uint32_t irqn = __get_SCAUSE() & 0x3FFU;
+#else
+ uint32_t irqn = __get_MCAUSE() & 0x3FFU;
+#endif /* CONFIG_RISCV_SMODE */
+ if (irqn == Machine_External_IRQn || irqn == Supervisor_External_IRQn) {
+#if CONFIG_RISCV_SMODE
+ num = PLIC_Hn_MSCLAIM_VAL(&PLIC->PLIC_H0_SCLAIM, hartid);
+#else
+ num = PLIC_Hn_MSCLAIM_VAL(&PLIC->PLIC_H0_MCLAIM, hartid);
+#endif
+#if CONFIG_INTC_CLIC_PLIC
+ num += PLIC_IRQ_OFFSET;
+#endif
+ } else {
+ num = irqn;
+ }
+ return num;
+#endif /* CONFIG_INTC_PLIC || CONFIG_INTC_CLIC_PLIC */
+
+#if CONFIG_INTC_APLIC || CONFIG_INTC_CLIC_APLIC
+ uint32_t num;
+#if CONFIG_RISCV_SMODE
+ uint32_t irqn = __get_SCAUSE() & 0x3FFU;
+#else
+ uint32_t irqn = __get_MCAUSE() & 0x3FFU;
+#endif /* CONFIG_RISCV_SMODE */
+ if (irqn == Machine_External_IRQn || irqn == Supervisor_External_IRQn) {
+ num = csi_aplic_read_claimi(APLIC_BASE, hartid);
+#if CONFIG_INTC_CLIC_APLIC
+ num += APLIC_IRQ_OFFSET;
+#endif
+ } else {
+ num = irqn;
+ }
+ return num;
+#endif /* CONFIG_INTC_APLIC || CONFIG_INTC_CLIC_APLIC */
+
+#if CONFIG_INTC_IMSIC_APLIC
+ return g_handing_msi_num[hartid];
+#endif
+}
+
+void soc_irq_end(uint32_t irq_num)
+{
+#if CONFIG_INTC_CLIC
+ // DO NOTHING
+#endif /* CONFIG_INTC_CLIC */
+
+ /**
+ * If aplic works in msi-mode
+ * and the current interrupt is level-triggered
+ * need retrigger
+ */
+#if CONFIG_INTC_IMSIC_APLIC
+ extern csi_dev_t *g_cpu_irq_table[CONFIG_NR_CPUS][CONFIG_IRQ_NUM];
+ csi_aplic_retrigger_level_irq(APLIC_BASE, g_cpu_irq_table[csi_get_cpu_id()][irq_num]->irq_num);
+#endif
+
+
+#if CONFIG_INTC_PLIC || CONFIG_INTC_CLIC_PLIC
+#if CONFIG_INTC_CLIC_PLIC
+ if (irq_num <= PLIC_IRQ_OFFSET) {
+ return;
+ }
+ irq_num -= PLIC_IRQ_OFFSET;
+#endif /* CONFIG_INTC_CLIC_PLIC */
+#if CONFIG_RISCV_SMODE
+ PLIC_Hn_MSCLAIM_VAL(&PLIC->PLIC_H0_SCLAIM, csi_get_cpu_id()) = irq_num;
+#else
+ PLIC_Hn_MSCLAIM_VAL(&PLIC->PLIC_H0_MCLAIM, csi_get_cpu_id()) = irq_num;
+#endif
+#endif /* CONFIG_INTC_PLIC || CONFIG_INTC_CLIC_PLIC */
+
+#if CONFIG_INTC_APLIC || CONFIG_INTC_CLIC_APLIC
+ // DO NOTHING
+#endif /* CONFIG_INTC_APLIC || CONFIG_INTC_CLIC_APLIC */
+}
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/pre_main.c b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/pre_main.c
new file mode 100644
index 00000000..99e207c5
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/pre_main.c
@@ -0,0 +1,103 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+/******************************************************************************
+ * @file pre_main.c
+ * @brief source file for the pre_main
+ * @version V1.0
+ * @date 04. April 2024
+ ******************************************************************************/
+
+#include
+#include
+#include
+
+extern unsigned long __heap_start;
+extern unsigned long __heap_end;
+unsigned long g_heap_start = (unsigned long)&__heap_start;
+unsigned long g_heap_end = (unsigned long)&__heap_end;
+
+extern int main(void);
+/*
+ * The ranges of copy from/to are specified by following symbols
+ * __erodata: LMA of start of the section to copy from. Usually end of rodata
+ * __data_start__: VMA of start of the section to copy to
+ * __data_end__: VMA of end of the section to copy to
+ *
+ * All addresses must be aligned to 4 bytes boundary.
+ */
+void section_data_copy(void)
+{
+ extern unsigned long __erodata;
+ extern unsigned long __data_start__;
+ extern unsigned long __data_end__;
+
+ if (((unsigned long)&__erodata != (unsigned long)&__data_start__)) {
+ unsigned long src_addr = (unsigned long)&__erodata;
+ memcpy((void *)(&__data_start__), \
+ (void *)src_addr, \
+ (unsigned long)(&__data_end__) - (unsigned long)(&__data_start__));
+ }
+}
+
+void section_ram_code_copy(void)
+{
+ extern unsigned long __erodata;
+ extern unsigned long __data_start__;
+ extern unsigned long __data_end__;
+ extern unsigned long __ram_code_start__;
+ extern unsigned long __ram_code_end__;
+
+ if (((unsigned long)&__erodata != (unsigned long)&__data_start__)) {
+ unsigned long src_addr = (unsigned long)&__erodata;
+ src_addr += (unsigned long)(&__data_end__) - (unsigned long)(&__data_start__);
+ memcpy((void *)(&__ram_code_start__), \
+ (void *)src_addr, \
+ (unsigned long)(&__ram_code_end__) - (unsigned long)(&__ram_code_start__));
+ }
+}
+
+/*
+ * The BSS section is specified by following symbols
+ * __bss_start__: start of the BSS section.
+ * __bss_end__: end of the BSS section.
+ *
+ * Both addresses must be aligned to 4 bytes boundary.
+ */
+void section_bss_clear(void)
+{
+ extern unsigned long __bss_start__;
+ extern unsigned long __bss_end__;
+
+ memset((void *)(&__bss_start__), \
+ 0, \
+ (unsigned long)(&__bss_end__) - (unsigned long)(&__bss_start__));
+
+}
+
+__attribute__((weak)) void pre_main(void)
+{
+#if (!defined(CONFIG_KERNEL_RHINO)) && (!defined(CONFIG_NUTTXMM_NONE)) \
+ && (!defined(CONFIG_KERNEL_FREERTOS)) && (!defined(CONFIG_KERNEL_RTTHREAD)) \
+ && (!defined(CONFIG_KERNEL_THREADX))
+ extern void mm_heap_initialize(void);
+ mm_heap_initialize();
+#endif
+
+ main();
+}
diff --git a/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/sys_clk.c b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/sys_clk.c
new file mode 100644
index 00000000..2ef6f11e
--- /dev/null
+++ b/ports/risc-v32/gnu/example_build/xuantie_smartl_fpga/components/chip_riscv_dummy/src/sys/sys_clk.c
@@ -0,0 +1,100 @@
+ /*
+ * Copyright (C) 2017-2024 Alibaba Group Holding Limited
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+#include
+#include
+#include